Beispiel #1
0
//JAVA TO C# CONVERTER WARNING: 'sealed override' parameters are not available in .NET:
//ORIGINAL LINE: @Override public java.awt.Component getTableCellEditorComponent(sealed override javax.swing.JTable table, sealed override Object value, sealed override bool isSelected, sealed override int row, sealed override int column)
            public override Component getTableCellEditorComponent(JTable table, object value, bool isSelected, int row, int column)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'sealed override':
//ORIGINAL LINE: sealed override javax.swing.JTextField tf = ((javax.swing.JTextField) getComponent());
                JTextField tf = ((JTextField)Component);

                tf.Text = string.Format("0x{0:X}", Integer.decode((string)table.Model.getValueAt(row, column)));

                // needed for double-click to work, otherwise the second click
                // is interpreted to position the caret
                SwingUtilities.invokeLater(() =>
                {
                    // automatically select text after '0x'
                    tf.select(2, tf.Text.Length());
                });
                return(tf);
            }