Package com.inductiveautomation.rm.shape
Class RMCrossTab
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.RMCrossTab
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,RMTypes
,RMShapeSelfInit
,PropertyChangeListener
,Cloneable
,EventListener
Manages a table of RMCells, which is really a stack of RMCellRows.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypes
RMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields 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
addCol()
Adds a column.void
addCol
(int anIndex) Adds a column.void
addCol
(RMCrossTabCol aCol, int anIndex) Adds a column at the given index.void
addRow()
Adds a row.void
addRow
(int anIndex) Adds a row at given index.void
addRow
(RMCrossTabRow aRow, int anIndex) Adds a row at the given index.void
applyCellFormatting
(RMCrossTabCell aSourceCell, RMCrossTabCell aDestCell) Copy all relevant cell formatting options from source to destination.void
applyFormatting
(int styleIndex) clone()
Standard clone implementation.Clone deep.divideShapeFromTop
(double anAmount) Divides the shape by a given amount from the top.protected void
fromXMLShape
(RXArchiver anArchiver, RXElement anElement) XML unarchival.getCell
(int aRow, int aColumn) Returns the cell at the given row and column indexes.int
getCol
(double anX) Returns the specific column index for the given point.getCol
(int anIndex) Returns the specific column at the given index.int
Returns the number of rows for this table.Returns the dataset key.int
int
Returns the optional key chain expression string used to prune the table list derived from dataset key.int
int
Returns the number header columns for table.int
Returns the number of header rows for table.protected void
getPropertyNames
(List<String> aList) Returns the property names for crosstab.int
getRow
(double aY) Returns the specific row index for the given point.getRow
(int anIndex) Returns the specific row at the given index.int
Returns the number of rows.boolean
Override this for shapes (like a table row) that don't don't make sense to delete by themselves.protected void
Relays out table rows, columns and cells.void
mergeCells
(int aRow1, int aCol1, int aRow2, int aCol2) Merges a range of cells into one cell.removeCol
(int anIndex) Removes the column at the given index.removeRow
(int anIndex) Removes the row at the given index.rpgAll
(ReportOwner anRptOwner, RMShape aParent) Sets a reportmill for this crosstab (which really gets the dataset and calls setObjects).void
selfInit()
protected void
setCell
(RMCrossTabCell aCell, int aRow, int aCol, int aRowSpan, int aColSpan) Sets the cell at the given row and column indexes.void
setColumnCount
(int aColumnCount) Sets the number of columns for this table.void
setDatasetKey
(String aKey) Sets the dataset key.void
setDisplayColumnCount
(int cols) void
setDisplayRowCount
(int rows) void
setFilterKey
(String aKeyExpr) Sets the optional key chain expression string used to prune the table list derived from dataset key.void
setFormatStyle
(int formatStyle) void
setHeaderColumnCount
(int aCount) Sets the number header columns for table.void
setHeaderRowCount
(int aCount) Sets the number of header rows for table.void
setRowCount
(int aRowCount) Sets the number of rows.void
splitCell
(RMCrossTabCell aCell) Splits a cell.protected void
toXMLChildren
(RXArchiver anArchiver, RXElement anElement) XML archival - override to suppress archival of children.protected RXElement
toXMLShape
(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.shape.RMParentShape
addChild, addChild, addChild, addChild, addLayoutChild, bringShapesToFront, computePrefHeight, computePrefWidth, fromXML, fromXMLChildren, 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
Methods inherited from class com.inductiveautomation.rm.shape.RMShape
acceptsChildren, acceptsMouse, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, childrenSuperSelectImmediately, 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, getRoll, getRootShape, getRSS, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSkewX, getSkewY, getStroke, getStrokeColor, getStrokeOnTop, 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, 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, paintShape, paintShapeAll, paintShapeChildren, paintShapeOver, propertyChange, 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, toString, 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_STYLE
public static final int DEFAULT_STYLE- See Also:
-
NONE
public static final int NONE- See Also:
-
CLASSIC1
public static final int CLASSIC1- See Also:
-
CLASSIC2
public static final int CLASSIC2- See Also:
-
CLASSIC3
public static final int CLASSIC3- See Also:
-
CLASSIC4
public static final int CLASSIC4- See Also:
-
DEFAULT
public static final int DEFAULT- See Also:
-
ELEGANT
public static final int ELEGANT- See Also:
-
GRID1
public static final int GRID1- See Also:
-
GRID2
public static final int GRID2- See Also:
-
GRID3
public static final int GRID3- See Also:
-
GRID4
public static final int GRID4- See Also:
-
GRID5
public static final int GRID5- See Also:
-
GRID6
public static final int GRID6- See Also:
-
GRID7
public static final int GRID7- See Also:
-
GRID8
public static final int GRID8- See Also:
-
LIST1
public static final int LIST1- See Also:
-
LIST2
public static final int LIST2- See Also:
-
LIST3
public static final int LIST3- See Also:
-
LIST4
public static final int LIST4- See Also:
-
LIST5
public static final int LIST5- See Also:
-
LIST6
public static final int LIST6- See Also:
-
PROFESSIONAL
public static final int PROFESSIONAL- See Also:
-
SIMPLE1
public static final int SIMPLE1- See Also:
-
SIMPLE2
public static final int SIMPLE2- See Also:
-
SIMPLE3
public static final int SIMPLE3- See Also:
-
-
Constructor Details
-
RMCrossTab
public RMCrossTab()Creates a new RMCrossTab.
-
-
Method Details
-
selfInit
public void selfInit()- Specified by:
selfInit
in interfaceRMShapeSelfInit
-
getDatasetKey
Returns the dataset key.- Overrides:
getDatasetKey
in classRMShape
-
setDatasetKey
Sets the dataset key. -
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. -
setFormatStyle
public void setFormatStyle(int formatStyle) -
getFormatStyle
public int getFormatStyle() -
getRowCount
public int getRowCount()Returns the number of rows. -
setRowCount
public void setRowCount(int aRowCount) Sets the number of rows. -
getRow
Returns the specific row at the given index. -
addRow
public void addRow()Adds a row. -
addRow
public void addRow(int anIndex) Adds a row at given index. -
addRow
Adds a row at the given index. If reference row index is provided, the referenced row object is copied for new row. If reference column index is provided, previous columns cells are merged, successive column cells are cloned. -
removeRow
Removes the row at the given index. -
getCol
Returns the specific column at the given index. -
addCol
public void addCol()Adds a column. -
addCol
public void addCol(int anIndex) Adds a column. -
addCol
Adds a column at the given index. If reference column index is provided, the referenced column object is copied for new column. If reference row index is provided, previous row cells are merged, successive row cells are cloned. -
removeCol
Removes the column at the given index. -
getRow
public int getRow(double aY) Returns the specific row index for the given point. -
getCol
public int getCol(double anX) Returns the specific column index for the given point. -
getCell
Returns the cell at the given row and column indexes. -
setCell
Sets the cell at the given row and column indexes. -
setDisplayRowCount
public void setDisplayRowCount(int rows) -
getDisplayRowCount
public int getDisplayRowCount() -
setDisplayColumnCount
public void setDisplayColumnCount(int cols) -
getDisplayColumnCount
public int getDisplayColumnCount() -
getHeaderRowCount
public int getHeaderRowCount()Returns the number of header rows for table. -
setHeaderRowCount
public void setHeaderRowCount(int aCount) Sets the number of header rows for table. -
getHeaderColumnCount
public int getHeaderColumnCount()Returns the number header columns for table. -
setHeaderColumnCount
public void setHeaderColumnCount(int aCount) Sets the number header columns for table. -
mergeCells
public void mergeCells(int aRow1, int aCol1, int aRow2, int aCol2) Merges a range of cells into one cell. -
splitCell
Splits a cell. -
layoutChildren
protected void layoutChildren()Relays out table rows, columns and cells.- Overrides:
layoutChildren
in classRMParentShape
-
getColumnCount
public int getColumnCount()Returns the number of rows for this table. -
setColumnCount
public void setColumnCount(int aColumnCount) Sets the number of columns for this table. -
rpgAll
Sets a reportmill for this crosstab (which really gets the dataset and calls setObjects).- Overrides:
rpgAll
in classRMParentShape
-
divideShapeFromTop
Divides the shape by a given amount from the top. Returns a clone of the given shape with bounds set to the remainder. Divides children among the two shapes (recursively calling divide shape for those straddling).- Overrides:
divideShapeFromTop
in classRMParentShape
-
getPropertyNames
Returns the property names for crosstab.- Overrides:
getPropertyNames
in classRMShape
-
isDeletable
public boolean isDeletable()Description copied from class:RMShape
Override this for shapes (like a table row) that don't don't make sense to delete by themselves.- Overrides:
isDeletable
in classRMShape
-
clone
Standard clone implementation.- Overrides:
clone
in classRMParentShape
-
cloneDeep
Clone deep.- Overrides:
cloneDeep
in classRMParentShape
-
toXMLShape
XML archival.- Overrides:
toXMLShape
in classRMParentShape
-
applyFormatting
public void applyFormatting(int styleIndex) -
applyCellFormatting
Copy all relevant cell formatting options from source to destination. -
toXMLChildren
XML archival - override to suppress archival of children.- Overrides:
toXMLChildren
in classRMParentShape
-
fromXMLShape
XML unarchival.- Overrides:
fromXMLShape
in classRMParentShape
-