use of org.vcell.util.gui.AdvancedTablePanel in project vcell by virtualcell.
the class ConfidenceIntervalPlotPanel method getTablePanel.
private AdvancedTablePanel getTablePanel() {
if (tablePanel == null) {
tablePanel = new AdvancedTablePanel();
tablePanel.setLayout(new BorderLayout());
tablePanel.setTable(getIntervalTable());
tablePanel.add(getIntervalTable().getTableHeader(), BorderLayout.NORTH);
tablePanel.add(getIntervalTable(), BorderLayout.SOUTH);
}
return tablePanel;
}
use of org.vcell.util.gui.AdvancedTablePanel in project vcell by virtualcell.
the class BatchRunResultsParamTablePanel method setupTable_stat.
private void setupTable_stat() {
statTablePanel = new AdvancedTablePanel();
table_stat = new StyleTable();
table_stat.setModel(statTableModel);
table_stat.setCellSelectionEnabled(true);
TableColumn nameCol = table_stat.getColumnModel().getColumn(BatchRunResultsParamTableModel.COLUMN_FILE_NAME);
nameCol.setCellRenderer(new ResultsParamTableRenderer());
// set the numeric columns' renders
// double precision 6 digits
TableCellRenderer statRenderer = new NumericTableCellRenderer();
for (int i = 1; i < table_stat.getColumnCount(); i++) {
TableColumn col = table_stat.getColumnModel().getColumn(i);
col.setPreferredWidth(0);
col.setCellRenderer(statRenderer);
}
// add table to panel.By default, if you don't place a table in a scroll pane, the table header is not shown. You need to explicitly display it.
statTablePanel.setTable(table_stat);
statTablePanel.setLayout(new GridBagLayout());
GridBagConstraints gc = new GridBagConstraints();
gc.gridy = 0;
gc.gridx = 0;
gc.weightx = 1;
gc.fill = GridBagConstraints.HORIZONTAL;
statTablePanel.add(table_stat.getTableHeader(), gc);
gc.gridy = 1;
gc.gridx = 0;
gc.weightx = 1;
gc.fill = GridBagConstraints.HORIZONTAL;
statTablePanel.add(table_stat, gc);
}
use of org.vcell.util.gui.AdvancedTablePanel in project vcell by virtualcell.
the class BatchRunResultsParamTablePanel method setupTable_param.
private void setupTable_param() {
paramTablePanel = new AdvancedTablePanel();
TableSorter sorter = new TableSorter(resultsTableModel);
table_param = new StyleTable(sorter);
table_param.setCellSelectionEnabled(true);
sorter.setTableHeader(table_param.getTableHeader());
// apply table renderer for name column
TableColumn nameCol = table_param.getColumnModel().getColumn(BatchRunResultsParamTableModel.COLUMN_FILE_NAME);
ResultsParamTableRenderer resultsParamTableRenderer = new ResultsParamTableRenderer();
nameCol.setCellRenderer(resultsParamTableRenderer);
nameCol.setPreferredWidth(75);
// apply table renderer and table editor for details column
TableColumn detailsCol = table_param.getColumnModel().getColumn(BatchRunResultsParamTableModel.COLUMN_DETAILS);
detailsCol.setCellRenderer(resultsParamTableRenderer);
detailsCol.setPreferredWidth(35);
// apply table renderer to the rest numeric columns
// double precision 6 digits
TableCellRenderer resultsRanderer = new NumericTableCellRenderer();
table_param.setDefaultRenderer(Double.class, resultsRanderer);
for (int i = 1; i < table_param.getColumnCount() - 1; i++) {
TableColumn col = table_param.getColumnModel().getColumn(i);
col.setPreferredWidth(0);
}
ResultsParamTableEditor tableEditor = new ResultsParamTableEditor(table_param);
tableEditor.addPropertyChangeListener(this);
detailsCol.setCellEditor(tableEditor);
// add table to panel.By default, if you don't place a table in a scroll pane, the table header is not shown. You need to explicitly display it.
paramTablePanel.setTable(table_param);
paramTablePanel.setLayout(new GridBagLayout());
GridBagConstraints gc = new GridBagConstraints();
gc.gridy = 0;
gc.gridx = 0;
gc.weightx = 1;
gc.fill = GridBagConstraints.HORIZONTAL;
paramTablePanel.add(table_param.getTableHeader(), gc);
gc.gridy = 1;
gc.gridx = 0;
gc.weightx = 1;
gc.fill = GridBagConstraints.HORIZONTAL;
paramTablePanel.add(table_param, gc);
}
Aggregations