Package com.ribsapp.shapes
Class RBDocument
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.shape.RMShape
com.reportmill.base.RMDocument
com.ribsapp.shapes.RBDocument
- All Implemented Interfaces:
RMArchiver.Archiving
,RJMinMaxSizeSettable
,Cloneable
The RMDocument class represents a ReportMill document and is also an RMShape subclass, so it can be a real part of
the document/shape hierarchy. RMDocuments are also what ReportMill refers to as templates, and is commonly used like
this:
RMDocument template = RMDocument.getDoc(aSource); // Load from path String, File, byte array, etc. RMDocument report = template.generateReport(aDataset); // Any Java dataset: EJBs, custom classes, collctns, etc. report.writePDF("MyReport.pdf");
On rare occasions, you may also want to create a document dynamically. Here's an example:
RMDocument doc = new RMDocument(612, 792); // Standard US Letter size (8.5" x 11"), in points RMTable table = new RMTable(); // Create new table ... doc.getPage(0).addChild(table); // ... and add to first page table.setBounds(36, 36, 540, 680); // Position and size table table.getRow("Objects Details").getColumn(0).setText("Title: @getTitle@"); // Configure first text
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This inner class models MenuBars, Menus and MenuItems as TreeNodes.Nested classes/interfaces inherited from class com.reportmill.base.RMDocument
RMDocument.DocListener
-
Field Summary
Fields inherited from class com.reportmill.base.RMDocument
_locale, PAGE_LAYOUT_CONTINUOUS, PAGE_LAYOUT_CONTINUOUS_DOUBLE, PAGE_LAYOUT_DOUBLE, PAGE_LAYOUT_FACING, PAGE_LAYOUT_QUADRUPLE, PAGE_LAYOUT_SINGLE, SUPPORTED_UNITS, UNIT_CM, UNIT_INCHES, UNIT_MM, UNIT_PICA, UNIT_POINTS
Fields inherited from class com.reportmill.shape.RMShape
WRAP_TYPE_BOTH, WRAP_TYPE_NONE
-
Constructor Summary
ConstructorsConstructorDescriptionRBDocument
(int aWidth, int aHeight) Creates a new document with the given width and height. -
Method Summary
Modifier and TypeMethodDescriptionDefault values for the extremaReturns component's maximum size as an RMSize.Returns component's minimum size as an RMSize.getPageRB
(int anIndex) Returns the document page at the given index as an RBPage.getPanel()
A helper method to get the current RJPanelReturns the document's selected page as an RBPage.Editor method - indicates that linked text should use normal text inspector.void
setDataSource
(RMDataSource aDataSource) Overrides RMEditor implementation to install in RJPanel.void
setMaximumSize
(RMSize max) Set component's maximum size as an RMSizevoid
setMinimumSize
(RMSize min) Set component's minimum size as an RMSizeMethods inherited from class com.reportmill.base.RMDocument
acceptsChildren, addPage, addPage, addPageReferenceShapes, addPages, addPages, boundsChanged, childrenSuperSelectImmediately, clone, cloneDeep, copy, equals, fromXML, generateReport, generateReport, generateReport, generateReport, getAnimator, getAnimatorLast, getBytes, getBytesCSV, getBytesDelimitedAscii, getBytesFlash, getBytesHTML, getBytesJPEG, getBytesPDF, getBytesPNG, getCalibrateColors, getCompress, getDataSource, getDataSourceSchema, getDoc, getDocForPDF, getDocListener, getDocument, getFilename, getGridSpacing, getLoops, getMapHTML, getMarginBottom, getMarginLeft, getMarginRect, getMarginRight, getMarginTop, getMaxTime, getNullString, getPage, getPageCount, getPageLast, getPageLayout, getPages, getPageSize, getPaginate, getPointsFromUnits, getPublishUrl, getSelectedPage, getSelectedPageIndex, getShowGrid, getShowMargin, getSnapGrid, getSnapMargin, getStringCSV, getStringDelimitedText, getUndoer, getUnit, getUnitsFromPoints, getUnitsMultiplier, getUnitString, getVersion, initWithArchiver, pdfBytes, rebuild, removePage, resolvePageReferences, rpgClone, setCalibrateColors, setCompress, setDocListener, setFilename, setGridSpacing, setMarginRect, setMargins, setNeedsRepaint, setNullString, setPageLayout, setPages, setPageSize, setPaginate, setPublishUrl, setSelectedPage, setSelectedPageIndex, setShowGrid, setShowMargin, setSnapGrid, setSnapMargin, setUndoer, setUnit, setUnitString, superSelectable, toXML, undoClone, undoerAddDirtyObject, willChange, write, writeCSV, writeDelimitedAscii, writeFlash, writeFlashHTML, writeHTML, writeHTML, writeJPG, writePDF
Methods inherited from class com.reportmill.shape.RMShape
acceptsDragKeys, acceptsFormat, acceptsMouse, addChild, addChild, addChildBelowLastChild, bounds, boundsChanged, bringShapesToFront, canBeUngrouped, 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, getChildAnimator, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWhoCauseWrap, getChildrenWhoDraw, getChildrenWhoHitTest, getChildSortedByX, getChildWithClass, getChildWithName, getColor, getCommonAncestor, 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, getPageShape, getParent, getParentCount, getParents, getPath, getPathInBounds, getPropertyKey, getPropertyKeyCount, getPropertyKeyName, getRoll, getRootShape, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSizeP, getSkewX, getSkewY, getStroke, getStrokeColor, getTextColor, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, 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, page, pageBreakMax, pageBreakPageMax, pageMax, put, putPropertyKey, reclaimChildren, removeChild, removeChild, removeChildren, removeChildren, removeFromParent, resolvePageReferences, rpgCloneBase, rpgCloneChildren, rpgCloneConclude, rpgCloneNotification, rpgClonePrepare, rpgClonePreprocess, rpgCloneUrl, sendShapesToBack, 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, 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, undoerDisable, undoerEnable, undoerSetUndoTitle, width, willChange, x, y
Methods inherited from class com.reportmill.base.RMObject
didUndo, getAnimAttribute, getClassNameShort
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.ribsapp.shapes.RJMinMaxSizeSettable
getSize
-
Constructor Details
-
RBDocument
public RBDocument(int aWidth, int aHeight) Creates a new document with the given width and height.
-
-
Method Details
-
getPageRB
Returns the document page at the given index as an RBPage. -
getSelectedPageRB
Returns the document's selected page as an RBPage. -
getToolClassName
Editor method - indicates that linked text should use normal text inspector.- Overrides:
getToolClassName
in classRMShape
-
getPanel
A helper method to get the current RJPanel -
setMaximumSize
Set component's maximum size as an RMSize- Specified by:
setMaximumSize
in interfaceRJMinMaxSizeSettable
-
getMaximumSize
Returns component's maximum size as an RMSize.- Specified by:
getMaximumSize
in interfaceRJMinMaxSizeSettable
-
setMinimumSize
Set component's minimum size as an RMSize- Specified by:
setMinimumSize
in interfaceRJMinMaxSizeSettable
-
getMinimumSize
Returns component's minimum size as an RMSize.- Specified by:
getMinimumSize
in interfaceRJMinMaxSizeSettable
-
getDefaultMinimumSize
Description copied from interface:RJMinMaxSizeSettable
Default values for the extrema- Specified by:
getDefaultMinimumSize
in interfaceRJMinMaxSizeSettable
-
getDefaultMaximumSize
- Specified by:
getDefaultMaximumSize
in interfaceRJMinMaxSizeSettable
-
setDataSource
Overrides RMEditor implementation to install in RJPanel.- Overrides:
setDataSource
in classRMDocument
-