use of com.revolsys.swing.table.BaseJTable in project com.revolsys.open by revolsys.
the class LabelCountMapTableModel method selectLabelCountCell.
public void selectLabelCountCell(final CharSequence label, final CharSequence countName) {
this.selectedLabel = label.toString();
this.selectedCountName = countName.toString();
final BaseJTable table = getTable();
table.repaint();
}
use of com.revolsys.swing.table.BaseJTable in project com.revolsys.open by revolsys.
the class LambdaTableModel method newTable.
@Override
public BaseJTable newTable() {
final BaseJTable table = super.newTable();
applyTableColumnSettings(table);
return table;
}
use of com.revolsys.swing.table.BaseJTable in project com.revolsys.open by revolsys.
the class LayerRecordTableModel method newTablePanel.
public TablePanel newTablePanel() {
final LayerRecordForm form = this.form.get();
final BaseJTable table = AbstractSingleRecordTableModel.newTable(this);
FormAllFieldsModifiedPredicate.add(form, table);
FormAllFieldsErrorPredicate.add(form, table);
final TableColumnModel columnModel = table.getColumnModel();
for (int i = 0; i < columnModel.getColumnCount(); i++) {
final TableColumn column = columnModel.getColumn(i);
if (i == 2) {
final TableCellEditor cellEditor = column.getCellEditor();
cellEditor.addCellEditorListener(form);
}
}
final TablePanel tablePanel = new TablePanel(table);
final ToolBar toolBar = tablePanel.getToolBar();
toolBar.addComponent("default", this.fieldNamesSetNamesField);
toolBar.addButtonTitleIcon("default", "Edit Field Sets", "fields_filter_edit", () -> {
final String fieldNamesSetName = FieldNamesSetPanel.showDialog(this.layer);
if (Property.hasValue(fieldNamesSetName)) {
this.fieldNamesSetNamesField.setFieldValue(fieldNamesSetName);
}
});
int maxHeight = 500;
for (final GraphicsDevice device : GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()) {
final GraphicsConfiguration graphicsConfiguration = device.getDefaultConfiguration();
final Rectangle bounds = graphicsConfiguration.getBounds();
maxHeight = Math.min(bounds.height, maxHeight);
}
final int preferredHeight = Math.min(maxHeight, (this.getRowCount() + 1) * 20 + 45);
tablePanel.setMinimumSize(new Dimension(100, preferredHeight));
tablePanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, maxHeight));
tablePanel.setPreferredSize(new Dimension(800, preferredHeight));
return tablePanel;
}
use of com.revolsys.swing.table.BaseJTable in project com.revolsys.open by revolsys.
the class AbstractRecordLayer method newPropertiesPanelFields.
protected void newPropertiesPanelFields(final TabbedValuePanel propertiesPanel) {
final RecordDefinition recordDefinition = getRecordDefinition();
final BaseJTable fieldTable = RecordDefinitionTableModel.newTable(recordDefinition);
final BasePanel fieldPanel = new BasePanel(new BorderLayout());
fieldPanel.setPreferredSize(new Dimension(500, 400));
final JScrollPane fieldScroll = new JScrollPane(fieldTable);
fieldPanel.add(fieldScroll, BorderLayout.CENTER);
propertiesPanel.addTab("Fields", fieldPanel);
}
use of com.revolsys.swing.table.BaseJTable in project com.revolsys.open by revolsys.
the class RecordDefinitionTableModel method newTable.
public static BaseJTable newTable(final RecordDefinition recordDefinition) {
if (recordDefinition == null) {
return null;
} else {
final RecordDefinitionTableModel model = new RecordDefinitionTableModel(recordDefinition);
final BaseJTable table = new BaseJTable(model);
table.resizeColumnsToContent();
return table;
}
}
Aggregations