Package com.reportmill.shape
Class RMPage
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.shape.RMShape
com.reportmill.shape.RMPage
- All Implemented Interfaces:
- RMArchiver.Archiving,- Cloneable
- Direct Known Subclasses:
- RBPage
The RMPage class represents an individual page in an RMDocument. For the most part, it's like every other RMShape,
 except that it has the ability to break children into "layers" for more convenient editing. Layers are sub-ranges of
 children that can be set to be invisible or locked. An RMPage also has its own child animator.
 
It's not common for developers to use much or RMPage's unique functionality programmatically, however, you might use it briefly when disecting a template like this:
   RMDocument template = new RMDocument(aSource);
   RMPage page = template.getPage(0);
   RMTable table = page.getChildWithName("MyTable");
   ...
 Or you might use it briefly when adding pages to a document (which comes with one by default):
   RMDocument template = new RMDocument(612, 792);
   template.getPage(0).addChild(new RMText(new RXString("Hello Page 1!", RMFont("Arial", 100))));
   template.addPage(new RMPage());
   template.getPage(1).addChild(new RMText(new RXString("Hello Page 2!", RMFont("Arial", 100))));
 - 
Field SummaryFields inherited from class com.reportmill.shape.RMShapeWRAP_TYPE_BOTH, WRAP_TYPE_NONE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanEditor method - indicates that page supports added children.voidAdd the given child at the given index (over-rides RMShape version to propogate to RMPageLayer).voidaddLayerNamed(String aString) Creates a new layer with the given name and adds it to this page's layer list.voidbringShapesToFront(List shapes) Overrides shape implementation to keep shapes in their proper layers.clone()Standard clone method.voidCopies the attributes from the given object.booleanStandard equals method.fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.getChildAnimator(boolean create) Returns the child animator associated with this page, creating one if it doesn't exist (if requested).Returns a list of children which should be drawn (since page layers can be configured to prevent chilren on individual layers from being visible).Returns a list of children which should be checked during shape hit detection (since page layers can be configured to prevent chilren on individual layers from being selected).getLayer(int index) Returns the layer at the given index.Returns the layer with the given name.intReturns the number of layers associated with this page.Overrides shape implementation to return this page, since it is the page shape.Returns the selected layer.intReturns the index of the selected layer.initWithArchiver(RMArchiver anArchiver) Legacy unarchival.voidmoveLayer(int fromIndex, int toIndex) Moves the layer at fromIndex to toIndex.voidmoveToNewLayer(List shapes) Creates a new layer and adds the shapes in the given list to it.intpage()Returns the "Page" number of this page (used to resolve @Page@ key references).intReturns "PageBreakMax" (used to resolve PageBreakMax key references).intReturns "PageBreakPageMax" for all children on this page (used to resolve PageBreakPageMax key references).intpageMax()Returns the "PageMax" of the document associated with this page (used to resolve @PageMax@ key references).voidremoveChild(int index) Removes the child at the given index (over-rides RMShape version to propogate to RMPageLayer).voidremoveLayer(RMPageLayer aLayer) Removes the given layer (and dumps its children into the preceeding layer).voidResets this page's list of layers to a single, selecctable layer named "Layer 1".rpgClone(ReportMill rm) A custom version of the clone method, which returns a report generated clone.voidselectLayer(RMPageLayer aLayer) Selects the given layer.voidselectLayer(String aString) Selects the layer with the given name.voidsendShapesToBack(List shapes) Overrides shape implementation to keep shapes in their proper layers.booleanEditor method - indicates that pages can be super-selected.toXML(RXArchiver anArchiver) XML archival.A custom version of the clone method, specific for undo tracking.Methods inherited from class com.reportmill.shape.RMShapeacceptsDragKeys, acceptsFormat, acceptsMouse, addChild, addChildBelowLastChild, bounds, boundsChanged, boundsChanged, canBeUngrouped, childrenSuperSelectImmediately, cloneDeep, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedSizeFromShape, convertedSizeToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertSizeFromShape, convertSizeToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, delete, didChange, divideShapeFromEdge, divideShapeFromTop, dragExit, dragKeyAtPoint, dropKeyAtPoint, fromXMLDeep, get, getActionScript, getAnim, getAnim, getAnimator, getAnimator, getAutosizeHeight, getAutosizing, getBounds, getBoundsInside, getBoundsMarked, getBoundsOfChildren, getBoundsOfChildren, getBoundsSuperSelected, getCausesWrap, getCausesWrapType, getChild, getChildAnimator, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWhoCauseWrap, getChildSortedByX, getChildWithClass, getChildWithName, getColor, getCommonAncestor, getDocument, getFill, getFill, getFill, getFillCount, getFills, getFont, getFormat, getFrame, getFrame, getFrameMaxX, getFrameMaxY, getFrameX, getFrameXY, getFrameY, getGroupShape, getHeight, getHeightToFit, getImageFill, getLineWidth, getListKey, getListKeyDeep, getListKeyShape, getMaxX, getMaxY, getName, getOpacity, getOpacityDeep, getOutline, getPageCount, getParent, getParentCount, getParents, getPath, getPathInBounds, getPropertyKey, getPropertyKeyCount, getPropertyKeyName, getRoll, getRootShape, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSizeP, getSkewX, getSkewY, getStroke, getStrokeColor, getTextColor, getToolClassName, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getUrl, getWidth, getWidthToFit, getX, getXY, getXYP, getY, groupShapes, hasPageBreaks, height, indexOf, indexOf, intersects, isAncestor, isDescendant, isLocked, isRoot, isUnderlined, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, notRSS, offsetChildrenXY, offsetXY, put, putPropertyKey, reclaimChildren, removeChild, removeChildren, removeChildren, removeFromParent, resolvePageReferences, rpgCloneBase, rpgCloneChildren, rpgCloneConclude, rpgCloneNotification, rpgClonePrepare, rpgClonePreprocess, rpgCloneUrl, setActionScript, setAnim, setAutosizeHeight, setAutosizing, setBounds, setBounds, setCausesWrapType, setChildren, setColor, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHeight, setHeightDeep, setHeightDeep, setHeightToFit, setLineWidth, setListKey, setLocked, setName, setNeedsRepaint, setNeedsRepaint, setOpacity, setOutline, setParent, setRoll, setScaleX, setScaleXY, setScaleY, setSize, setSize, setSizeDeep, setSizeP, setSizeToFit, setSizeToFit, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setTextColor, setTime, setUnderlined, setUrl, setWidth, setWidthDeep, setWidthDeep, setWidthToFit, setX, setXY, setXY, setXYP, setY, sizesToFitChildren, toString, undoCopy, undoEquals, undoerAddDirtyObject, undoerDisable, undoerEnable, undoerSetUndoTitle, width, willChange, willChange, x, yMethods inherited from class com.reportmill.base.RMObjectdidUndo, getAnimAttribute, getClassNameShort
- 
Constructor Details- 
RMPagepublic RMPage()Creates a plain empty page.
 
- 
- 
Method Details- 
getLayerCountpublic int getLayerCount()Returns the number of layers associated with this page.
- 
getLayerReturns the layer at the given index.
- 
getLayerReturns the layer with the given name.
- 
addLayerNamedCreates a new layer with the given name and adds it to this page's layer list.
- 
removeLayerRemoves the given layer (and dumps its children into the preceeding layer).
- 
moveLayerpublic void moveLayer(int fromIndex, int toIndex) Moves the layer at fromIndex to toIndex.
- 
getSelectedLayerIndexpublic int getSelectedLayerIndex()Returns the index of the selected layer.
- 
getSelectedLayerReturns the selected layer.
- 
selectLayerSelects the given layer.
- 
selectLayerSelects the layer with the given name.
- 
resetLayerspublic void resetLayers()Resets this page's list of layers to a single, selecctable layer named "Layer 1".
- 
addChildAdd the given child at the given index (over-rides RMShape version to propogate to RMPageLayer).
- 
removeChildpublic void removeChild(int index) Removes the child at the given index (over-rides RMShape version to propogate to RMPageLayer).- Overrides:
- removeChildin class- RMShape
 
- 
bringShapesToFrontOverrides shape implementation to keep shapes in their proper layers.- Overrides:
- bringShapesToFrontin class- RMShape
 
- 
sendShapesToBackOverrides shape implementation to keep shapes in their proper layers.- Overrides:
- sendShapesToBackin class- RMShape
 
- 
moveToNewLayerCreates a new layer and adds the shapes in the given list to it.
- 
getChildrenWhoDrawReturns a list of children which should be drawn (since page layers can be configured to prevent chilren on individual layers from being visible).- Overrides:
- getChildrenWhoDrawin class- RMShape
 
- 
getChildrenWhoHitTestReturns a list of children which should be checked during shape hit detection (since page layers can be configured to prevent chilren on individual layers from being selected).- Overrides:
- getChildrenWhoHitTestin class- RMShape
 
- 
getPageShapeOverrides shape implementation to return this page, since it is the page shape.- Overrides:
- getPageShapein class- RMShape
 
- 
getChildAnimatorReturns the child animator associated with this page, creating one if it doesn't exist (if requested).- Overrides:
- getChildAnimatorin class- RMShape
 
- 
rpgCloneA custom version of the clone method, which returns a report generated clone.
- 
pagepublic int page()Returns the "Page" number of this page (used to resolve @Page@ key references).
- 
pageMaxpublic int pageMax()Returns the "PageMax" of the document associated with this page (used to resolve @PageMax@ key references).
- 
pageBreakMaxpublic int pageBreakMax()Returns "PageBreakMax" (used to resolve PageBreakMax key references).- Overrides:
- pageBreakMaxin class- RMShape
 
- 
pageBreakPageMaxpublic int pageBreakPageMax()Returns "PageBreakPageMax" for all children on this page (used to resolve PageBreakPageMax key references).- Overrides:
- pageBreakPageMaxin class- RMShape
 
- 
cloneStandard clone method.
- 
undoCloneA custom version of the clone method, specific for undo tracking.
- 
copyCopies the attributes from the given object.
- 
equalsStandard equals method.
- 
toXMLXML archival.
- 
fromXMLXML unarchival.
- 
initWithArchiverLegacy unarchival.- Specified by:
- initWithArchiverin interface- RMArchiver.Archiving
- Overrides:
- initWithArchiverin class- RMShape
 
- 
acceptsChildrenpublic boolean acceptsChildren()Editor method - indicates that page supports added children.- Overrides:
- acceptsChildrenin class- RMShape
 
- 
superSelectablepublic boolean superSelectable()Editor method - indicates that pages can be super-selected.- Overrides:
- superSelectablein class- RMShape
 
 
-