Package com.reportmill.shape
Class RMPageLayer
- java.lang.Object
-
- com.reportmill.base.RMObject
-
- com.reportmill.shape.RMPageLayer
-
- All Implemented Interfaces:
RMArchiver.Archiving
,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 int
StateInvisible
static int
StateLocked
static int
StateVisible
-
Constructor Summary
Constructors Constructor Description RMPageLayer()
Creates a plain layer.RMPageLayer(RMPage page, java.lang.String name)
Creates a page layer for a given page and name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(RMShape aChild)
Adds a child to this layer.void
addChild(RMShape aChild, int anIndex)
Adds a child to this layer at the given index.void
addChildren(java.util.List list)
Adds a list of children to this layer.void
bringShapesToFront(java.util.List shapes)
Moves the shapes specified in the given list to the front of this layer's list of shapes.java.lang.Object
clone()
Standard clone implementation.void
copy(java.lang.Object anObj)
Standard copy implementation.boolean
equals(java.lang.Object anObj)
Standard equals implementation.RMShape
getChild(int anIndex)
Returns the specific child of this layer at the given index.int
getChildCount()
Returns the number of children in this layer.java.util.List
getChildren()
Returns the list of children for this layer.int
getIndex()
Returns the index of this layer in its page.int
getLayerState()
Returns the state of this layer (locked, visible, invisible).java.lang.String
getName()
Returns the layer's name.RMPage
getPage()
Returns the page associated with this layer.java.lang.Object
initWithArchiver(RMArchiver anArchiver)
Legacy unarchival.boolean
isLocked()
Returns whether this layer is editable.boolean
isSelectable()
Sets whether this layer is selectable.boolean
isVisible()
Returns whether this layer is to be drawn.void
removeChild(RMShape aChild)
Removes a child from this layer.void
removeChildren()
Removes all children from this layer.void
removeChildren(java.util.List someChildren)
Removes a list of children from this layer.void
sendShapesToBack(java.util.List shapes)
Moves the shapes specified in the given list to the back of this layer's list of shapes.void
setChildren(java.util.List aList)
Sets the list of children for this layer.void
setLayerState(int aState)
Returns the state of this layer (locked, visible, invisible).void
setLocked(boolean aFlag)
Sets whether this layer is editable.void
setName(java.lang.String aName)
Sets the layer's name.void
setVisible(boolean aFlag)
Sets whether this layer is to be drawn.void
willChange()
Indicates that this layer will change.-
Methods inherited from class com.reportmill.base.RMObject
didChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
-
-
-
-
Constructor Detail
-
RMPageLayer
public RMPageLayer()
Creates a plain layer.
-
RMPageLayer
public RMPageLayer(RMPage page, java.lang.String name)
Creates a page layer for a given page and name.
-
-
Method Detail
-
getPage
public RMPage getPage()
Returns the page associated with this layer.
-
getIndex
public int getIndex()
Returns the index of this layer in its page.
-
getName
public java.lang.String getName()
Returns the layer's name.
-
setName
public void setName(java.lang.String aName)
Sets the layer's name.
-
getChildren
public java.util.List getChildren()
Returns the list of children for this layer.
-
setChildren
public void setChildren(java.util.List aList)
Sets the list of children for this layer.
-
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.
-
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.
-
addChildren
public void addChildren(java.util.List list)
Adds a list of children to this layer.
-
removeChild
public void removeChild(RMShape aChild)
Removes a child from this layer.
-
removeChildren
public void removeChildren(java.util.List someChildren)
Removes a list of children from this layer.
-
removeChildren
public void removeChildren()
Removes all children from this layer.
-
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.
-
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).
-
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.
-
equals
public boolean equals(java.lang.Object anObj)
Standard equals implementation.- Overrides:
equals
in classjava.lang.Object
-
clone
public java.lang.Object clone()
Standard clone implementation.
-
copy
public void copy(java.lang.Object anObj)
Standard copy implementation.
-
willChange
public void willChange()
Indicates that this layer will change.
-
initWithArchiver
public java.lang.Object initWithArchiver(RMArchiver anArchiver)
Legacy unarchival.- Specified by:
initWithArchiver
in interfaceRMArchiver.Archiving
- Overrides:
initWithArchiver
in classRMObject
-
-