|
ReportMill 7.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.reportmill.foundation.RMObject
com.reportmill.shape.RMShape
com.reportmill.shape.RMPage
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 Summary | |
com.reportmill.graphics.RMAnimator |
_childAnimator
|
java.util.List |
_layers
|
| Fields inherited from class com.reportmill.shape.RMShape |
HandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth |
| Constructor Summary | |
RMPage()
Creates a plain empty page. |
|
| Method Summary | |
boolean |
acceptsChildren()
This RMEditor support method tells the editor that page supports added children. |
void |
addChild(RMShape child,
int index)
Add the given child at the given index (over-rides RMShape version to propogate to RMPageLayer). |
void |
addLayerNamed(java.lang.String aString)
Creates a new layer with the given name and adds it to this page's layer list. |
void |
bringShapesToFront(java.util.List shapes)
Brings the shapes in the given list to the front of the children list. |
java.lang.Object |
clone()
Standard clone method. |
void |
copy(com.reportmill.foundation.RMObject anObj)
Copies the attributes from the given object. |
java.util.List |
drawChildren()
Returns a list of children which should be drawn (since page layers can be configured to prevent chilren on individual layers from being visible). |
boolean |
equals(java.lang.Object anObj)
Standard equals method. |
java.lang.Object |
fromXML(com.ribs.RXArchiver anArchiver,
com.ribs.RXElement anElement)
XML unarchival. |
com.reportmill.graphics.RMAnimator |
getChildAnimator(boolean create)
Over-rides the RMShape implementation to return the child animator that is associated with this page, creating one if it doesn't exist (if requested). |
RMDocument |
getDocument()
Returns the document that this page is associated with. |
com.reportmill.shape.RMPageLayer |
getLayer(int index)
Returns the layer at the given index. |
int |
getLayerCount()
Returns the number of layers associated with this page. |
com.reportmill.shape.RMPageLayer |
getLayerNamed(java.lang.String aString)
Returns the layer with the given name. |
RMShape |
getPageShape()
This method over-rides the RMShape implementation to return the receiver, indicating that it it is a page shape. |
com.reportmill.shape.RMPageLayer |
getSelectedLayer()
Returns the selected layer. |
int |
getSelectedLayerIndex()
Returns the index of the selected layer. |
int |
handleAtPoint(RMPoint point,
boolean isSuperSelected)
This RMEditor support method tells the editor that page's resize handles don't exist. |
java.util.List |
hitChildren()
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). |
java.lang.Object |
initWithArchiver(com.reportmill.foundation.RMArchiver anArchiver)
Legacy unarchival. |
void |
moveLayer(int fromIndex,
int toIndex)
Moves the layer at fromIndex to toIndex. |
void |
moveToNewLayer(java.util.List shapes)
Creates a new layer and adds the shapes in the given list to it. |
int |
page()
Returns the "Page" number of this page (used to resolve @Page@ key references). |
int |
pageBreakMax()
Returns "PageBreakMax" (used to resolve PageBreakMax key references). |
int |
pageBreakPageMax()
Returns "PageBreakPageMax" for all children on this page (used to resolve PageBreakPageMax key references). |
int |
pageMax()
Returns the "PageMax" of the the document associated with this page (used to resolve @PageMax@ key references). |
void |
removeChild(int index)
Removes the child at the given index (over-rides RMShape version to propogate to RMPageLayer). |
void |
removeLayer(com.reportmill.shape.RMPageLayer aLayer)
Removes the given layer (and dumps its children into the preceeding layer). |
void |
resetLayers()
Resets this page's list of layers to a single, selecctable layer named "Layer 1". |
RMShape |
rpgClone(com.reportmill.foundation.ReportMill rm)
A custom version of the clone method, which returns a report generated clone. |
void |
selectLayer(com.reportmill.shape.RMPageLayer aLayer)
Selects the given layer. |
void |
selectLayerNamed(java.lang.String aString)
Selects the layer with the given name. |
void |
sendShapesToBack(java.util.List shapes)
Sends the shapes in the given list to the back of the children list. |
void |
setChildAnimator(com.reportmill.graphics.RMAnimator anAnimator)
Over-rides the RMShape implementation to set the child animator associated with this page. |
boolean |
superSelectable()
This RMEditor support method tells the editor that pages can be super-selected. |
com.ribs.RXElement |
toXML(com.ribs.RXArchiver anArchiver)
XML archival. |
com.reportmill.foundation.RMObject |
undoClone()
A custom version of the clone method, specific for undo tracking. |
| Methods inherited from class com.reportmill.foundation.RMObject |
archiverClassName, didUndo, getAnimAttribute, getClassNameShort |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public java.util.List _layers
public com.reportmill.graphics.RMAnimator _childAnimator
| Constructor Detail |
public RMPage()
| Method Detail |
public RMDocument getDocument()
getDocument in class RMShapepublic int getLayerCount()
public com.reportmill.shape.RMPageLayer getLayer(int index)
public com.reportmill.shape.RMPageLayer getLayerNamed(java.lang.String aString)
public void addLayerNamed(java.lang.String aString)
public void removeLayer(com.reportmill.shape.RMPageLayer aLayer)
public void moveLayer(int fromIndex,
int toIndex)
public int getSelectedLayerIndex()
public com.reportmill.shape.RMPageLayer getSelectedLayer()
public void selectLayer(com.reportmill.shape.RMPageLayer aLayer)
public void selectLayerNamed(java.lang.String aString)
public void resetLayers()
public void addChild(RMShape child,
int index)
addChild in class RMShapepublic void removeChild(int index)
removeChild in class RMShapepublic void bringShapesToFront(java.util.List shapes)
bringShapesToFront in class RMShapepublic void sendShapesToBack(java.util.List shapes)
sendShapesToBack in class RMShapepublic void moveToNewLayer(java.util.List shapes)
public java.util.List drawChildren()
drawChildren in class RMShapepublic java.util.List hitChildren()
hitChildren in class RMShapepublic RMShape getPageShape()
getPageShape in class RMShapepublic com.reportmill.graphics.RMAnimator getChildAnimator(boolean create)
getChildAnimator in class RMShapepublic void setChildAnimator(com.reportmill.graphics.RMAnimator anAnimator)
setChildAnimator in class RMShapepublic RMShape rpgClone(com.reportmill.foundation.ReportMill rm)
rpgClone in class RMShapepublic int page()
page in class RMShapepublic int pageMax()
pageMax in class RMShapepublic int pageBreakMax()
pageBreakMax in class RMShapepublic int pageBreakPageMax()
pageBreakPageMax in class RMShapepublic java.lang.Object clone()
clone in class RMShapepublic com.reportmill.foundation.RMObject undoClone()
undoClone in class RMShapepublic void copy(com.reportmill.foundation.RMObject anObj)
copy in class RMShapepublic boolean equals(java.lang.Object anObj)
equals in class RMShapepublic java.lang.Object initWithArchiver(com.reportmill.foundation.RMArchiver anArchiver)
initWithArchiver in interface com.reportmill.foundation.RMArchiver.ArchivinginitWithArchiver in class RMShapepublic com.ribs.RXElement toXML(com.ribs.RXArchiver anArchiver)
toXML in class RMShape
public java.lang.Object fromXML(com.ribs.RXArchiver anArchiver,
com.ribs.RXElement anElement)
fromXML in class RMShapepublic boolean acceptsChildren()
acceptsChildren in class RMShapepublic boolean superSelectable()
superSelectable in class RMShape
public int handleAtPoint(RMPoint point,
boolean isSuperSelected)
handleAtPoint in class RMShape
|
ReportMill 7.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||