Class TupleSelector

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class TupleSelector extends JPanel
Component which allows the user to select table columns corresponding to a given set of the tuple elements required for a given array of column metadata descriptions.
Since:
17 Mar 2004
Author:
Mark Taylor (Starlink)
See Also:
  • Constructor Details

    • TupleSelector

      public TupleSelector(uk.ac.starlink.table.ValueInfo[] infos)
      Constructor.
      Parameters:
      infos - metadata descriptors for each value required
  • Method Details

    • getEffectiveTable

      public uk.ac.starlink.table.StarTable getEffectiveTable()
      Returns the effective table described by this panel. This is based on the table selected in the table selection box, but containing only those columns in the argument selection box(es). The returned table is an effective view of a snapshot of the Apparent Table, which is to say that its rows are permuted according to the current sort order and selection.
      Returns:
      effective table selected by the user in this panel
      Throws:
      IllegalStateException - with a sensible message if the user hasn't properly specified a table
    • getTable

      public TopcatModel getTable()
      Returns the currently selected table.
      Returns:
      topcat model of the currently selected table
    • getTupleExpressions

      public String[] getTupleExpressions()
      Returns the string values currently entered for the tuple elements. These are column names or JEL expressions.
      Returns:
      an array of string values entered by the user representing the tuple values
    • getStiltsTupleExpressions

      public String[] getStiltsTupleExpressions(uk.ac.starlink.table.join.HumanMatchEngine matcher)
      Returns expressions suitable for use with a HumanMatchEngine. The expressions are as supplied, but expressions for angular quantities are converted to stilts-friendly ones (usually from radians to degrees or arcsec).
      Parameters:
      matcher - matcher that uses human-friendly units
      Returns:
      array of expressions, one for each selector
    • addActionListener

      public void addActionListener(ActionListener l)
      Adds a listener to be informed if the tuple values change.
      Parameters:
      l - listener to add
    • removeActionListener

      public void removeActionListener(ActionListener l)
      Removes a listener for tuple value changes.
      Parameters:
      l - listener to remove