Class SubsetStack


  • public class SubsetStack
    extends java.lang.Object
    Provides a panel with a list of subsets and a configuration panel for each one. The list is selectable and the configuration panel for the currently selected subset is shown. The list of subsets is a CheckBoxList, so has selection boxes and drag handles.
    Since:
    14 Mar 2013
    Author:
    Mark Taylor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addActionListener​(java.awt.event.ActionListener listener)
      Adds a listener to be notified when the selection list changes content or sequence.
      javax.swing.JComponent getComponent()
      Returns the graphical component for this stack.
      RowSubset[] getSelectedSubsets()
      Return an array of the subsets which are currently active.
      void removeActionListener​(java.awt.event.ActionListener listener)
      Removes a listener previously added.
      void setSelected​(RowSubset rset, boolean isSel)
      Sets the active status of a given subset.
      void setSelectedSubsets​(RowSubset[] rsets)
      Sets the list of active subsets.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SubsetStack

        public SubsetStack​(javax.swing.ListModel<RowSubset> baseModel,
                           SubsetConfigManager subManager)
        Constructor.
        Parameters:
        baseModel - list model containing RowSubset objects
        subManager - provides per-subset configuration components
    • Method Detail

      • getSelectedSubsets

        public RowSubset[] getSelectedSubsets()
        Return an array of the subsets which are currently active.
        Returns:
        subsets in list with checked checkboxes
      • setSelectedSubsets

        public void setSelectedSubsets​(RowSubset[] rsets)
        Sets the list of active subsets.
        Parameters:
        rsets - subsets in list for which checkboxes should be checked
      • setSelected

        public void setSelected​(RowSubset rset,
                                boolean isSel)
        Sets the active status of a given subset.
        Parameters:
        rset - row subset
        isSel - true for selected, false for unselected
      • getComponent

        public javax.swing.JComponent getComponent()
        Returns the graphical component for this stack.
        Returns:
        component
      • addActionListener

        public void addActionListener​(java.awt.event.ActionListener listener)
        Adds a listener to be notified when the selection list changes content or sequence.
        Parameters:
        listener - listener to add
      • removeActionListener

        public void removeActionListener​(java.awt.event.ActionListener listener)
        Removes a listener previously added.
        Parameters:
        listener - listener to remove