Class TreeTableModelAdapter

java.lang.Object
javax.swing.table.AbstractTableModel
likelihoodDetectionModule.TreeTableModelAdapter
All Implemented Interfaces:
Serializable, TableModel

public class TreeTableModelAdapter extends AbstractTableModel
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:
  • Constructor Details Link icon

    • TreeTableModelAdapter Link icon

      public TreeTableModelAdapter(TreeTableModel treeTableModel, JTree tree)
      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 Link icon

    • getTargetConfigurationNameForAssociatedBandNode Link icon

      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 Link icon

      public Vector<String> getSignalBandNames(String configIdentifier)
      Gets the signal band names.
      Parameters:
      configIdentifier - the config identifier
      Returns:
      the signal band names
    • getTargetConfigurationNames Link icon

      public ArrayList<String> getTargetConfigurationNames()
      Gets the target configuration names.
      Returns:
      the target configuration names
    • createNewTargetConfiguration Link icon

      public void createNewTargetConfiguration(String identifier)
      Creates the new target configuration.
      Parameters:
      identifier - the identifier
    • addTargetConfiguration Link icon

      public void addTargetConfiguration(TargetConfiguration config)
      Adds the target configuration.
      Parameters:
      config - the config
    • deleteTargetConfiguration Link icon

      public void deleteTargetConfiguration(String identifier)
      Delete target configuration.
      Parameters:
      identifier - the identifier
    • getBandNames Link icon

      public ArrayList<String> getBandNames()
      Gets the band names.
      Returns:
      the band names
    • createNewSignalBand Link icon

      public void createNewSignalBand(String bandIdentifier, String configurationIdentifier)
      Creates the new signal band.
      Parameters:
      bandIdentifier - the band identifier
      configurationIdentifier - the configuration identifier
    • createNewGuardBand Link icon

      public void createNewGuardBand(String bandIdentifier, String configurationIdentifier)
      Creates the new guard band.
      Parameters:
      bandIdentifier - the band identifier
      configurationIdentifier - the configuration identifier
    • deleteGuardBandFrom Link icon

      public void deleteGuardBandFrom(String identifier, String targetConfigurationName)
      Delete guard band from.
      Parameters:
      identifier - the identifier
      targetConfigurationName - the target configuration name
    • deleteSignalBandFrom Link icon

      public void deleteSignalBandFrom(String id, String configName)
      Delete signal band from.
      Parameters:
      id - the id
      configName - the config name
    • getTargetConfiguration Link icon

      public TargetConfiguration getTargetConfiguration(String identifier)
      Gets the target configuration.
      Parameters:
      identifier - the identifier
      Returns:
      the target configuration
    • getAcquisitionSettings Link icon

      public AcquisitionSettings getAcquisitionSettings()
      Gets the acquisition settings.
      Returns:
      the acquisition settings
    • getTargetConfigurations Link icon

      public ArrayList<TargetConfiguration> getTargetConfigurations()
    • getChannelMap Link icon

      public int getChannelMap()
      Gets the channel map.
      Returns:
      the channel map
    • setConfigurationDialogSettings Link icon

      public void setConfigurationDialogSettings(ConfigurationDialogSettings settings)
      Sets the configuration dialog settings.
      Parameters:
      settings - the new configuration dialog settings
    • getConfigurationDialogSettings Link icon

      public ConfigurationDialogSettings getConfigurationDialogSettings()
      Gets the configuration dialog settings.
      Returns:
      the configuration dialog settings
    • setConfigurationDialogExpandedState Link icon

      public void setConfigurationDialogExpandedState(String state)
      Sets the configuration dialog expanded state.
      Parameters:
      state - the new configuration dialog expanded state
    • getColumnCount Link icon

      public int getColumnCount()
    • getColumnName Link icon

      public String getColumnName(int column)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
    • getColumnClass Link icon

      public Class getColumnClass(int column)
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
    • getRowCount Link icon

      public int getRowCount()
    • nodeForRow Link icon

      public Object nodeForRow(int row)
      Node for row.
      Parameters:
      row - the row
      Returns:
      the object
    • getValueAt Link icon

      public Object getValueAt(int row, int column)
    • isCellEditable Link icon

      public boolean isCellEditable(int row, int column)
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
    • setValueAt Link icon

      public void setValueAt(Object value, int row, int column)
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel