Class SubsetQueryWindow

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
IntegerSubsetQueryWindow

public class SubsetQueryWindow extends QueryWindow
A dialogue window which obtains information to define a new Row Subset and then appends it to the subsets list.
Since:
28 Sep 2006
Author:
Mark Taylor
See Also:
  • Constructor Details

    • SubsetQueryWindow

      protected SubsetQueryWindow(TopcatModel tcModel, Component parent, String title)
      Constructs a new query window, which on user completion will try to construct a new synthetic RowSubset and add it to the list.
      Parameters:
      tcModel - model containing the table data
      parent - the parent window for this dialogue (used for window positioning)
      title - window title
  • Method Details

    • getNameField

      public JComponent getNameField()
      Returns the component with which the user selects the name of the new subset.
      Returns:
      name field
    • setSelectedName

      public void setSelectedName(String name)
      Sets the name of the RowSubset which the action of this window will be to create (or replace).
      Parameters:
      name - subset name
    • getExpressionField

      public JTextField getExpressionField()
      Returns the text component used to store the algebraic expression for the new subset.
      Returns:
      expression field
    • createSubset

      protected SyntheticRowSubset createSubset()
      Attempts to construct a RowSubset based on the state of this window. If the state does not describe a subset, the user is informed via a JOptionPane popup and null is returned.
      Returns:
      new subset, or null
    • perform

      protected boolean perform()
      Description copied from class: QueryWindow
      This method will be invoked when the OK button is pushed or the user otherwise indicates that he has filled in the form.
      Specified by:
      perform in class QueryWindow
      Returns:
      true if the action is complete in some sense. The window will be disposed if true is returned, otherwise it will remain posted.
    • newSubsetDialog

      public static SubsetQueryWindow newSubsetDialog(TopcatModel tcModel, Component parent)
      Constructs a new query window, which on user completion will try to construct a new synthetic RowSubset and add it to the list.
      Parameters:
      tcModel - model containing the table data
      parent - the parent window for this dialogue (used for window positioning)
    • editSubsetDialog

      public static SubsetQueryWindow editSubsetDialog(TopcatModel tcModel, Component parent, int iset)
      Returns a window that allows editing the expression (where applicable) and name of an existing RowSubset.
      Parameters:
      tcModel - topcat model
      parent - parent window for positioning
      iset - index of subset to edit
      Returns:
      window ready for user interaction