ReportMill 7.0 API

com.reportmill.foundation
Class RMDocument

java.lang.Object
  extended bycom.reportmill.foundation.RMObject
      extended bycom.reportmill.shape.RMShape
          extended bycom.reportmill.foundation.RMDocument
All Implemented Interfaces:
java.lang.Cloneable, com.reportmill.foundation.RMArchiver.Archiving

public class RMDocument
extends RMShape

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
static interface RMDocument.DocListener
          An interface to define objects that want to get document notifications.
 
Field Summary
static java.util.Locale _locale
           
static int CENTIMETERS
           
static int INCHES
           
static int POINTS
           
static java.lang.String[] SUPPORTED_UNITS
           
 
Fields inherited from class com.reportmill.shape.RMShape
HandleMaxXMaxY, HandleMaxXMidY, HandleMaxXMinY, HandleMidXMaxY, HandleMidXMinY, HandleMinXMaxY, HandleMinXMidY, HandleMinXMinY, HandleWidth
 
Constructor Summary
RMDocument()
          Creates a plain empty document.
RMDocument(float aWidth, float aHeight)
          Creates a document with the given width and height (in printer points).
RMDocument(java.lang.Object aSource)
          Creates a new document from the given source.
 
Method Summary
 boolean acceptsChildren()
          Editor method.
 void addPage(RMPage aPage)
          Adds a given page to this document (at end).
 void addPage(RMPage aPage, int anIndex)
          Adds a given page to this document (at the given index).
 void addPages(java.util.List aList)
          Add the given list of pages to this document (at end).
 void addPages(RMDocument aDoc)
          Add the pages in the given document to this document (at end) and clears the pages list in the given document.
 void addShapeWithPageReference(RMShape aShape)
           
 void boundsChanged(RMShape aShape)
          Notifies this shape that a given shape's bounds have changed (presumably a descendant).
 boolean calibrateColors()
          Returns whether the document should calibrate colors in generated file formats like PDF.
 boolean childrenSuperSelectImmediately()
          Editor method.
 java.lang.Object clone()
          Copies basic document attributes (shallow copy only - no children or pages).
 RMShape cloneDeep()
          Copies the complete document, including document pages and all their children.
 boolean compress()
          Returns whether the document should compress images in generated file formats like PDF.
 void copy(com.reportmill.foundation.RMObject anObj)
          Copies applicable attributes from the given object.
 byte[] csvBytes()
           
 java.lang.String csvString()
           
 byte[] delimitedAsciiBytes(java.lang.String fieldDelimiter, java.lang.String recordDelimiter, boolean quoteFields)
           
 java.lang.String delimitedString(java.lang.String fieldDelimiter, java.lang.String recordDelimiter, boolean quoteFields)
           
 boolean equals(java.lang.Object anObj)
          Standard equals implementation.
 byte[] excelBytes()
           
 byte[] flashBytes()
           
 java.lang.Object fromXML(com.ribs.RXArchiver anArchiver, com.ribs.RXElement anElement)
          XML unarchival.
 RMDocument generateReport()
          Returns a generated report from this template.
 RMDocument generateReport(java.lang.Object objects)
          Returns a generated report from this template evaluated against the given object.
 RMDocument generateReport(java.lang.Object objects, boolean paginate)
          Returns a generated report from this template evaluated against the given object with an option to paginate.
 RMDocument generateReport(java.lang.Object objects, java.lang.Object userInfo)
          Returns a generated report from this template evaluated against the given object and userInfo.
 RMDocument generateReport(java.lang.Object objects, java.lang.Object userInfo, boolean paginate)
          Returns a generated report from this template evaluated against the given object and userInfo with an option to paginate.
 com.reportmill.graphics.RMAnimator getAnimator(int anIndex)
           
 com.reportmill.graphics.RMAnimator getAnimatorLast()
           
 byte[] getBytes()
          Returns the document as an XML byte array.
 byte[] getBytesCSV()
          Returns the document as a byte array of a CSV file.
 byte[] getBytesDelimitedAscii(java.lang.String fieldDelimiter, java.lang.String recordDelimiter, boolean quoteFields)
          Returns the document as a byte array of a delimited ASCII file (using given field, record separator strings).
 byte[] getBytesExcel()
          Returns the document as byte array of an Excel file.
 byte[] getBytesFlash()
          Returns the document as a byte array of a Flash file.
 byte[] getBytesHTML()
          Returns the document as a byte array of an HTML file.
 byte[] getBytesJPEG()
          Returns the document as byte array of a JPEG file.
 byte[] getBytesPDF()
          Returns the document as a byte array of a PDF file.
 com.reportmill.foundation.RMDataSource getDataSource()
          Returns the RMDataSource associated with this document.
 com.reportmill.foundation.RMEntity getDataSourceSchema()
          Returns the schema for the RMDataSource associated with this document (convenience).
static RMDocument getDoc(java.lang.Object aSource)
          Creates a new document from aSource.
 RMDocument.DocListener getDocListener()
          Returns the DocListener associated with this document.
 RMDocument getDocument()
          Returns the RMDocument ancestor of this shape (or null if not there).
 java.lang.String getFilename()
          Returns the filename associated with this document, if available.
 float getGridSpacing()
          Returns the grid spacing for the document's grid.
 float getHeight()
          Returns the height of the document (actually the height of its first page).
 boolean getLoops()
           
 java.util.Map getMapHTML(java.lang.String anImageRoot)
          Returns the document as a Map of an HTML file and image resources.
 float getMarginBottom()
          Returns the margin rects bottom value.
 float getMarginLeft()
          Returns the margin rects left value.
 RMRect getMarginRect()
          Returns the margin rect for this document.
 float getMarginRight()
          Returns the margin rects right value.
 float getMarginTop()
          Returns the margin rects top value.
 float getMaxTime()
          Returns the total time needed to animate this document (total of all page animators).
 java.lang.String getNullString()
          Returns the string used to replace any occurrances of null values in a generated report.
 RMPage getPage(int index)
          Returns the page at the given index.
 int getPageCount()
          Returns the number of pages in this document.
 RMPage getPageLast()
          Returns the last page (convenience).
 java.util.List getPages()
          Returns the list of RMPages associated with this document.
 java.lang.String getPublishUrl()
          Returns the URL this document should be uploaded to.
 RMPage getSelectedPage()
          Returns the currently selected page of this document.
 int getSelectedPageIndex()
          Returns the current page index of this document.
 boolean getShowGrid()
          Returns whether the document should show an alignment grid.
 boolean getShowMargin()
          Returns whether the document should show a margin rect.
 RMSize getSize()
          Returns the size of the document (acutally the size of its first page).
 boolean getSnapGrid()
          Returns whether the document should snap to an alignment grid.
 boolean getSnapMargin()
          Returns whether the document should snap to a margin rect.
 java.lang.String getStringCSV()
          Returns the document as a string of a CSV file.
 java.lang.String getStringDelimitedText(java.lang.String fieldDelimiter, java.lang.String recordDelimiter, boolean quoteFields)
          Returns the document as a string of a delimited text file.
 com.reportmill.foundation.RMUndoer getUndoer()
          Returns the RMUndoer for this document.
 int getUnit()
          Returns the units used to express sizes in the current document (POINTS, INCHES, CENTIMETERS).
 java.lang.String getUnitString()
          Returns the units used to express sizes in the current document as one of the strings: point, inch or cm.
 int getVersion()
          Returns the version this document was loaded as.
 float getWidth()
          Returns the width of the document (actually the width of its first page).
 int handleAtPoint(RMPoint point, boolean isSuperSelected)
           
 byte[] htmlBytes()
           
 byte[] htmlBytes(java.lang.String aSource)
           
 byte[] htmlBytes(java.lang.String aSource, java.lang.String aTitle)
           
 java.util.Map htmlMap(java.lang.String anImageRoot)
           
 java.lang.String htmlString(java.lang.String aSource)
           
 java.lang.String htmlString(java.lang.String aSource, java.lang.String aTitle)
           
 java.lang.Object initWithArchiver(com.reportmill.foundation.RMArchiver anArchiver)
          Legacy archival.
 byte[] jpgBytes()
           
 java.lang.Boolean paginate()
          Returns whether the document should paginate generated reports by default.
 byte[] pdfBytes()
           
 void removePage(int anIndex)
          Removes the page at the given index from this document.
 void resolvePageReferences()
          Performs page substitions on any text fields that were identified as containing @Page@ keys.
 RMShape rpgClone(com.reportmill.foundation.ReportMill rm)
          Report Generation method.
 void setCalibrateColors(boolean aValue)
          Sets whether the document should calibrate colors in generated file formats like PDF.
 void setCompress(boolean aValue)
          Sets whether the document should compress images in generated file formats like PDF.
 void setDataSource(com.reportmill.foundation.RMDataSource aDataSource)
          Sets the RMDataSource associated with this document.
 void setDocListener(RMDocument.DocListener aListener)
          Sets the DocListener associated with this document.
 void setFilename(java.lang.String aPath)
          Sets the filename associated with this document.
 void setGridSpacing(float aValue)
          Sets the grid spacing for the document's grid.
 void setMarginRect(float left, float right, float top, float bottom)
          Sets the margin rect for this document.
 void setMarginRect(RMRect aValue)
          Sets the margin rect for this document.
 void setNeedsRepaint(RMShape aShape)
          This is a notification call for impending visual shape attribute changes.
 void setNullString(java.lang.String aValue)
          Sets the string used to replace any occurrances of null values in a generated report.
 void setPages(java.util.List aList)
          Sets the list of RMPages associated with this document.
 void setPageSize(float w, float h)
          Sets the size of the document while maintaining margin rect.
 void setPageSize(RMSize size)
          Sets the size of the document while maintaining margin rect.
 void setPaginate(java.lang.Boolean aValue)
          Sets whether the document should paginate generated reports by default.
 void setPublishUrl(java.lang.String aValue)
          Sets the URL this document should be uploaded to.
 void setSelectedPage(int anIndex)
          Selects the currently selected page, by index.
 void setShowGrid(boolean aValue)
          Sets whether the document should show an alignment grid.
 void setShowMargin(boolean aValue)
          Sets whether the document should show a margin rect.
 void setSize(float aWidth, float aHeight)
          Sets the size of the document (and all of its pages).
 void setSize(RMSize aSize)
          Sets the size of the document.
 void setSizeDeep(float aWidth, float aHeight)
          Sets the size of the document and all of its pages (sizes children, too, using autosizing settings).
 void setSnapGrid(boolean aValue)
          Sets whether the document should snap to an alignment grid.
 void setSnapMargin(boolean aValue)
          Sets whether the document should snap to a margin rect.
 void setUndoer(com.reportmill.foundation.RMUndoer anUndoer)
          Sets the RMUndoer for this document.
 void setUnit(int aValue)
          Sets the units used to express sizes in the current document (POINTS, INCHES, CENTIMETERS).
 void setUnitString(java.lang.String aValue)
          Sets the units used to express sizes in the current document with one of the strings: point, inch or cm.
 boolean superSelectable()
          Editor method.
 com.ribs.RXElement toXML(com.ribs.RXArchiver anArchiver)
          XML archival.
 com.reportmill.foundation.RMObject undoClone()
          Undo support.
 void undoerAddDirtyObject(com.reportmill.foundation.RMObject anObj)
          Overrides RMShape implementation to actually add dirty object to notify doc listner and actually add to undoer.
 float unitsFromPoints(float aValue)
          Converts given value to document units from printer points (1/72 of an inch).
 float unitsMultiplier()
          Returns the multiplier used to convert printer points to document units.
 float unitsToPoints(float aValue)
          Converts given value from document units to printer points (1/72 of an inch).
 void willChange(RMShape aShape)
          This is a notification call-back for impeding shape attribute changes.
 void write(java.lang.String aPath)
          Writes the document out to the given path String (it extracts type from path extension).
 void writeCSV(java.lang.String fname)
          Writes the document to the given path String as a CSV file.
 void writeDelimitedAscii(java.lang.String fname, java.lang.String fieldDelimiter, java.lang.String recordDelimiter, boolean quoteFields)
          Writes the document to the given path String as a delimited ASCII file.
 void writeExcel(java.lang.String fname)
          Writes the document to the given path String as an Excel file.
 void writeFlash(java.lang.String fname)
          Writes the document to the given path String as Flash.
 void writeFlashHTML(java.lang.String fname)
          Writes the document to the given path String as Flash/HTML.
 java.util.Map writeHTML(java.lang.String fname)
          Writes the document to the given path String as HTML.
 java.util.Map writeHTML(java.lang.String fname, java.lang.String anImageRoot)
          Writes the document to the given path String as HTML (referenced images are written at the given relative path).
 void writeJPG(java.lang.String fname)
          Writes the document to the given path String as a JPEG file.
 void writePDF(java.lang.String fname)
          Writes the document to the given path String as PDF.
 
Methods inherited from class com.reportmill.shape.RMShape
acceptsDragKeys, acceptsEvents, acceptsFirstEvent, acceptsFormat, addChild, addChild, addChildBelowLastChild, boundsChanged, bringShapesToFront, canBeUngrouped, childHitByPoint, childrenHitByPath, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedSizeFromShape, convertedSizeToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertSizeFromShape, convertSizeToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, didChange, divideShapeFromEdge, divideShapeFromTop, dragExit, dragKeyAtPoint, drawChildren, drawsFill, drawsStroke, dropKeyAtPoint, fromXMLDeep, get, getActionScript, getAnim, getAnim, getAnimator, getAnimator, getAutosizeHeight, getAutosizing, getBounds, getBounds, getBoundsInside, getBoundsMarked, getBoundsOfChildren, getBoundsOfChildren, getBoundsOfPath, getBoundsOrigin, getBoundsSize, getBoundsSuperSelected, getChild, getChildAnimator, getChildAnimator, getChildCount, getChildLast, getChildren, getChildWithClass, getChildWithName, getColor, getCommonAncestor, getFill, getFont, getFormat, getGroupShape, getHeightToFit, getImageData, getImageFill, getLineWidth, getListKey, getListKeyDeep, getListKeyShape, getName, getOpacity, getOpacityDeep, getOrigin, getOutline, getPageShape, getParent, getParentCount, getParents, getPath, getPathInBounds, getRoll, getRootShape, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSkewX, getSkewY, getStroke, getStrokeColor, getTextColor, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUrl, getWidthToFit, getX, getY, groupShapes, handleCount, handlePoint, handleRect, hasPageBreaks, height, hitByPath, hitByPoint, hitChildren, indexOf, indexOf, isAncestor, isDescendant, isLocked, isRoot, isUnderlined, maxX, maxXInside, maxY, maxYInside, midX, midXInside, midY, midYInside, minX, minXInside, minY, minYInside, moveHandleToPoint, notRSS, offsetChildrenXY, offsetXY, opposingHandle, page, pageBreakMax, pageBreakPageMax, pageMax, put, reclaimChildren, removeChild, removeChild, removeChildren, removeChildren, removeFromParent, resolvePageReferences, rpgCloneBase, rpgCloneChildren, rpgCloneConclude, rpgCloneNotification, rpgClonePrepare, rpgClonePreprocess, rpgCloneUrl, sendShapesToBack, setActionScript, setAnim, setAutosizeHeight, setAutosizing, setBounds, setBounds, setBoundsOrigin, setBoundsOrigin, setBoundsOriginX, setBoundsOriginY, setBoundsSize, setBoundsSize, setChildAnimator, setChildren, setColor, setColor, setDrawsFill, setDrawsStroke, setEverythingStretches, setFill, setFill, setFont, setFormat, setHeight, setHeightDeep, setHeightDeep, setHeightToFit, setLineWidth, setListKey, setLocked, setName, setNeedsRepaint, setOnlyBottomAndRightMarginStretches, setOnlyTopAndRightMarginStretches, setOnlyWidthAndHeightStretches, setOpacity, setOrigin, setOrigin, setOutline, setParent, setRoll, setScaleX, setScaleXY, setScaleXY, setScaleY, setSizeDeep, setSizeToFit, setSizeToFit, setSkewX, setSkewXY, setSkewXY, setSkewY, setStroke, setStroke, setStrokeColor, setStrokeColor, setTextColor, setTime, setUnderlined, setUrl, setWidth, setWidthDeep, setWidthDeep, setWidthToFit, setX, setXY, setXY, setXYWidthHeight, setY, sizesToFitChildren, superSelectImmediately, toString, undoCopy, undoEquals, undoerDisable, undoerEnable, undoerSetUndoTitle, width, willChange, x, y
 
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

INCHES

public static final int INCHES
See Also:
Constant Field Values

POINTS

public static final int POINTS
See Also:
Constant Field Values

CENTIMETERS

public static final int CENTIMETERS
See Also:
Constant Field Values

SUPPORTED_UNITS

public static final java.lang.String[] SUPPORTED_UNITS

_locale

public static java.util.Locale _locale
Constructor Detail

RMDocument

public RMDocument()
Creates a plain empty document. It's really only used by the archiver.


RMDocument

public RMDocument(float aWidth,
                  float aHeight)
Creates a document with the given width and height (in printer points).


RMDocument

public RMDocument(java.lang.Object aSource)
Creates a new document from the given source.

Method Detail

getDoc

public static RMDocument getDoc(java.lang.Object aSource)
Creates a new document from aSource.


getFilename

public java.lang.String getFilename()
Returns the filename associated with this document, if available.


setFilename

public void setFilename(java.lang.String aPath)
Sets the filename associated with this document.


getPageCount

public int getPageCount()
Returns the number of pages in this document.

Overrides:
getPageCount in class RMShape

getPage

public RMPage getPage(int index)
Returns the page at the given index.


getPageLast

public RMPage getPageLast()
Returns the last page (convenience).


getPages

public java.util.List getPages()
Returns the list of RMPages associated with this document.


setPages

public void setPages(java.util.List aList)
Sets the list of RMPages associated with this document.


addPage

public void addPage(RMPage aPage)
Adds a given page to this document (at end).


addPage

public void addPage(RMPage aPage,
                    int anIndex)
Adds a given page to this document (at the given index).


removePage

public void removePage(int anIndex)
Removes the page at the given index from this document.


addPages

public void addPages(java.util.List aList)
Add the given list of pages to this document (at end).


addPages

public void addPages(RMDocument aDoc)
Add the pages in the given document to this document (at end) and clears the pages list in the given document.


getSelectedPageIndex

public int getSelectedPageIndex()
Returns the current page index of this document.


getSelectedPage

public RMPage getSelectedPage()
Returns the currently selected page of this document.


setSelectedPage

public void setSelectedPage(int anIndex)
Selects the currently selected page, by index.


getDataSource

public com.reportmill.foundation.RMDataSource getDataSource()
Returns the RMDataSource associated with this document.


setDataSource

public void setDataSource(com.reportmill.foundation.RMDataSource aDataSource)
Sets the RMDataSource associated with this document.


getDataSourceSchema

public com.reportmill.foundation.RMEntity getDataSourceSchema()
Returns the schema for the RMDataSource associated with this document (convenience).


getUnit

public int getUnit()
Returns the units used to express sizes in the current document (POINTS, INCHES, CENTIMETERS).


setUnit

public void setUnit(int aValue)
Sets the units used to express sizes in the current document (POINTS, INCHES, CENTIMETERS).


getUnitString

public java.lang.String getUnitString()
Returns the units used to express sizes in the current document as one of the strings: point, inch or cm.


setUnitString

public void setUnitString(java.lang.String aValue)
Sets the units used to express sizes in the current document with one of the strings: point, inch or cm.


getShowGrid

public boolean getShowGrid()
Returns whether the document should show an alignment grid.


setShowGrid

public void setShowGrid(boolean aValue)
Sets whether the document should show an alignment grid.


getSnapGrid

public boolean getSnapGrid()
Returns whether the document should snap to an alignment grid.


setSnapGrid

public void setSnapGrid(boolean aValue)
Sets whether the document should snap to an alignment grid.


getShowMargin

public boolean getShowMargin()
Returns whether the document should show a margin rect.


setShowMargin

public void setShowMargin(boolean aValue)
Sets whether the document should show a margin rect.


getSnapMargin

public boolean getSnapMargin()
Returns whether the document should snap to a margin rect.


setSnapMargin

public void setSnapMargin(boolean aValue)
Sets whether the document should snap to a margin rect.


getMarginRect

public RMRect getMarginRect()
Returns the margin rect for this document.


setMarginRect

public void setMarginRect(RMRect aValue)
Sets the margin rect for this document.


setMarginRect

public void setMarginRect(float left,
                          float right,
                          float top,
                          float bottom)
Sets the margin rect for this document.


getMarginLeft

public float getMarginLeft()
Returns the margin rects left value.


getMarginRight

public float getMarginRight()
Returns the margin rects right value.


getMarginTop

public float getMarginTop()
Returns the margin rects top value.


getMarginBottom

public float getMarginBottom()
Returns the margin rects bottom value.


getGridSpacing

public float getGridSpacing()
Returns the grid spacing for the document's grid.


setGridSpacing

public void setGridSpacing(float aValue)
Sets the grid spacing for the document's grid.


getPublishUrl

public java.lang.String getPublishUrl()
Returns the URL this document should be uploaded to.


setPublishUrl

public void setPublishUrl(java.lang.String aValue)
Sets the URL this document should be uploaded to.


getNullString

public java.lang.String getNullString()
Returns the string used to replace any occurrances of null values in a generated report.


setNullString

public void setNullString(java.lang.String aValue)
Sets the string used to replace any occurrances of null values in a generated report.


paginate

public java.lang.Boolean paginate()
Returns whether the document should paginate generated reports by default.


setPaginate

public void setPaginate(java.lang.Boolean aValue)
Sets whether the document should paginate generated reports by default.


compress

public boolean compress()
Returns whether the document should compress images in generated file formats like PDF.


setCompress

public void setCompress(boolean aValue)
Sets whether the document should compress images in generated file formats like PDF.


calibrateColors

public boolean calibrateColors()
Returns whether the document should calibrate colors in generated file formats like PDF.


setCalibrateColors

public void setCalibrateColors(boolean aValue)
Sets whether the document should calibrate colors in generated file formats like PDF.


getVersion

public int getVersion()
Returns the version this document was loaded as.


getDocListener

public RMDocument.DocListener getDocListener()
Returns the DocListener associated with this document.


setDocListener

public void setDocListener(RMDocument.DocListener aListener)
Sets the DocListener associated with this document.


generateReport

public RMDocument generateReport()
Returns a generated report from this template.


generateReport

public RMDocument generateReport(java.lang.Object objects)
Returns a generated report from this template evaluated against the given object.


generateReport

public RMDocument generateReport(java.lang.Object objects,
                                 java.lang.Object userInfo)
Returns a generated report from this template evaluated against the given object and userInfo.


generateReport

public RMDocument generateReport(java.lang.Object objects,
                                 boolean paginate)
Returns a generated report from this template evaluated against the given object with an option to paginate.


generateReport

public RMDocument generateReport(java.lang.Object objects,
                                 java.lang.Object userInfo,
                                 boolean paginate)
Returns a generated report from this template evaluated against the given object and userInfo with an option to paginate.


getBytes

public byte[] getBytes()
Returns the document as an XML byte array.


getBytesPDF

public byte[] getBytesPDF()
Returns the document as a byte array of a PDF file.


getBytesHTML

public byte[] getBytesHTML()
Returns the document as a byte array of an HTML file.


getBytesFlash

public byte[] getBytesFlash()
Returns the document as a byte array of a Flash file.


getBytesCSV

public byte[] getBytesCSV()
Returns the document as a byte array of a CSV file.


getBytesDelimitedAscii

public byte[] getBytesDelimitedAscii(java.lang.String fieldDelimiter,
                                     java.lang.String recordDelimiter,
                                     boolean quoteFields)
Returns the document as a byte array of a delimited ASCII file (using given field, record separator strings).


getBytesExcel

public byte[] getBytesExcel()
Returns the document as byte array of an Excel file.


getBytesJPEG

public byte[] getBytesJPEG()
Returns the document as byte array of a JPEG file.


getMapHTML

public java.util.Map getMapHTML(java.lang.String anImageRoot)
Returns the document as a Map of an HTML file and image resources.


getStringCSV

public java.lang.String getStringCSV()
Returns the document as a string of a CSV file.


getStringDelimitedText

public java.lang.String getStringDelimitedText(java.lang.String fieldDelimiter,
                                               java.lang.String recordDelimiter,
                                               boolean quoteFields)
Returns the document as a string of a delimited text file.


write

public void write(java.lang.String aPath)
Writes the document out to the given path String (it extracts type from path extension).


writePDF

public void writePDF(java.lang.String fname)
Writes the document to the given path String as PDF.


writeHTML

public java.util.Map writeHTML(java.lang.String fname)
Writes the document to the given path String as HTML.


writeHTML

public java.util.Map writeHTML(java.lang.String fname,
                               java.lang.String anImageRoot)
Writes the document to the given path String as HTML (referenced images are written at the given relative path).


writeFlash

public void writeFlash(java.lang.String fname)
Writes the document to the given path String as Flash.


writeFlashHTML

public void writeFlashHTML(java.lang.String fname)
Writes the document to the given path String as Flash/HTML.


writeCSV

public void writeCSV(java.lang.String fname)
Writes the document to the given path String as a CSV file.


writeDelimitedAscii

public void writeDelimitedAscii(java.lang.String fname,
                                java.lang.String fieldDelimiter,
                                java.lang.String recordDelimiter,
                                boolean quoteFields)
Writes the document to the given path String as a delimited ASCII file.


writeExcel

public void writeExcel(java.lang.String fname)
Writes the document to the given path String as an Excel file.


writeJPG

public void writeJPG(java.lang.String fname)
Writes the document to the given path String as a JPEG file.


unitsToPoints

public float unitsToPoints(float aValue)
Converts given value from document units to printer points (1/72 of an inch).


unitsFromPoints

public float unitsFromPoints(float aValue)
Converts given value to document units from printer points (1/72 of an inch).


unitsMultiplier

public float unitsMultiplier()
Returns the multiplier used to convert printer points to document units.


getWidth

public float getWidth()
Returns the width of the document (actually the width of its first page).

Overrides:
getWidth in class RMShape

getHeight

public float getHeight()
Returns the height of the document (actually the height of its first page).

Overrides:
getHeight in class RMShape

getSize

public RMSize getSize()
Returns the size of the document (acutally the size of its first page).

Overrides:
getSize in class RMShape

setSize

public void setSize(RMSize aSize)
Sets the size of the document.

Overrides:
setSize in class RMShape

setSize

public void setSize(float aWidth,
                    float aHeight)
Sets the size of the document (and all of its pages).

Overrides:
setSize in class RMShape

setSizeDeep

public void setSizeDeep(float aWidth,
                        float aHeight)
Sets the size of the document and all of its pages (sizes children, too, using autosizing settings).

Overrides:
setSizeDeep in class RMShape

setPageSize

public void setPageSize(RMSize size)
Sets the size of the document while maintaining margin rect.


setPageSize

public void setPageSize(float w,
                        float h)
Sets the size of the document while maintaining margin rect.


getMaxTime

public float getMaxTime()
Returns the total time needed to animate this document (total of all page animators).


getDocument

public RMDocument getDocument()
Description copied from class: RMShape
Returns the RMDocument ancestor of this shape (or null if not there).

Overrides:
getDocument in class RMShape

getAnimator

public com.reportmill.graphics.RMAnimator getAnimator(int anIndex)

getAnimatorLast

public com.reportmill.graphics.RMAnimator getAnimatorLast()

getLoops

public boolean getLoops()

getUndoer

public com.reportmill.foundation.RMUndoer getUndoer()
Returns the RMUndoer for this document.

Overrides:
getUndoer in class RMShape

setUndoer

public void setUndoer(com.reportmill.foundation.RMUndoer anUndoer)
Sets the RMUndoer for this document.


undoerAddDirtyObject

public void undoerAddDirtyObject(com.reportmill.foundation.RMObject anObj)
Overrides RMShape implementation to actually add dirty object to notify doc listner and actually add to undoer.

Overrides:
undoerAddDirtyObject in class RMShape

willChange

public void willChange(RMShape aShape)
This is a notification call-back for impeding shape attribute changes.

Overrides:
willChange in class RMShape

setNeedsRepaint

public void setNeedsRepaint(RMShape aShape)
This is a notification call for impending visual shape attribute changes.

Overrides:
setNeedsRepaint in class RMShape

boundsChanged

public void boundsChanged(RMShape aShape)
Notifies this shape that a given shape's bounds have changed (presumably a descendant).

Overrides:
boundsChanged in class RMShape

resolvePageReferences

public void resolvePageReferences()
Performs page substitions on any text fields that were identified as containing @Page@ keys.


addShapeWithPageReference

public void addShapeWithPageReference(RMShape aShape)

equals

public boolean equals(java.lang.Object anObj)
Standard equals implementation.

Overrides:
equals in class RMShape

clone

public java.lang.Object clone()
Copies basic document attributes (shallow copy only - no children or pages).

Overrides:
clone in class RMShape

cloneDeep

public RMShape cloneDeep()
Copies the complete document, including document pages and all their children.

Overrides:
cloneDeep in class RMShape

undoClone

public com.reportmill.foundation.RMObject undoClone()
Description copied from class: RMShape
Undo support.

Overrides:
undoClone in class RMShape

copy

public void copy(com.reportmill.foundation.RMObject anObj)
Description copied from class: RMShape
Copies applicable attributes from the given object.

Overrides:
copy in class RMShape

initWithArchiver

public java.lang.Object initWithArchiver(com.reportmill.foundation.RMArchiver anArchiver)
Legacy archival.

Specified by:
initWithArchiver in interface com.reportmill.foundation.RMArchiver.Archiving
Overrides:
initWithArchiver in class RMShape

toXML

public com.ribs.RXElement toXML(com.ribs.RXArchiver anArchiver)
XML archival.

Overrides:
toXML in class RMShape

fromXML

public java.lang.Object fromXML(com.ribs.RXArchiver anArchiver,
                                com.ribs.RXElement anElement)
XML unarchival.

Overrides:
fromXML in class RMShape

rpgClone

public RMShape rpgClone(com.reportmill.foundation.ReportMill rm)
Report Generation method.

Overrides:
rpgClone in class RMShape

superSelectable

public boolean superSelectable()
Description copied from class: RMShape
Editor method.

Overrides:
superSelectable in class RMShape

childrenSuperSelectImmediately

public boolean childrenSuperSelectImmediately()
Description copied from class: RMShape
Editor method.

Overrides:
childrenSuperSelectImmediately in class RMShape

acceptsChildren

public boolean acceptsChildren()
Description copied from class: RMShape
Editor method.

Overrides:
acceptsChildren in class RMShape

handleAtPoint

public int handleAtPoint(RMPoint point,
                         boolean isSuperSelected)
Overrides:
handleAtPoint in class RMShape

pdfBytes

public byte[] pdfBytes()

htmlBytes

public byte[] htmlBytes()

flashBytes

public byte[] flashBytes()

csvBytes

public byte[] csvBytes()

delimitedAsciiBytes

public byte[] delimitedAsciiBytes(java.lang.String fieldDelimiter,
                                  java.lang.String recordDelimiter,
                                  boolean quoteFields)

excelBytes

public byte[] excelBytes()

jpgBytes

public byte[] jpgBytes()

htmlMap

public java.util.Map htmlMap(java.lang.String anImageRoot)

csvString

public java.lang.String csvString()

delimitedString

public java.lang.String delimitedString(java.lang.String fieldDelimiter,
                                        java.lang.String recordDelimiter,
                                        boolean quoteFields)

htmlBytes

public byte[] htmlBytes(java.lang.String aSource)

htmlBytes

public byte[] htmlBytes(java.lang.String aSource,
                        java.lang.String aTitle)

htmlString

public java.lang.String htmlString(java.lang.String aSource)

htmlString

public java.lang.String htmlString(java.lang.String aSource,
                                   java.lang.String aTitle)

ReportMill 7.0 API