Class RMPageLayer

java.lang.Object
com.reportmill.base.RMObject
com.reportmill.shape.RMPageLayer
All Implemented Interfaces:
RMArchiver.Archiving, 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 Details

    • StateVisible

      public static int StateVisible
    • StateInvisible

      public static int StateInvisible
    • StateLocked

      public static int StateLocked
  • Constructor Details

    • RMPageLayer

      public RMPageLayer()
      Creates a plain layer.
    • RMPageLayer

      public RMPageLayer(RMPage page, String name)
      Creates a page layer for a given page and name.
  • Method Details

    • 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 String getName()
      Returns the layer's name.
    • setName

      public void setName(String aName)
      Sets the layer's name.
    • getChildren

      public List getChildren()
      Returns the list of children for this layer.
    • setChildren

      public void setChildren(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(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(List someChildren)
      Removes a list of children from this layer.
    • removeChildren

      public void removeChildren()
      Removes all children from this layer.
    • bringShapesToFront

      public void bringShapesToFront(List shapes)
      Moves the shapes specified in the given list to the front of this layer's list of shapes.
    • sendShapesToBack

      public void sendShapesToBack(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(Object anObj)
      Standard equals implementation.
      Overrides:
      equals in class Object
    • clone

      public Object clone()
      Standard clone implementation.
      Overrides:
      clone in class RMObject
    • copy

      public void copy(Object anObj)
      Standard copy implementation.
      Overrides:
      copy in class RMObject
    • willChange

      public void willChange()
      Indicates that this layer will change.
    • initWithArchiver

      public Object initWithArchiver(RMArchiver anArchiver)
      Legacy unarchival.
      Specified by:
      initWithArchiver in interface RMArchiver.Archiving
      Overrides:
      initWithArchiver in class RMObject