use of javax.swing.event.TableModelEvent in project processdash by dtuma.
the class TaskScheduleDialog method evRecalculated.
public void evRecalculated(EventObject e) {
recalcActiveMilestoneDateRow();
// We have to manually generate events for the JTreeTable,
// since it has installed some wrapper object to convert the
// TreeTableModel into a TableModel.
AbstractTableModel model = (AbstractTableModel) treeTable.getModel();
model.fireTableChanged(new TableModelEvent(model, 0, treeTable.getRowCount() - 1));
// Calculating the schedule may mean that direct time columns now
// need to be displayed or hidden
showHideColumns();
// Since rows may have been added or deleted to the schedule, and
// rows may have changed to or from automatic rows, update the
// buttons appropriately.
enableScheduleButtons();
// Display the error button if necessary.
maybeDisplayErrorButton();
// highlight any errors in the EVModel if they exist.
highlightErrors(getErrors());
}
use of javax.swing.event.TableModelEvent in project processdash by dtuma.
the class EVSchedule method firePreparedEvents.
synchronized void firePreparedEvents() {
if (prevNumRows == -1) {
fireTableChanged(null);
return;
}
int currNumRows = getRowCount();
int changedRows = (currNumRows < prevNumRows ? currNumRows : prevNumRows);
// fire an event to redraw rows that previously might have been
// automatic.
fireTableChanged(new TableModelEvent(this, 0, changedRows - 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.UPDATE));
if (prevNumRows < currNumRows)
// fire a "rows added" event.
fireTableChanged(new TableModelEvent(this, prevNumRows, currNumRows - 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));
else if (prevNumRows > currNumRows)
// fire a "rows deleted" event.
fireTableChanged(new TableModelEvent(this, currNumRows, prevNumRows - 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.DELETE));
prevNumRows = -1;
}
use of javax.swing.event.TableModelEvent in project processdash by dtuma.
the class EVMetrics method resetValidMetrics.
protected void resetValidMetrics() {
validMetrics = null;
fireTableChanged(new TableModelEvent(this));
}
use of javax.swing.event.TableModelEvent in project processdash by dtuma.
the class EVSchedule method deleteRow.
public synchronized void deleteRow(int row) {
Period r = get(row + 1);
if (r == null || r.automatic)
return;
remove(row + 1);
// send a "row deleted" event.
fireTableChanged(new TableModelEvent(this, row, row, TableModelEvent.ALL_COLUMNS, TableModelEvent.DELETE));
// signal the need to recalculate all the schedule data.
fireNeedsRecalc();
}
use of javax.swing.event.TableModelEvent in project processdash by dtuma.
the class DefectDataBag method selectUnselectAll.
public void selectUnselectAll(boolean select) {
Object newVal = (select ? Boolean.TRUE : Boolean.FALSE);
for (Iterator i = defectData.iterator(); i.hasNext(); ) {
Map row = (Map) i.next();
row.put(ATTRS[INCLUDED], newVal);
}
fireTableChanged(new TableModelEvent(this, 0, getRowCount() - 1, INCLUDED));
}
Aggregations