Package uk.ac.starlink.topcat.plot2
Class SubsetStack
java.lang.Object
uk.ac.starlink.topcat.plot2.SubsetStack
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
ConstructorsConstructorDescriptionSubsetStack
(ListModel<RowSubset> baseModel, SubsetConfigManager subManager) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionListener
(ActionListener listener) Adds a listener to be notified when the selection list changes content or sequence.Returns the graphical component for this stack.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.
-
Constructor Details
-
SubsetStack
Constructor.- Parameters:
baseModel
- list model containing RowSubset objectssubManager
- provides per-subset configuration components
-
-
Method Details
-
getSelectedSubsets
Return an array of the subsets which are currently active.- Returns:
- subsets in list with checked checkboxes
-
setSelectedSubsets
Sets the list of active subsets.- Parameters:
rsets
- subsets in list for which checkboxes should be checked
-
setSelected
Sets the active status of a given subset.- Parameters:
rset
- row subsetisSel
- true for selected, false for unselected
-
getComponent
Returns the graphical component for this stack.- Returns:
- component
-
addActionListener
Adds a listener to be notified when the selection list changes content or sequence.- Parameters:
listener
- listener to add
-
removeActionListener
Removes a listener previously added.- Parameters:
listener
- listener to remove
-