java.io.Serializable
, javax.swing.ListModel
public class ControlStackModel
extends javax.swing.AbstractListModel
Control
objects.Constructor | Description |
---|---|
ControlStackModel() |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addControl(Control control) |
Adds a control to this model.
|
void |
addPlotActionListener(java.awt.event.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.
|
java.lang.Object |
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(java.awt.event.ActionListener listener) |
Removes a listener previously added.
|
void |
setControlActive(Control control,
boolean isActive) |
Sets the activeness of a control in this stack.
|
public java.lang.Object 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(java.awt.event.ActionListener listener)
listener
- listener to addpublic void removePlotActionListener(java.awt.event.ActionListener listener)
listener
- listener to removeCopyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.