Esempio n. 1
0
 // Implement the one CellEditor method that AbstractCellEditor doesn't.
 @Override
 public Object getCellEditorValue() {
   int i = hexField.getValue();
   if (i > 127) i -= 256;
   return new Byte((byte) i);
 }
Esempio n. 2
0
 // Implement the one method defined by TableCellEditor.
 @Override
 public Component getTableCellEditorComponent(
     JTable table, Object value, boolean isSelected, int row, int column) {
   hexField.setValue(((Byte) value).intValue());
   return hexField;
 }
Esempio n. 3
0
 public HexEditor(int i) {
   hexField = new HexField(0, i);
   hexField.addActionListener(this);
 }