use of net.sourceforge.processdash.ui.lib.JDateTimeChooserCellEditor 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;
}
use of net.sourceforge.processdash.ui.lib.JDateTimeChooserCellEditor in project processdash by dtuma.
the class TaskScheduleDialog method configureEditor.
protected void configureEditor(JTable table) {
JDateTimeChooserCellEditor editor = new JDateTimeChooserCellEditor(DATE_FORMAT);
editor.setClickCountToStart(2);
table.setDefaultEditor(Date.class, editor);
}
Aggregations