Search in sources :

Example 1 with ValueTableModel

use of de.neemann.digital.data.ValueTableModel in project Digital by hneemann.

the class ValueTableDialog method createTable.

private JTable createTable(ValueTable valueTable) {
    JTable table = new JTable(new ValueTableModel(valueTable));
    table.setDefaultRenderer(Value.class, new ValueRenderer());
    table.setDefaultRenderer(Integer.class, new NumberRenderer());
    final Font font = table.getFont();
    table.getColumnModel().getColumn(0).setMaxWidth(font.getSize() * 4);
    table.setRowHeight(font.getSize() * 6 / 5);
    return table;
}
Also used : ValueTableModel(de.neemann.digital.data.ValueTableModel)

Aggregations

ValueTableModel (de.neemann.digital.data.ValueTableModel)1