Package com.reportmill.shape
Class RMCellTable
- java.lang.Object
-
- com.reportmill.base.RMObject
-
- com.reportmill.shape.RMShape
-
- com.reportmill.shape.RMCellTable
-
- All Implemented Interfaces:
RMArchiver.Archiving
,java.lang.Cloneable
public class RMCellTable extends RMShape
Manages a table of RMCells, which is really a stack of RMCellRows.
-
-
Field Summary
-
Fields inherited from class com.reportmill.shape.RMShape
WRAP_TYPE_BOTH, WRAP_TYPE_NONE
-
-
Constructor Summary
Constructors Constructor Description RMCellTable()
Creates a new cell table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumn(int anIndex, int refColumn)
Adds a column at the given index.void
addColumnDivider(double anX)
Adds a column divider at the given x coordinate.void
addRow(int anIndex, int refRow)
Adds a row at the given index.void
addRowDivider(double aY)
Adds a row divider at the given y coordinate.java.lang.Object
fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.RMCell
getCell(int aRow, int aColumn)
Returns the cell at the given row and column indexes.java.awt.Rectangle
getCellRect(java.awt.geom.Rectangle2D aRect)
Returns the cell rect for the given rectangle2d.int
getColumn(double anX)
Returns the specific column index for the given point.RMCellColumn
getColumn(int anIndex)
Returns the specific column at the given index.int
getColumnCount()
Returns the number of rows for this table.boolean
getHasHeaderColumn()
Returns whether table has header column.boolean
getHasHeaderRow()
Returns whether table has header row.int
getRow(double aY)
Returns the specific row index for the given point.RMCellRow
getRow(int anIndex)
Returns the specific row at the given index.int
getRowCount()
Returns the number of rows.void
mergeCells(int aRow1, int aCol1, int aRow2, int aCol2)
Merges a range of cells into one cell.void
removeColumn(int anIndex)
Removes the column at the given index.void
removeRow(int anIndex)
Removes the row at the given index.void
setColumnCount(int aColumnCount)
Sets the number of columns for this table.void
setHasHeaderColumn(boolean aFlag)
Sets whether table has header column.void
setHasHeaderRow(boolean aFlag)
Sets whether table has header row.void
setHeight(double aValue)
Overrides shape method to validate.void
setRowCount(int aRowCount)
Sets the number of rows.void
setWidth(double aValue)
Overrides shape method to revalidate.void
splitCellIntoColumns(RMCell aCell)
Splits a cell into 2 columns through it's mid point.void
splitCellIntoRows(RMCell aCell)
Splits a cell into 2 rows through it's mid point.boolean
superSelectable()
Editor method.RXElement
toXML(RXArchiver anArchiver)
XML archival.void
validate()
Relays out table rows, columns and cells.-
Methods inherited from class com.reportmill.shape.RMShape
acceptsChildren, acceptsDragKeys, acceptsFormat, acceptsMouse, addChild, addChild, addChildBelowLastChild, bounds, boundsChanged, boundsChanged, bringShapesToFront, canBeUngrouped, childrenSuperSelectImmediately, clone, cloneDeep, contains, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedSizeFromShape, convertedSizeToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertSizeFromShape, convertSizeToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copy, copyShape, delete, didChange, divideShapeFromEdge, divideShapeFromTop, dragExit, dragKeyAtPoint, dropKeyAtPoint, equals, 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, getDocument, 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, getPageCount, getPageShape, getParent, getParentCount, getParents, getPath, getPathInBounds, getPropertyKey, getPropertyKeyCount, getPropertyKeyName, getRoll, getRootShape, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSizeP, getSkewX, getSkewY, getStroke, getStrokeColor, getTextColor, getToolClassName, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getUrl, getWidth, getWidthToFit, getX, getXY, getXYP, getY, groupShapes, hasPageBreaks, height, indexOf, indexOf, initWithArchiver, 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, rpgClone, 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, setHeightDeep, setHeightDeep, setHeightToFit, setLineWidth, setListKey, setLocked, setName, setNeedsRepaint, setNeedsRepaint, setOpacity, setOutline, setParent, setRoll, setScaleX, setScaleXY, setScaleY, setSize, setSize, setSizeDeep, setSizeP, setSizeToFit, setSizeToFit, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setTextColor, setTime, setUnderlined, setUrl, setWidthDeep, setWidthDeep, setWidthToFit, setX, setXY, setXY, setXYP, setY, sizesToFitChildren, toString, undoClone, undoCopy, undoEquals, undoerAddDirtyObject, undoerDisable, undoerEnable, undoerSetUndoTitle, width, willChange, willChange, x, y
-
Methods inherited from class com.reportmill.base.RMObject
didUndo, getAnimAttribute, getClassNameShort
-
-
-
-
Method Detail
-
getRowCount
public int getRowCount()
Returns the number of rows.
-
getRow
public RMCellRow getRow(int anIndex)
Returns the specific row at the given index.
-
getColumnCount
public int getColumnCount()
Returns the number of rows for this table.
-
getColumn
public RMCellColumn getColumn(int anIndex)
Returns the specific column at the given index.
-
getCell
public RMCell getCell(int aRow, int aColumn)
Returns the cell at the given row and column indexes.
-
getRow
public int getRow(double aY)
Returns the specific row index for the given point.
-
getColumn
public int getColumn(double anX)
Returns the specific column index for the given point.
-
getCellRect
public java.awt.Rectangle getCellRect(java.awt.geom.Rectangle2D aRect)
Returns the cell rect for the given rectangle2d.
-
addRow
public void addRow(int anIndex, int refRow)
Adds a row at the given index.
-
removeRow
public void removeRow(int anIndex)
Removes the row at the given index.
-
addColumn
public void addColumn(int anIndex, int refColumn)
Adds a column at the given index.
-
removeColumn
public void removeColumn(int anIndex)
Removes the column at the given index.
-
setRowCount
public void setRowCount(int aRowCount)
Sets the number of rows.
-
setColumnCount
public void setColumnCount(int aColumnCount)
Sets the number of columns for this table.
-
getHasHeaderRow
public boolean getHasHeaderRow()
Returns whether table has header row.
-
setHasHeaderRow
public void setHasHeaderRow(boolean aFlag)
Sets whether table has header row.
-
getHasHeaderColumn
public boolean getHasHeaderColumn()
Returns whether table has header column.
-
setHasHeaderColumn
public void setHasHeaderColumn(boolean aFlag)
Sets whether table has header column.
-
addColumnDivider
public void addColumnDivider(double anX)
Adds a column divider at the given x coordinate.
-
addRowDivider
public void addRowDivider(double aY)
Adds a row divider at the given y coordinate.
-
splitCellIntoColumns
public void splitCellIntoColumns(RMCell aCell)
Splits a cell into 2 columns through it's mid point.
-
splitCellIntoRows
public void splitCellIntoRows(RMCell aCell)
Splits a cell into 2 rows through it's mid point.
-
mergeCells
public void mergeCells(int aRow1, int aCol1, int aRow2, int aCol2)
Merges a range of cells into one cell.
-
setWidth
public void setWidth(double aValue)
Overrides shape method to revalidate.
-
setHeight
public void setHeight(double aValue)
Overrides shape method to validate.
-
validate
public void validate()
Relays out table rows, columns and cells.
-
superSelectable
public boolean superSelectable()
Editor method.- Overrides:
superSelectable
in classRMShape
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML archival.
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.
-
-