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,java.lang.Cloneable
public class RMPageLayer extends RMObject
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
Fields Modifier and Type Field Description static intStateInvisiblestatic intStateLockedstatic intStateVisible
-
Constructor Summary
Constructors Constructor Description RMPageLayer()Creates a plain layer.RMPageLayer(RMPage aPage, java.lang.String aName)Creates a page layer for a given page and name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(RMShape aChild)Adds a child to this layer.voidaddChild(RMShape aChild, int anIndex)Adds a child to this layer at the given index.voidaddChildren(java.util.List<RMShape> theShapes)Adds a list of children to this layer.voidbringShapesToFront(java.util.List shapes)Moves the shapes specified in the given list to the front of this layer's list of shapes.java.lang.Objectclone()Standard clone implementation.RMShapegetChild(int anIndex)Returns the specific child of this layer at the given index.intgetChildCount()Returns the number of children in this layer.intgetChildIndex(RMShape aChild)Returns the index of a given child.java.util.List<RMShape>getChildren()Returns the list of children for this layer.intgetIndex()Returns the index of this layer in its page.intgetLayerState()Returns the state of this layer (locked, visible, invisible).java.lang.StringgetName()Returns the layer's name.RMPagegetPage()Returns the page associated with this layer.intgetPageChildIndex()Returns the index of this layer's first child in the page.booleanisLocked()Returns whether this layer is editable.booleanisSelectable()Sets whether this layer is selectable.booleanisVisible()Returns whether this layer is to be drawn.java.lang.ObjectremoveChild(int anIndex)Removes a child from this layer.intremoveChild(RMShape aChild)Removes a child from this layer.voidremoveChildren()Removes all children from this layer.voidremoveChildren(java.util.List<RMShape> theShapes)Removes a list of children from this layer.voidsendShapesToBack(java.util.List shapes)Moves the shapes specified in the given list to the back of this layer's list of shapes.voidsetLayerState(int aState)Returns the state of this layer (locked, visible, invisible).voidsetLocked(boolean aFlag)Sets whether this layer is editable.voidsetName(java.lang.String aName)Sets the layer's name.voidsetVisible(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 Detail
-
StateVisible
public static final int StateVisible
- See Also:
- Constant Field Values
-
StateInvisible
public static final int StateInvisible
- See Also:
- Constant Field Values
-
StateLocked
public static final int StateLocked
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RMPageLayer
public RMPageLayer()
Creates a plain layer.
-
RMPageLayer
public RMPageLayer(RMPage aPage, java.lang.String aName)
Creates a page layer for a given page and name.
-
-
Method Detail
-
getPage
public RMPage getPage()
Returns the page associated with this layer.
-
getName
public java.lang.String getName()
Returns the layer's name.
-
setName
public void setName(java.lang.String aName)
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
public RMShape getChild(int anIndex)
Returns the specific child of this layer at the given index.
-
getChildren
public java.util.List<RMShape> getChildren()
Returns the list of children for this layer.
-
addChild
public void addChild(RMShape aChild)
Adds a child to this layer.
-
addChild
public void addChild(RMShape aChild, int anIndex)
Adds a child to this layer at the given index.
-
removeChild
public java.lang.Object removeChild(int anIndex)
Removes a child from this layer.
-
removeChild
public int removeChild(RMShape aChild)
Removes a child from this layer.
-
addChildren
public void addChildren(java.util.List<RMShape> theShapes)
Adds a list of children to this layer.
-
removeChildren
public void removeChildren(java.util.List<RMShape> theShapes)
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
public int getChildIndex(RMShape aChild)
Returns the index of a given child.
-
getPageChildIndex
public int getPageChildIndex()
Returns the index of this layer's first child in the page.
-
bringShapesToFront
public void bringShapesToFront(java.util.List shapes)
Moves the shapes specified in the given list to the front of this layer's list of shapes.
-
sendShapesToBack
public void sendShapesToBack(java.util.List shapes)
Moves the shapes specified in the given list to the back of this layer's list of shapes.
-
clone
public java.lang.Object clone()
Standard clone implementation.- Overrides:
clonein classRMListenerList
-
-