Package likelihoodDetectionModule
Class TreeTableModelAdapter
java.lang.Object
javax.swing.table.AbstractTableModel
likelihoodDetectionModule.TreeTableModelAdapter
- All Implemented Interfaces:
Serializable
,TableModel
The class TreeTableModelAdapter is a necessary part of the TreeTable implementation
because it serves as a bridge between the JTable that forms part of the widget and
the JTree that forms another part (the table cell renderer).
The Swing JTable uses a TableModel class as its backend representation in the
MVC paradigm. In this case, the AbstractTableModel interface is extended. However the
JTree uses a TreeModel representation, and there is no common hierarchy between
the two separate representations. In order for the mouse events (et al) coming
from the JTable part of the TreeTable to reach the embedded JTree (and hence the
actual model) they need to be routed through a TableModel adapter. The adapter
provides the JTable with the proper backend interface and then translates the
methods into JTree ones.
- See Also:
-
TreeTable
AbstractTableModel
-
invalid @see
TableModel
- Serialized Form
-
Constructor Summary
ConstructorDescriptionTreeTableModelAdapter
(TreeTableModel treeTableModel, JTree tree) Instantiates a new tree table model adapter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the target configuration.void
createNewGuardBand
(String bandIdentifier, String configurationIdentifier) Creates the new guard band.void
createNewSignalBand
(String bandIdentifier, String configurationIdentifier) Creates the new signal band.void
createNewTargetConfiguration
(String identifier) Creates the new target configuration.void
deleteGuardBandFrom
(String identifier, String targetConfigurationName) Delete guard band from.void
deleteSignalBandFrom
(String id, String configName) Delete signal band from.void
deleteTargetConfiguration
(String identifier) Delete target configuration.Gets the acquisition settings.Gets the band names.int
Gets the channel map.getColumnClass
(int column) int
getColumnName
(int column) Gets the configuration dialog settings.int
getSignalBandNames
(String configIdentifier) Gets the signal band names.getTargetConfiguration
(String identifier) Gets the target configuration.getTargetConfigurationNameForAssociatedBandNode
(likelihoodDetectionModule.AssociatedBandNode n) Gets the target configuration name for associated band node.Gets the target configuration names.getValueAt
(int row, int column) boolean
isCellEditable
(int row, int column) nodeForRow
(int row) Node for row.void
Sets the configuration dialog expanded state.void
Sets the configuration dialog settings.void
setValueAt
(Object value, int row, int column) Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Constructor Details
-
TreeTableModelAdapter
Instantiates a new tree table model adapter.- Parameters:
treeTableModel
- The tree table model for the TreeTable that is being wrapped by the adapter.tree
- The actual JTree implementation that is internal to the TreeTable.
-
-
Method Details
-
getTargetConfigurationNameForAssociatedBandNode
public String getTargetConfigurationNameForAssociatedBandNode(likelihoodDetectionModule.AssociatedBandNode n) Gets the target configuration name for associated band node.- Parameters:
n
- the n- Returns:
- the target configuration name for associated band node
-
getSignalBandNames
Gets the signal band names.- Parameters:
configIdentifier
- the config identifier- Returns:
- the signal band names
-
getTargetConfigurationNames
Gets the target configuration names.- Returns:
- the target configuration names
-
createNewTargetConfiguration
Creates the new target configuration.- Parameters:
identifier
- the identifier
-
addTargetConfiguration
Adds the target configuration.- Parameters:
config
- the config
-
deleteTargetConfiguration
Delete target configuration.- Parameters:
identifier
- the identifier
-
getBandNames
Gets the band names.- Returns:
- the band names
-
createNewSignalBand
Creates the new signal band.- Parameters:
bandIdentifier
- the band identifierconfigurationIdentifier
- the configuration identifier
-
createNewGuardBand
Creates the new guard band.- Parameters:
bandIdentifier
- the band identifierconfigurationIdentifier
- the configuration identifier
-
deleteGuardBandFrom
Delete guard band from.- Parameters:
identifier
- the identifiertargetConfigurationName
- the target configuration name
-
deleteSignalBandFrom
Delete signal band from.- Parameters:
id
- the idconfigName
- the config name
-
getTargetConfiguration
Gets the target configuration.- Parameters:
identifier
- the identifier- Returns:
- the target configuration
-
getAcquisitionSettings
Gets the acquisition settings.- Returns:
- the acquisition settings
-
getTargetConfigurations
-
getChannelMap
public int getChannelMap()Gets the channel map.- Returns:
- the channel map
-
setConfigurationDialogSettings
Sets the configuration dialog settings.- Parameters:
settings
- the new configuration dialog settings
-
getConfigurationDialogSettings
Gets the configuration dialog settings.- Returns:
- the configuration dialog settings
-
setConfigurationDialogExpandedState
Sets the configuration dialog expanded state.- Parameters:
state
- the new configuration dialog expanded state
-
getColumnCount
public int getColumnCount() -
getColumnName
- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
-
getRowCount
public int getRowCount() -
nodeForRow
Node for row.- Parameters:
row
- the row- Returns:
- the object
-
getValueAt
-
isCellEditable
public boolean isCellEditable(int row, int column) - Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
setValueAt
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-