public class ControlStackModel extends AbstractListModel<Control>
Control
objects.listenerList
Constructor and Description |
---|
ControlStackModel()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addControl(Control control)
Adds a control to this model.
|
void |
addPlotActionListener(ActionListener listener)
Adds a listener which will be notified if this stack's state changes
in such a way that the plot might be affected.
|
Control |
getControlAt(int ix)
Returns the control at a given index in this list.
|
Control |
getElementAt(int ix) |
LayerControl[] |
getLayerControls(boolean activeOnly)
Returns a list of the controls which can contribute layers to the plot,
that is LayerControls.
|
int |
getSize() |
boolean |
isControlActive(Control control)
Indicates whether a given control is marked as active in this stack.
|
void |
moveControl(int iFrom,
int iTo)
Relocates a control in this list.
|
void |
removeControl(Control control)
Removes a control from this model.
|
void |
removePlotActionListener(ActionListener listener)
Removes a listener previously added.
|
void |
setControlActive(Control control,
boolean isActive)
Sets the activeness of a control in this stack.
|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
public Control getElementAt(int ix)
public int getSize()
public Control getControlAt(int ix)
ix
- list indexpublic boolean isControlActive(Control control)
control
- controlpublic void setControlActive(Control control, boolean isActive)
control
- controlisActive
- true iff activepublic LayerControl[] getLayerControls(boolean activeOnly)
activeOnly
parameter is set, it is restricted
further to controls which are currently marked as active and
which are known to contribute at least one layer.activeOnly
- if true, return only controls contributing layers;
if false, return allpublic void addControl(Control control)
control
- new controlpublic void removeControl(Control control)
control
- previously added controlpublic void moveControl(int iFrom, int iTo)
iFrom
- source list indexiTo
- destination list indexpublic void addPlotActionListener(ActionListener listener)
listener
- listener to addpublic void removePlotActionListener(ActionListener listener)
listener
- listener to removeCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.