use of net.sourceforge.processdash.log.time.TimeLogTableModel in project processdash by dtuma.
the class TimeLogEditor method constructEditPanel.
private JPanel constructEditPanel() {
JPanel retPanel = new JPanel(false);
retPanel.setLayout(new BorderLayout());
tableModel = new TimeLogTableModel();
if (Settings.isReadOnly() || forceReadOnly)
tableModel.setEditable(false);
tableModel.setApprover(approver);
tableModel.addTableModelListener(this);
table = new TimeLogJTable(tableModel);
TableUtils.configureTable(table, TimeLogTableModel.COLUMN_WIDTHS, TimeLogTableModel.COLUMN_TOOLTIPS);
TableColumn startTimeCol = table.getColumnModel().getColumn(TimeLogTableModel.COL_START_TIME);
startTimeCol.setCellEditor(new JDateTimeChooserCellEditor(Settings.getVal("timelog.dateTimeEditFormat", DATE_TIME_FORMAT)));
retPanel.add("Center", new JScrollPane(table));
JPanel btnPanel = new JPanel(false);
addButton = createButton(btnPanel, "Add", "addRow");
createButton(btnPanel, "Delete", "deleteSelectedRow");
createButton(btnPanel, "Summarize_Button", "summarizeWarning");
if (Settings.isReadWrite() && !forceReadOnly)
retPanel.add("South", btnPanel);
return retPanel;
}
Aggregations