Class AxisDataSelector

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class AxisDataSelector extends JPanel
Graphical component allowing selection of one or more columns required for plotting data along one axis of a graph. The principal column is the one which defines the centre of the plotted points along the axis in question, but additional ones may be required according to whether error bars will be drawn.
Since:
23 Feb 2007
Author:
Mark Taylor
See Also:
  • Constructor Details

    • AxisDataSelector

      public AxisDataSelector(String axisName, String[] toggleNames, ToggleButtonModel[] toggleModels)
      Constructor.
      Parameters:
      axisName - name of the axis, used for user labels
      toggleNames - names of an array of toggle buttons to be displayed in this component
      toggleModels - toggle button models to be displayed in this component (same length as toggleNames)
  • Method Details

    • addActionListener

      public void addActionListener(ActionListener listener)
      Adds an action listener.
      Parameters:
      listener - action listener
    • removeActionListener

      public void removeActionListener(ActionListener listener)
      Removes an action listener.
      Parameters:
      listener - action listener
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent
    • getMainSelector

      public JComboBox getMainSelector()
      Returns the main column selector associated with this selector. This is the one which defines the centre of the plotted points.
      Returns:
      principal column selector
    • getErrorSelectors

      public JComboBox[] getErrorSelectors()
      Returns the currently displayed column selectors which provide error information. Which these are will depend on the current error mode.
      Returns:
      displayed selectors apart from the main one
    • setErrorMode

      public void setErrorMode(uk.ac.starlink.ttools.plot.ErrorMode errorMode)
      Sets the error mode. This controls which column selectors are displayed.
      Parameters:
      errorMode - error mode
    • setTable

      public void setTable(TopcatModel tcModel)
      Configures this component for a given table, populating the column selectors accordingly.
      Parameters:
      tcModel - new table (may be null)
    • getSelectors

      public JComboBox[] getSelectors()
      Returns an array of all the column selectors which may be displayed by this component.
      Returns:
      array of combo boxes