uk.ac.starlink.topcat.plot2
Class SubsetStack

java.lang.Object
  extended by uk.ac.starlink.topcat.plot2.SubsetStack

public class SubsetStack
extends 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

Constructor Summary
SubsetStack(ListModel baseModel, SubsetConfigManager subManager)
          Constructor.
 
Method Summary
 void addActionListener(ActionListener listener)
          Adds a listener to be notified when the selection list changes content or sequence.
 JComponent getComponent()
          Returns the graphical component for this stack.
 RowSubset[] getSelectedSubsets()
          Return an array of the subsets which are currently active.
 void removeActionListener(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(ListModel 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 JComponent getComponent()
Returns the graphical component for this stack.

Returns:
component

addActionListener

public void addActionListener(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(ActionListener listener)
Removes a listener previously added.

Parameters:
listener - listener to remove


Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.