Package com.inductiveautomation.rm.shape
Class RMPageLayer
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.shape.RMPageLayer
- All Implemented Interfaces:
RMPropertyChanger
,Cloneable
This class represents a page layer, a standard feature of page layout applications that lets you manage the children
of a page as separate groups, so that some can be made unselectable or invisible to ease template editing.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a plain layer.RMPageLayer
(RMPage aPage, String aName) Creates a page layer for a given page and name. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a child to this layer.void
Adds a child to this layer at the given index.void
addChildren
(List<RMShape> theShapes) Adds a list of children to this layer.void
bringShapesToFront
(List shapes) Moves the shapes specified in the given list to the front of this layer's list of shapes.clone()
Standard clone implementation.getChild
(int anIndex) Returns the specific child of this layer at the given index.int
Returns the number of children in this layer.int
getChildIndex
(RMShape aChild) Returns the index of a given child.Returns the list of children for this layer.int
getIndex()
Returns the index of this layer in its page.int
Returns the state of this layer (locked, visible, invisible).getName()
Returns the layer's name.getPage()
Returns the page associated with this layer.int
Returns the index of this layer's first child in the page.boolean
isLocked()
Returns whether this layer is editable.boolean
Sets whether this layer is selectable.boolean
Returns whether this layer is to be drawn.removeChild
(int anIndex) Removes a child from this layer.int
removeChild
(RMShape aChild) Removes a child from this layer.void
Removes all children from this layer.void
removeChildren
(List<RMShape> theShapes) Removes a list of children from this layer.void
sendShapesToBack
(List shapes) Moves the shapes specified in the given list to the back of this layer's list of shapes.void
setLayerState
(int aState) Returns the state of this layer (locked, visible, invisible).void
setLocked
(boolean aFlag) Sets whether this layer is editable.void
Sets the layer's name.void
setVisible
(boolean aFlag) Sets whether this layer is to be drawn.Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toString
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Field Details
-
StateVisible
public static final int StateVisible- See Also:
-
StateInvisible
public static final int StateInvisible- See Also:
-
StateLocked
public static final int StateLocked- See Also:
-
-
Constructor Details
-
RMPageLayer
public RMPageLayer()Creates a plain layer. -
RMPageLayer
Creates a page layer for a given page and name.
-
-
Method Details
-
getPage
Returns the page associated with this layer. -
getName
Returns the layer's name. -
setName
Sets the layer's name. -
isVisible
public boolean isVisible()Returns whether this layer is to be drawn. -
setVisible
public void setVisible(boolean aFlag) Sets whether this layer is to be drawn. -
isLocked
public boolean isLocked()Returns whether this layer is editable. -
setLocked
public void setLocked(boolean aFlag) Sets whether this layer is editable. -
isSelectable
public boolean isSelectable()Sets whether this layer is selectable. -
getLayerState
public int getLayerState()Returns the state of this layer (locked, visible, invisible). -
setLayerState
public void setLayerState(int aState) Returns the state of this layer (locked, visible, invisible). -
getChildCount
public int getChildCount()Returns the number of children in this layer. -
getChild
Returns the specific child of this layer at the given index. -
getChildren
Returns the list of children for this layer. -
addChild
Adds a child to this layer. -
addChild
Adds a child to this layer at the given index. -
removeChild
Removes a child from this layer. -
removeChild
Removes a child from this layer. -
addChildren
Adds a list of children to this layer. -
removeChildren
Removes a list of children from this layer. -
removeChildren
public void removeChildren()Removes all children from this layer. -
getIndex
public int getIndex()Returns the index of this layer in its page. -
getChildIndex
Returns the index of a given child. -
getPageChildIndex
public int getPageChildIndex()Returns the index of this layer's first child in the page. -
bringShapesToFront
Moves the shapes specified in the given list to the front of this layer's list of shapes. -
sendShapesToBack
Moves the shapes specified in the given list to the back of this layer's list of shapes. -
clone
Standard clone implementation.- Overrides:
clone
in classRMListenerList
-