Package com.inductiveautomation.rm.shape
Class RMTable
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.shape.RMShape
com.inductiveautomation.rm.shape.RMParentShape
com.inductiveautomation.rm.shape.RMTable
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,RMTypes
,RMShapeSelfInit
,PropertyChangeListener
,Cloneable
,EventListener
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 interface com.inductiveautomation.rm.base.RMTypes
RMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
-
Field Summary
FieldsFields inherited from class com.inductiveautomation.rm.shape.RMShape
BINDING_PROP_NAME, STROKE_BORDER, STROKE_DOUBLE, STROKE_HIDDEN, STROKE_SHAPE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChildWithTitle
(RMTableRow aChild, int anIndex, String aTitle) Convenience to set a child title and add to the table.addDetails
(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
(String aKey, int anIndex) Adds a grouping to the table for the given key string at the given grouping index.Convenience to add header for grouping key.addSummary
(String aKey) Convenience to add summary for grouping key.boolean
Editor method - indicates that children should super select immediately when split shape is super selected.clone()
Standard clone implementation.protected void
fromXMLChildren
(RXArchiver anArchiver, RXElement anElement) XML unarchival for shape children.protected void
fromXMLShape
(RXArchiver anArchiver, RXElement anElement) XML unarchival.getChildWithTitle
(String aTitle) Returns a specific child with the given name.int
Returns the number of columns that this table should be repeated over on the same page before paginating.double
Returns the space between a table that has more than one column (int printer points).Returns the dataset key associated with the table.Returns the optional key chain expression string used to prune the table list derived from dataset key.Returns the grouper associated with the table.getGrouping
(int anIndex) Returns the individual grouping at the given index.getGrouping
(String aKey) Returns the individual grouping that has the same key as the one given.getGrouping
(String aKey, boolean doCreate, int anIndex) Returns the individual grouping that has the same key as the one given, with option to create at index if missing.int
Returns the number of groups in this table.int
Returns the index of the grouping in the grouper at which an explicit.int
getResizeBarAtPoint
(RMPoint aPoint) Returns the index of the resize bar that is hit by the given point.getResizeBarBounds
(int anIndex) Returns the bounds rect of the resize bar for the child at the given index.getRow
(int anIndex) Returns the specific table row at the given index.Returns the specific table row with the given name.boolean
Returns whether this table should always start on a new page (if in table group).boolean
Returns whether each row should always start on a new page (if in a table group).boolean
Override to paint table stroke on top.protected void
Called when there is a grouper change to ensure that table rows match groupings.protected void
Performs layout.void
moveGrouping
(int fromIndex, int toIndex) Moves the grouping at the first index so that it resides at the second index.void
paintShape
(RMShapePainter aPntr) Paints a table shape.void
paintShapeOver
(RMShapePainter aPntr) Paints stroke around table after all children have drawn.void
propertyChange
(PropertyChangeEvent anEvent) Override to update rows when grouper changes and revalidate when child height changes.void
removeGrouping
(RMGrouping aGrouping) Removes the given grouping.rpgAll
(ReportOwner anOwner, RMShape aParent) Report generation for table.void
selfInit()
void
setColumnCount
(int aValue) Sets the number of columns that this table should be repeated over on the same page before paginating.void
setColumnSpacing
(double aValue) Sets the space between a table that has more than one column (int printer points).void
setDatasetKey
(String aKeyPath) Sets the dataset key associated with the table.void
setFilterKey
(String aKeyExpr) Sets the optional key chain expression string used to prune the table list derived from dataset key.void
setGrouper
(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
setStartingPageBreak
(boolean aFlag) Sets whether this table should always start on a new page (if in table group).void
setStartingRowPageBreak
(boolean aFlag) Sets whether this table's rows should always start on a new page (if in table group).void
setTitleForChild
(String aNm1, String aNm2) Sets title for child of given name to new name.toString()
Standard to string implementation (prints class name and shape bounds).protected RXElement
toXMLShape
(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.shape.RMParentShape
addChild, addChild, addChild, addChild, addLayoutChild, bringShapesToFront, cloneDeep, computePrefHeight, computePrefWidth, divideShapeFromTop, fromXML, getBoundsOfChildren, getChild, getChildArray, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWithClass, getChildrenWithClass, getChildWithClass, getChildWithName, getLayout, getNeedsLayout, getSourceURL, indexOfChild, isHittable, isShowing, isSourceURLSet, layout, relayout, removeChild, removeChild, removeChildren, removeLayoutChild, rpgChildren, sendShapesToBack, setHeight, setLayout, setNeedsLayout, setSourceURL, setWidth, toXML, toXMLChildren
Methods inherited from class com.inductiveautomation.rm.shape.RMShape
acceptsChildren, acceptsMouse, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, createDivideShapeRemainder, deepChange, divideShapeFromEdge, get, get, getAlignment, getAlignmentX, getAlignmentY, getAncestor, getAncestorCount, getAncestorInCommon, getAnimator, getAnimator, getAutosizing, getAutosizingDefault, getBestHeight, getBestHeight, getBestWidth, getBestWidth, getBinding, getBinding, getBindingCount, getBindings, getBounds, getBoundsInside, getBoundsMarked, getBoundsMarkedDeep, getChildAnimator, getChildAnimator, getChildClipShape, getClipShape, getColor, getDashArrayString, getDashPhase, getDatasetEntity, getDisplayedFill, getDisplayedStroke, getDocument, getEffect, getEventAdapter, getFill, getFont, getFormat, getFrame, getFrameHeight, getFrameMaxX, getFrameMaxY, getFrameWidth, getFrameX, getFrameXY, getFrameY, getHeight, getHover, getLayoutInfo, getMaskPath, getMaxX, getMaxY, getMinHeight, getMinHeight, getMinWidth, getMinWidth, getName, getOpacity, getOpacityDeep, getOutline, getPageBreak, getPageBreakMax, getPageBreakPage, getPageBreakPageMax, getPageShape, getParent, getParent, getPath, getPathInBounds, getPrefHeight, getPrefHeight, getPrefWidth, getPrefWidth, getPropertyNameMapped, getPropertyNames, getPropertyNames, getRoll, getRootShape, getRSS, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSkewX, getSkewY, getStroke, getStrokeColor, getStrokeStyle, getStrokeWidth, getTextColor, getTimeline, getTimeline, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getURL, getVisbileBounds, getVisibleBounds, getVisibleBounds, getVisibleBounds, getWidth, getX, getXY, getXYP, getY, height, indexOf, intersects, isAncestor, isAnimProperty, isDeletable, isDescendant, isEditing, isEnabled, isFontSet, isHittable, isLocked, isMinHeightSet, isMinWidthSet, isPrefHeightSet, isPrefWidthSet, isRoot, isRSS, isShowing, isUnderlined, isUseFill, isUseStroke, isViewing, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, offsetXY, page, pageMax, paint, paintShapeAll, paintShapeChildren, put, removeBinding, removeBinding, removeDeepChangeListener, removeFromParent, removeMouseListener, repaint, repaint, resolvePageReferences, rpgBindings, rpgShape, setAlignment, setAlignmentX, setAlignmentY, setAutosizing, setBestHeight, setBestSize, setBounds, setBounds, setColor, setDashArrayString, setDashPhase, setEffect, setEnabled, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHover, setLayoutInfo, setLocked, setMinHeight, setMinSize, setMinWidth, setName, setOpacity, setOutline, setParent, setPrefHeight, setPrefWidth, setRoll, setScaleX, setScaleXY, setScaleY, setShowing, setSize, setSize, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setStrokeStyle, setStrokeWidth, setTextColor, setTime, setTimeline, setUnderlined, setURL, setUseFill, setUseStroke, setVisible, setX, setXY, setXY, setXYP, setY, shapeHidden, shapeShown, superSelectable, undoerDisable, undoerEnable, undoerSetUndoTitle, width, x, y
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Field Details
-
DEFAULT_TABLE_DATAKEY
- See Also:
-
-
Constructor Details
-
RMTable
public RMTable()Creates a plain table. -
RMTable
Creates a table with given dataset key (and corresponding default grouping and details row).
-
-
Method Details
-
selfInit
public void selfInit()- Specified by:
selfInit
in interfaceRMShapeSelfInit
-
getDatasetKey
Returns the dataset key associated with the table.- Overrides:
getDatasetKey
in classRMShape
-
setDatasetKey
Sets the dataset key associated with the table. -
getFilterKey
Returns the optional key chain expression string used to prune the table list derived from dataset key. -
setFilterKey
Sets the optional key chain expression string used to prune the table list derived from dataset key. -
getGrouper
Returns the grouper associated with the table. -
setGrouper
Sets the grouper associated with the table. -
getGroupingCount
public int getGroupingCount()Returns the number of groups in this table. -
getGrouping
Returns the individual grouping at the given index. -
getGrouping
Returns the individual grouping that has the same key as the one given. -
getGrouping
Returns the individual grouping that has the same key as the one given, with option to create at index if missing. -
addGroupingKey
Adds a grouping to the table for the given key string at the given grouping index. -
addGrouping
Adds a given grouping to the table at the given grouping index. -
removeGrouping
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
Convenience to add header for grouping key. -
addDetails
Convenience to add details for grouping key. -
addSummary
Convenience to add summary for grouping key. -
propertyChange
Override to update rows when grouper changes and revalidate when child height changes.- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classRMShape
-
grouperChanged
protected void grouperChanged()Called when there is a grouper change to ensure that table rows match groupings. -
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). -
getStartingRowPageBreak
public boolean getStartingRowPageBreak()Returns whether each row should always start on a new page (if in a table group). -
setStartingPageBreak
public void setStartingPageBreak(boolean aFlag) Sets whether this table should always start on a new page (if in table group). -
setStartingRowPageBreak
public void setStartingRowPageBreak(boolean aFlag) Sets whether this table's rows 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 double getColumnSpacing()Returns the space between a table that has more than one column (int printer points). -
setColumnSpacing
public void setColumnSpacing(double aValue) Sets the space between a table that has more than one column (int printer points). -
getRow
Returns the specific table row at the given index. -
getRow
Returns the specific table row with the given name. -
getChildWithTitle
Returns a specific child with the given name. -
setTitleForChild
Sets title for child of given name to new name. -
addChildWithTitle
Convenience to set a child title and add to the table. -
getResizeBarBounds
Returns the bounds rect of the resize bar for the child at the given index. -
getResizeBarAtPoint
Returns the index of the resize bar that is hit by the given point. -
childrenSuperSelectImmediately
public boolean childrenSuperSelectImmediately()Editor method - indicates that children should super select immediately when split shape is super selected.- Overrides:
childrenSuperSelectImmediately
in classRMShape
-
layoutChildren
protected void layoutChildren()Performs layout.- Overrides:
layoutChildren
in classRMParentShape
-
rpgAll
Report generation for table.- Overrides:
rpgAll
in classRMParentShape
-
paintShape
Paints a table shape.- Overrides:
paintShape
in classRMShape
-
paintShapeOver
Paints stroke around table after all children have drawn.- Overrides:
paintShapeOver
in classRMShape
-
getStrokeOnTop
public boolean getStrokeOnTop()Override to paint table stroke on top.- Overrides:
getStrokeOnTop
in classRMShape
-
clone
Standard clone implementation.- Overrides:
clone
in classRMParentShape
-
toXMLShape
XML archival.- Overrides:
toXMLShape
in classRMParentShape
-
fromXMLShape
XML unarchival.- Overrides:
fromXMLShape
in classRMParentShape
-
fromXMLChildren
XML unarchival for shape children.- Overrides:
fromXMLChildren
in classRMParentShape
-
toString
Standard to string implementation (prints class name and shape bounds).
-