示例#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);
 }
示例#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;
 }
示例#3
0
 public HexEditor(int i) {
   hexField = new HexField(0, i);
   hexField.addActionListener(this);
 }