ReportMill 11 API

com.reportmill.shape
Class RMTable

java.lang.Object
  extended by com.reportmill.base.RMObject
      extended by com.reportmill.shape.RMShape
          extended by com.reportmill.shape.RMSplitShape
              extended by com.reportmill.shape.RMTable
All Implemented Interfaces:
com.reportmill.base.RMPropertyChanger, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener

public class RMTable
extends com.reportmill.shape.RMSplitShape

This RMShape subclass provides functionality to graphically represent a list of data in a ReportMill report. It also supports data manipulation such as grouping and sorting.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.reportmill.shape.RMSplitShape
com.reportmill.shape.RMSplitShape.RMSplitShapeLayout
 
Field Summary
 
Fields inherited from class com.reportmill.shape.RMShape
WRAP_TYPE_BOTH, WRAP_TYPE_NONE
 
Constructor Summary
RMTable()
          Creates a plain table.
RMTable(java.lang.String aDatasetKey)
          Creates a table with given dataset key (and corresponding default grouping and details row).
 
Method Summary
 void addDetails(java.lang.String aKey)
          Convenience to add details for grouping key.
 void addGrouping(RMGrouping aGrouping, int anIndex)
          Adds a given grouping to the table at the given grouping index.
 void addGroupingKey(java.lang.String aKey, int anIndex)
          Adds a grouping to the table for the given key string at the given grouping index.
 void addHeader(java.lang.String aKey)
          Convenience to add header for grouping key.
 void addSummary(java.lang.String aKey)
          Convenience to add summary for grouping key.
 RMTable clone()
          Standard clone implementation.
 boolean equals(java.lang.Object anObj)
          Standard equals implementation.
 java.lang.Object fromXMLShape(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
          XML unarchival.
 void fromXMLShapeChildren(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
          XML unarchival for shape children.
 int getColumnCount()
          Returns the number of columns that this table should be repeated over on the same page before paginating.
 float getColumnSpacing()
          Returns the space between a table that has more than one column (int printer points).
 java.lang.String getDatasetKey()
          Returns the dataset key associated with the table.
 java.lang.String getFilterKey()
          Returns the optional key chain expression string used to prune the table list derived from dataset key.
 com.reportmill.base.RMGrouper getGrouper()
          Returns the grouper associated with the table.
 RMGrouping getGrouping(int anIndex)
          Returns the individual grouping at the given index.
 RMGrouping getGrouping(java.lang.String aKey)
          Returns the individual grouping that has the same key as the one given.
 int getGroupingCount()
          Returns the number of groups in this table.
 int getPageBreakGroupIndex()
          Returns the index of the grouping in the grouper at which an explicit.
 java.lang.Boolean getPaginate()
          Returns whether the table is supposed to be paginated.
 RMTableRow getRow(int anIndex)
          Returns the specific table row at the given index.
 boolean getStartingPageBreak()
          Returns whether this table should always start on a new page (if in table group).
 void moveGrouping(int fromIndex, int toIndex)
          Moves the grouping at the first index so that it resides at the second index.
 void paintShape(com.reportmill.shape.RMShapePainter aPainter, java.awt.Graphics2D g)
          Paints a table shape.
 void paintShapeOver(com.reportmill.shape.RMShapePainter aPainter, java.awt.Graphics2D g)
          Paints stroke around table after all children have drawn.
 void propertyChange(java.beans.PropertyChangeEvent anEvent)
          Called whenever grouper has changed to re-establish which rows remain and their order.
 void removeGrouping(RMGrouping aGrouping)
          Removes the given grouping.
 void setColumnCount(int aValue)
          Sets the number of columns that this table should be repeated over on the same page before paginating.
 void setColumnSpacing(float aValue)
          Sets the space between a table that has more than one column (int printer points).
 void setDatasetKey(java.lang.String aKeyPath)
          Sets the dataset key associated with the table.
 void setFilterKey(java.lang.String aKeyExpr)
          Sets the optional key chain expression string used to prune the table list derived from dataset key.
 void setGrouper(com.reportmill.base.RMGrouper aGrouper)
          Sets the grouper associated with the table.
 void setPageBreakGroupIndex(int aValue)
          Returns the index of the grouping in the grouper at which an explicit.
 void setPaginate(java.lang.Boolean aValue)
          Sets whether the table is supposed to be paginated.
 void setReportMill(com.reportmill.base.ReportMill aReportMill)
          Report generation.
 void setReportMillDeep(com.reportmill.base.ReportMill aReportMill)
          Override to stifle child rpg.
 void setStartingPageBreak(boolean aFlag)
          Sets whether this table should always start on a new page (if in table group).
 java.lang.String toString()
          Standard to string implementation (prints class name and shape bounds).
 com.reportmill.archiver.RXElement toXMLShape(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
          XML archival.
 void toXMLShapeChildren(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
          XML archival - override to suppress archival of children.
 
Methods inherited from class com.reportmill.shape.RMSplitShape
addChild, addChildWithTitle, addChildWithTitle, arrangeChildren, boundsChanged, childrenSuperSelectImmediately, cloneDeep, getChildWithTitle, getResizeBarAtPoint, getResizeBarBounds, getTitleForChild, removeChild, setTitleForChild
 
Methods inherited from class com.reportmill.shape.RMShape
acceptsChildren, acceptsMouse, addBinding, addChild, animUpdate, bounds, boundsChanged, bringShapesToFront, checkBindings, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedSizeFromShape, convertedSizeToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertSizeFromShape, convertSizeToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, createDivideShapeRemainder, createLayout, createPartClone, divideShapeFromEdge, divideShapeFromTop, doLayout, firePropertyChange, fromXML, get, getAction, getAncestor, getAncestorCount, getAncestorInCommon, getAnim, getAnim, getAnimator, getAnimator, getAspectMapped, getAspects, getAutosizeHeight, getAutosizing, getBinder, getBinding, getBinding, getBindingCount, getBounds, getBoundsInside, getBoundsMarked, getBoundsMarkedDeep, getBoundsOfChildren, getCausesWrap, getCausesWrapType, getChild, getChildAnimator, getChildAnimator, getChildArray, getChildClipShape, getChildContaining, getChildCount, getChildCountHitable, getChildCountLayout, getChildCountVisible, getChildHitable, getChildLast, getChildLayout, getChildren, getChildrenIntersecting, getChildrenWhoCauseWrap, getChildrenWithClass, getChildrenWithClass, getChildVisible, getChildWithClass, getChildWithName, getClipShape, getColor, getDatasetEntity, getDocument, getEffect, getFill, getFill, getFillCount, getFont, getFormat, getFrame, getFrame, getFrameMaxX, getFrameMaxY, getFrameX, getFrameXY, getFrameY, getHeight, getHeightToFit, getImageFill, getLayout, getLineWidth, getMaskPath, getMaxX, getMaxY, getName, getOpacity, getOpacityDeep, getOriginal, getOutline, getPageBreak, getPageBreakMax, getPageBreakPage, getPageBreakPageMax, getPageShape, getParent, getParentWithClass, getPart, getPartCount, getPartDeep, getPartDeepCount, getPath, getPathInBounds, getReportMill, getRoll, getRootShape, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSizeP, getSkewX, getSkewY, getStroke, getStrokeColor, getTextColor, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getUrl, getVisbileBounds, getVisibleBounds, getVisibleBounds, getVisibleBounds, getWidth, getWidthToFit, getX, getXY, getXYP, getY, height, indexOf, indexOfChild, intersects, isAncestor, isAnimProperty, isDescendant, isEditing, isLocked, isMouseDown, isMouseOver, isRoot, isShowing, isUnderlined, isValid, isViewing, isVisible, layoutReset, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, notRSS, offsetChildrenXY, offsetXY, page, pageMax, paint, paintShapeAll, paintShapeChildren, put, removeBinding, removeBinding, removeChild, removeChildren, removeFromParent, repaint, repaint, resolvePageReferences, revalidate, sendShapesToBack, setAction, setAnim, setAutosizeHeight, setAutosizing, setBounds, setBounds, setCausesWrap, setCausesWrapType, setColor, setEffect, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHeight, setHeightToFit, setLayout, setLayoutEnabled, setLineWidth, setLocked, setName, setOpacity, setOutline, setParent, setReportMillBindings, setRoll, setScaleX, setScaleXY, setScaleY, setSize, setSize, setSizeP, setSizeToFit, setSizeToFit, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setTextColor, setTime, setUnderlined, setUrl, setVisible, setWidth, setWidthToFit, setX, setXY, setXY, setXYP, setY, shapeHidden, shapeShown, sizesToFitChildren, superSelectable, toXML, undoerDisable, undoerEnable, undoerSetUndoTitle, validate, width, x, y
 
Methods inherited from class com.reportmill.base.RMObject
addListener, addPropertyChangeListener, firePropertyChange, getListener, getListenerCount, getListeners, isFirePropertyChangeEnabled, isUndoing, removeListener, removePropertyChangeListener, setFirePropertyChangeEnabled, setUndoing
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RMTable

public RMTable()
Creates a plain table.


RMTable

public RMTable(java.lang.String aDatasetKey)
Creates a table with given dataset key (and corresponding default grouping and details row).

Method Detail

getDatasetKey

public java.lang.String getDatasetKey()
Returns the dataset key associated with the table.

Overrides:
getDatasetKey in class RMShape

setDatasetKey

public void setDatasetKey(java.lang.String aKeyPath)
Sets the dataset key associated with the table.


getFilterKey

public java.lang.String getFilterKey()
Returns the optional key chain expression string used to prune the table list derived from dataset key.


setFilterKey

public void setFilterKey(java.lang.String aKeyExpr)
Sets the optional key chain expression string used to prune the table list derived from dataset key.


getGrouper

public com.reportmill.base.RMGrouper getGrouper()
Returns the grouper associated with the table.


setGrouper

public void setGrouper(com.reportmill.base.RMGrouper aGrouper)
Sets the grouper associated with the table.


getGroupingCount

public int getGroupingCount()
Returns the number of groups in this table.


getGrouping

public RMGrouping getGrouping(int anIndex)
Returns the individual grouping at the given index.


getGrouping

public RMGrouping getGrouping(java.lang.String aKey)
Returns the individual grouping that has the same key as the one given.


addGroupingKey

public void addGroupingKey(java.lang.String aKey,
                           int anIndex)
Adds a grouping to the table for the given key string at the given grouping index.


addGrouping

public void addGrouping(RMGrouping aGrouping,
                        int anIndex)
Adds a given grouping to the table at the given grouping index.


removeGrouping

public void removeGrouping(RMGrouping aGrouping)
Removes the given grouping.


moveGrouping

public void moveGrouping(int fromIndex,
                         int toIndex)
Moves the grouping at the first index so that it resides at the second index.


addHeader

public void addHeader(java.lang.String aKey)
Convenience to add header for grouping key.


addDetails

public void addDetails(java.lang.String aKey)
Convenience to add details for grouping key.


addSummary

public void addSummary(java.lang.String aKey)
Convenience to add summary for grouping key.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent anEvent)
Called whenever grouper has changed to re-establish which rows remain and their order.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class RMShape

getPaginate

public java.lang.Boolean getPaginate()
Returns whether the table is supposed to be paginated.


setPaginate

public void setPaginate(java.lang.Boolean aValue)
Sets whether the table is supposed to be paginated.


getPageBreakGroupIndex

public int getPageBreakGroupIndex()
Returns the index of the grouping in the grouper at which an explicit.


setPageBreakGroupIndex

public void setPageBreakGroupIndex(int aValue)
Returns the index of the grouping in the grouper at which an explicit.


getStartingPageBreak

public boolean getStartingPageBreak()
Returns whether this table should always start on a new page (if in table group).


setStartingPageBreak

public void setStartingPageBreak(boolean aFlag)
Sets whether this table should always start on a new page (if in table group).


getColumnCount

public int getColumnCount()
Returns the number of columns that this table should be repeated over on the same page before paginating.


setColumnCount

public void setColumnCount(int aValue)
Sets the number of columns that this table should be repeated over on the same page before paginating.


getColumnSpacing

public float getColumnSpacing()
Returns the space between a table that has more than one column (int printer points).


setColumnSpacing

public void setColumnSpacing(float aValue)
Sets the space between a table that has more than one column (int printer points).


getRow

public RMTableRow getRow(int anIndex)
Returns the specific table row at the given index.


setReportMill

public void setReportMill(com.reportmill.base.ReportMill aReportMill)
Report generation.

Overrides:
setReportMill in class RMShape

setReportMillDeep

public void setReportMillDeep(com.reportmill.base.ReportMill aReportMill)
Override to stifle child rpg.

Overrides:
setReportMillDeep in class RMShape

paintShape

public void paintShape(com.reportmill.shape.RMShapePainter aPainter,
                       java.awt.Graphics2D g)
Paints a table shape.

Overrides:
paintShape in class RMShape

paintShapeOver

public void paintShapeOver(com.reportmill.shape.RMShapePainter aPainter,
                           java.awt.Graphics2D g)
Paints stroke around table after all children have drawn.

Overrides:
paintShapeOver in class RMShape

equals

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

Overrides:
equals in class com.reportmill.shape.RMSplitShape

clone

public RMTable clone()
Standard clone implementation.

Overrides:
clone in class com.reportmill.shape.RMSplitShape

toXMLShape

public com.reportmill.archiver.RXElement toXMLShape(com.reportmill.archiver.RXArchiver anArchiver,
                                                    java.lang.Object anOwner)
XML archival.

Overrides:
toXMLShape in class RMShape

toXMLShapeChildren

public void toXMLShapeChildren(com.reportmill.archiver.RXArchiver anArchiver,
                               com.reportmill.archiver.RXElement anElement,
                               java.lang.Object anOwner)
XML archival - override to suppress archival of children.

Overrides:
toXMLShapeChildren in class RMShape

fromXMLShape

public java.lang.Object fromXMLShape(com.reportmill.archiver.RXArchiver anArchiver,
                                     com.reportmill.archiver.RXElement anElement,
                                     java.lang.Object anOwner)
XML unarchival.

Overrides:
fromXMLShape in class RMShape

fromXMLShapeChildren

public void fromXMLShapeChildren(com.reportmill.archiver.RXArchiver anArchiver,
                                 com.reportmill.archiver.RXElement anElement,
                                 java.lang.Object anOwner)
XML unarchival for shape children.

Overrides:
fromXMLShapeChildren in class RMShape

toString

public java.lang.String toString()
Standard to string implementation (prints class name and shape bounds).

Overrides:
toString in class RMShape

ReportMill 11 API