Class SeedTableModel
- All Implemented Interfaces:
Serializable,TableModel
TableModel backed by a SeedOverlay. Seven
columns: X, Y, Z, Conf, Radius, Type, Source.
All cells are read-only: to relocate a seed, change confidence/radius/type,
or relabel its provenance, open the SeedPointEditDialog (single mode
via double-click on a row or Alt+Click on the canvas; bulk mode via the
panel's Edit toolbar button).
The model remains a 1:1 view of the overlay (one row per seed). Confidence-
range filtering is exposed as a RowFilter via
confidenceRangeFilter(), which the panel installs on the table's
TableRowSorter; out-of-range rows are hidden by
the sorter (not removed from the model), so view↔model row conversions
continue to work transparently for selection sync.
Coverage against the active tracing (whether a seed already has a nearby traced path node) is not tracked here: it is a point-in-time snapshot, not a live table column, and is computed on demand by the panel's "Select by Coverage" action, which selects the matching seeds directly on the overlay.
- Author:
- Tiago Ferreira
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Unregisters the overlay listener.Class<?> getColumnClass(int col) intgetColumnName(int col) intgetValueAt(int row, int col) booleanisCellEditable(int row, int col) All cells are read-only.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
-
Field Details
-
COL_X
public static final int COL_X- See Also:
-
COL_Y
public static final int COL_Y- See Also:
-
COL_Z
public static final int COL_Z- See Also:
-
COL_CONFIDENCE
public static final int COL_CONFIDENCE- See Also:
-
COL_RADIUS
public static final int COL_RADIUS- See Also:
-
COL_TYPE
public static final int COL_TYPE- See Also:
-
COL_SOURCE
public static final int COL_SOURCE- See Also:
-
-
Constructor Details
-
SeedTableModel
-
-
Method Details
-
dispose
public void dispose()Unregisters the overlay listener. Must be called when this model is no longer used: the listener holds a strong reference back to this model, so failing to calldispose()pins the model (and its enclosing UI) for as long as the overlay lives. -
getRowCount
public int getRowCount() -
getColumnCount
public int getColumnCount() -
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
getValueAt
-
isCellEditable
public boolean isCellEditable(int row, int col) All cells are read-only. Edits go throughSeedPointEditDialog(opened via row double-click, canvas Alt+Click, or the panel's Edit toolbar button), which rebuilds the immutableSeedPointand applies it viaSeedOverlay.replaceAt(int, SeedPoint).- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
confidenceRangeFilter
- Returns:
- a
RowFilterthat includes a row iff its seed's confidence falls within the overlay's current[lowConfidence, highConfidence]window. The filter reads the bounds live, so re-evaluating it after a range change (e.g., via the model'sfireTableDataChanged()firing on overlay changes) is sufficient: the panel does not need to swap the filter.
-