Package com.reportmill.shape
Class RMShape
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.shape.RMShape
- All Implemented Interfaces:
RMArchiver.Archiving
,Cloneable
- Direct Known Subclasses:
BarcodeShape
,LineGraph
,RJShape
,RMCellTable
,RMCrossTab
,RMDocument
,RMGraph
,RMGraphBar.RMGraphBarView
,RMGraphPie.RMGraphPieView
,RMGraphRPG
,RMLabel
,RMLabels
,RMLineSegment
,RMNestedDoc
,RMOval
,RMPage
,RMPolygon
,RMRectangle
,RMScene3D
,RMSound
,RMSplitShape
,RMSwitchShape
,RMTableGroup
,RMTableRPG
This class is the basis for all graphic elements in a ReportMill document. You'll rarely use this class directly,
however, it encapsulates all the basic shape attributes and the most common methods used in template manipulation,
like setX(), setY(), setWidth(), setColor(), etc.
Here's an example of programatically adding a watermark to a document:
RMFont font = RMFont.getFont("Arial Bold", 72); RMColor color = new RMColor(.9f, .9f, .9f); RMXString string = new RMXString("REPORTMILL", font, color); RMText shape = new RMText(string); myDocument.getPage(0).addChild(shape); shape.setBounds(36, 320, 540, 140); shape.setRoll(45); shape.setOpacity(.667f);
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
static final byte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Editor method.boolean
Editor method.boolean
Returns whether the shape can accept a format.boolean
Viewer method.void
Adds the given child to the end of this shape's children list.void
Adds the given child to this shape's children list at the given index.void
addChildBelowLastChild
(RMShape aChild) Adds the given child to the end of this shape's children list at a y position just below previously last child.bounds()
Returns raw x, y, width and height of shape as rect (preserves possible negative sizes).void
Notifies a shape and its parents that its bounds changed.void
boundsChanged
(RMShape aShape) Notifies this shape that a given shape's bounds have changed (presumably a descendant).void
bringShapesToFront
(List shapes) Moves the subset of children in the given list to the front of the children list.boolean
Editor method.boolean
Editor method.clone()
Standard implementation of Object clone.Clones all attributes of this shape with complete clones of its children as well.boolean
Returns whether this shape is hit by the point, given in this shape's parent's coords.convertedPointFromShape
(RMPoint aPoint, RMShape aShape) Returns the given point converted from the given shape's coords.convertedPointToShape
(RMPoint aPoint, RMShape aShape) Returns the given point converted to the given shape's coords.convertedRectFromShape
(RMRect aRect, RMShape aShape) Returns the rect encompassing the given rect converted from the given shape's coords.convertedRectToShape
(RMRect aRect, RMShape aShape) Returns the rect encompassing the given rect converted to the given shape's coords.convertedSizeFromShape
(RMSize aSize, RMShape aShape) Returns the given size converted from the given shape's coords.convertedSizeToShape
(RMSize aSize, RMShape aShape) Returns the given size converted to the given shape's coords.convertedVectorFromShape
(RMSize aSize, RMShape aShape) Returns the given size converted from the given shape's coords and normalized.convertedVectorToShape
(RMSize aSize, RMShape aShape) Returns the given size converted to the given shape's coords and normalized.void
convertFromShape
(RMShape aShape) Transforms the given shape from this shape's coords.convertPathFromShape
(RMPath aPath, RMShape aShape) Returns the given path converted from the given shape's coords.convertPathToShape
(RMPath aPath, RMShape aShape) Returns the given path converted to the given shape's coords.convertPointFromShape
(RMPoint point, RMShape shape) Converts the given point to the given shape's coords (returns it for convenience).convertPointToShape
(RMPoint point, RMShape shape) Converts the given point to the given shape's coords (returns it for convenience).convertRectFromShape
(RMRect rect, RMShape shape) Converts the given rect from the given shape's coords (returns it for convenience).convertRectToShape
(RMRect rect, RMShape shape) Converts the given rect to the given shape's coords (returns it for convenience).convertSizeFromShape
(RMSize size, RMShape shape) Converts the given size from the given shape's coords (returns it for convenience).convertSizeToShape
(RMSize size, RMShape shape) Converts the given size to the given shape's coords (returns it for convenience).void
convertToShape
(RMShape aShape) Transforms the given shape to this shape's coords.convertVectorFromShape
(RMSize size, RMShape shape) Converts the given size (as a vector) from the given shape's coords (returns it for convenience).convertVectorToShape
(RMSize size, RMShape shape) Converts the given size (as a vector) to the given shape's coords (returns it for convenience).void
Copies all the attributes of the given object that are in common with this object.void
Copies basic shape attributes from given RMShape (location, size, fill, stroke, roll, scale, name, url, etc.).void
delete()
Called when a shape is removed from a shape heirarchy.void
Undo support.divideShapeFromEdge
(float amount, byte edge, RMShape newShape) Divides the shape by a given amount from the given edge.divideShapeFromTop
(float amount) Divides the shape by a given amount from the top.void
dragExit()
Editor method.void
dragKeyAtPoint
(String aKey, RMPoint aPoint) Editor method.void
dropKeyAtPoint
(String aKey, RMPoint aPoint) Editor method.boolean
Standard implementation of Object equals.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.void
fromXMLDeep
(RXArchiver anArchiver, RXElement anElement) XML unarchival for shape childrenReturns the Object associated with the given name for the shape.Sets the ActionScript for the shape.getAnim()
Returns the collection of animation records for this shape.getAnim
(boolean create) Returns the collection of animation records for this shape, with an option to create if absent.Returns the animator that this shape registers changes with.getAnimator
(boolean create) Returns the animator that this shape registers changes with (creating, if requested and currently null).boolean
Returns whether the shape's height is set automatically to its ideal height during report generation.Returns the autosizing settings as a string with hyphens for struts and tilde for sprints (horiz,vert).Returns the X, Y, width and height of the shape as a rect (use getFrame if shape has roll/scale/skew).Returns the bounds of the shape in the shape's own coords.Returns the bounds of the path associated with this shape in parent coords, ajusted to account for stroke width.Returns bounds of all children of this shape, which can sometimes differ from this shapes bounds.getBoundsOfChildren
(List aList) Returns the bounds of a given subset of this shape's children.Returns the bounds of the shape in parect coords when super selected (same as getBoundsMarked by default).boolean
Returns whether this shape causes text wrap.byte
Returns how this shape causes text wrap.getChild
(int anIndex) Returns the child at the given index.Returns the animator that this shape's children use.getChildAnimator
(boolean create) Returns the animator that this shape's children use (creating, if requested and currently null).getChildContaining
(RMPoint aPoint) Returns the first (top) shape hit by the point given in this shape's coords.int
Returns the number of children associated with this shape.Returns the last child of this shape.Returns the list of children associated with this shape.getChildrenIntersecting
(RMPath aPath) Returns the child shapes hit by the path given in this shape's coords.getChildrenWhoCauseWrap
(RMShape aPeer) Returns the subset of children that cause wrap.Returns the subset of children that should be drawn (useful for implementing page layering).Returns the subset of children that should be used for hit detection (useful for implementing page layering).getChildSortedByX
(int anIndex) Returns the child at a given index, ordered by X (left-to-right) ordergetChildWithClass
(Class aClass) Returns first child found with the given class (called recursively on children if not found at current level).getChildWithName
(String aName) Returns first child found with the given name (called recursively on children if not found at current level).getColor()
Returns the color of the shape.getCommonAncestor
(RMShape aShape) Returns first ancestor that the given shape and this shape have in common.Returns the RMDocument ancestor of this shape (or null if not there).getFill()
Returns the fill for this shape.getFill
(int anIndex) Returns the specific fill at the given index.Returns the specific fill with the given class.int
Returns the number of fills associated with this shape.getFills()
Returns this list of fills - a special list that can be operated on directly.getFont()
Returns the font for the shape.Returns the format for the shape.getFrame()
Returns the rect in parent coords that fully encloses the shape.Returns the rect that fully encloses the receiver in the given shape's coords.float
Returns the max X of the shape's frame.float
Returns the max Y of the shape's frame.float
Returns the X of the rect that fully encloses the shape in parent coords.Returns the origin of the shape's bounds rect in parent coords.float
Returns the Y of the rect that fully encloses the shape in parent coords.getGroupShape
(List shapes) Returns a newly created RMShape whose bounds has been set to the combined bounds of the subset of children in the given list.float
Returns the height of the shape.float
Returns the ideal height of this shape to accommodate its contents (just the current height for most shapes).Returns the imageFill for this shape (or null, if fill isn't an RMImageFill).float
Returns the line width of the shape's stroke in printer points.Returns the "List Key" associated with this shape.Returns the concatenated list keys of this shape and its parents (useful for nested list key shapes.Returns the real shape used to resolve the list key for this shape.float
getMaxX()
Returns the max X of the shape (assumes not rotated, scaled or skewed).float
getMaxY()
Returns the max Y of the shape (assumes not rotated, scaled or skewed).getName()
Returns the name for the shape.float
Returns the opactiy of the shape (1 for opaque, 0 for transparent).float
Returns the combined opacity of this shape and its parent.Returns the outline for the shape.int
Returns the number of pages associated with this shape.Returns the RMPage ancestor of this shape (or null if not there).Returns the parent of this shape.int
Returns the number of ancestors (from this shape's parent up to the document).Returns a list of this shape's parent, and that shape's parent, up to document.getPath()
Returns the shape's path.Returns the shape's path scaled to the shape's current bounds.getPropertyKey
(String aName) Returns the specific property key for the given property name.int
Returns the number of property keys (like IsVisible, FillColor, StrokeColor, Width, etc.)getPropertyKeyName
(int anIndex) Returns the specific settable property key name at the given index.float
getRoll()
Returns the roll of the shape.Returns the top level shape (usually an RMDocument).float
Returns the scale of the X axis of the shape.float
Returns the scale of the Y axis of the shape.getShapesToAncestor
(RMShape shape) Returns a list of shapes from this shape to a given ancestor.getShapesToDescendant
(RMShape aShape) Returns a list of shape's from this shape to given desendant.getShapesToShape
(RMShape aShape) Returns a list of shapes from this shape to given shape.getSize()
Returns the size of the shape.getSizeP()
Returns the size of the shape in parent coords.float
getSkewX()
Returns the skew of the X axis of the shape.float
getSkewY()
Returns the skew of the Y axis of the shape.Returns the stroke for this shape.Returns the stroke color of the shape.Returns the text color for the shape.Editor method - returns the tool class name for this shape.Returns the transform to this shape from its parent.getTransformFromShape
(RMShape aShape) Returns the transform from the given shape to this shape.Returns the transform from this shape to it's parent.getTransformToShape
(RMShape aShape) Returns the transform from this shape to the given shape.Returns the undoer for this shape (or null if not there).getUrl()
Sets the URL for the shape.float
getWidth()
Returns the width of the shape.float
Returns the ideal width of this shape to accommodate its contents (just the current width for most shapes).float
getX()
Returns the X location of the shape.getXY()
Returns the XY location of the shape as a point.getXYP()
Returns the origin point of the shape in parent's coords.float
getY()
Returns the Y location of the shape.groupShapes
(List shapes, RMShape groupShape) Adds the subset of children in given list into a given group shape, which is then added back to receiver.boolean
Page number resolution.float
height()
Returns raw height of shape.int
indexOf()
Returns the index of this child in its parent.int
Returns the index of the given child in this shape's children list.initWithArchiver
(RMArchiver anArchiver) Legacy unarchival.boolean
intersects
(RMPath aPath) Returns whether this shape is hit by the path, given in this shape's parent's coords.boolean
isAncestor
(RMShape aShape) Returns true if given shape is one of this shape's ancestors.boolean
isDescendant
(RMShape aShape) Returns true if given shape is one of this shape's descendants.boolean
isLocked()
Returns the locked state of the shape (really just to prevent location/size changes in the editor).boolean
isRoot()
Editor method - returns whether this shape is at the top level (usually RMPage).boolean
Returns whether the shape is underlined.void
mouseDragged
(RMViewer aViewer, MouseEvent anEvent) Viewer method.void
mouseEntered
(RMViewer aViewer, MouseEvent anEvent) Viewer method.void
mouseExited
(RMViewer aViewer, MouseEvent anEvent) Viewer method.void
mouseMoved
(RMViewer aViewer, MouseEvent anEvent) Viewer method.void
mousePressed
(RMViewer aViewer, MouseEvent anEvent) Viewer method.void
mouseReleased
(RMViewer aViewer, MouseEvent anEvent) Viewer method.boolean
notRSS()
Returns whether the shape has been rotated, scaled or skewed (for efficientency).void
offsetChildrenXY
(float dx, float dy) Offsets this shape's children by the given dx, dy.void
offsetXY
(double dx, double dy) Offsets the X and Y location of the shape by the given dx & dy amount (convenience).int
page()
Page number resolution.int
Page number resolution.int
Page number resolution.int
pageMax()
Page number resolution.void
Sets an Object to be associated with the given name for the shape.void
putPropertyKey
(String aName, String aKey) Puts the specific property key for the given property name.void
Ensures that children associated with this shape know who's their daddy.void
removeChild
(int anIndex) Remove's the child at the given index from this shape's children list.void
removeChild
(RMShape aChild) Removes the given child from this shape's children list.void
Removes all children from this shape.void
Removes the given list of children from this shape.void
Removes this shape from it's parent.void
resolvePageReferences
(ReportMill rm, Object userInfo) Replaces all @Page@ style keys with their actual values for this shape and it's children.rpgClone
(ReportMill rm) A clone implementation that copies this shape and its children, performing data substituion as well.An rpgClone hook to provide the basic rpgClone (default implementation just calls Object clone).void
rpgCloneChildren
(ReportMill rm, RMShape copy) An rpgClone hook to rpgClone a shape's children.void
An rpgClone hook called by RMDocument after this shape's page is rpgCloned.void
rpgCloneNotification
(ReportMill aReportMill, RMShape copy) An rpgClone hook to call ReportMill's rpgClone notification, if shape is named.void
An rpgClone hook called by RMDocument before this shape's page is rpgCloned.void
An rpgClone hook called by RMDocument on all children before anything else.void
rpgCloneUrl
(ReportMill aReportMill, RMShape rpgClone) An rpgClone hook to clone a shape's URL with data substitution.void
sendShapesToBack
(List shapes) Moves the subset of children in the given list to the back of the children list.void
setActionScript
(String aString) Returns the ActionScript for the shape.void
setAnim
(RMShapeAnim anAnim) Sets the collection of animation records for this shape.void
setAutosizeHeight
(boolean aValue) Sets whether the shape's height is set automatically to its ideal height during report generation.void
setAutosizing
(String aVal) Sets the autosizing settings as a string with hyphens for struts and tilde for sprints (horiz,vert).void
setBounds
(double x, double y, double w, double h) Sets X, Y, width and height of shape to given dimensions.void
setBounds
(Rectangle2D aRect) Sets X, Y, width and height of shape to dimensions in given rect.void
setCausesWrapType
(byte aType) Sets how this shape causes text wrap.void
setChildren
(List aList) Sets the list of children associated with this shape.void
Sets the color of the shape.void
Sets the fill for this shape.void
Sets the font for the shape.void
Sets the format for the shape.void
setFrame
(double x, double y, double w, double h) Sets the bounds of the shape such that it exacly fits in the given parent coord rect.void
setFrame
(Rectangle2D aRect) Sets the bounds of the shape such that it exacly fits in the given parent coord rect.void
setFrameSize
(double w, double h) Sets a shape's size such that its frame (enclosing rect in parent coords) will have the given width and height.void
setFrameX
(double x) Sets a shape's X such that its bounds rect (in parent coords) has origin at the given X.void
setFrameXY
(double x, double y) Sets a shape's origin such that its frame (enclosing rect in parent coords) will have the given X and Y.void
setFrameXY
(RMPoint aPoint) Sets a shape's origin such that its bounds rect (in parent coords) has origin at the given point.void
setFrameY
(double y) Sets a shape's Y such that its bounds rect (in parent coords) has origin at the given Y.void
setHeight
(double aHeight) Sets the height of the shape.void
setHeightDeep
(float h) Sets the height of this shape and its children (proportionally using their autosizing).void
setHeightDeep
(float h, boolean c) Sets the height of this shape and its children (proportionally using their autosizing).void
Sets the shape to its getHeightToFit (which is just the current height for most shapes).void
setLineWidth
(float aValue) Sets the line width of the shape's stroke in printer points.void
setListKey
(String aKeyPath) Sets the List Key associated with this shape.void
setLocked
(boolean aValue) Sets the locked state of the shape (really just to prevent location/size changes in the editor).void
Sets the name for the shape.void
Visual change notification - call before making changes that will require repaint.void
setNeedsRepaint
(RMShape aShape) Visual change notification - call before making changes that will require repaint.void
setOpacity
(float aValue) Sets the opactiy of the shape (1 for opaque, 0 for transparent).void
setOutline
(RMXString.Outline anOutline) Sets the outline for the shape.void
Sets the parent of this shape (called automatically by addChild()).void
setRoll
(float aValue) Sets the roll of the shape.void
setScaleX
(float aValue) Sets the scale of the X axis of the shape.void
setScaleXY
(float sx, float sy) Sets the scale of the X and Y axis.void
setScaleY
(float aValue) Sets the scale of the Y axis of the shape.void
setSize
(double width, double height) Sets the size of the shape.void
Sets the size of the shape.void
setSizeDeep
(float aWidth, float aHeight) Sets the size of this shape and its children (proportionally using their autosizing).void
setSizeP
(double w, double h) Sets the size of the shape to the given width and height in parent's coords.void
Sets the shape to its ideal size from getWidthToFit and getHeightToFit.void
setSizeToFit
(float maxWidth, float maxHeight) This convenience method sets the shape to its ideal size from getWidthToFit and getHeightToFit, allowing you to additionally specify a maxWidth and maxHeight.void
setSkewX
(float aValue) Sets the skew of the X axis of the shape.void
setSkewXY
(float skx, float sky) Sets the skew of the X and Y axis.void
setSkewY
(float aValue) Sets the skew of the Y axis of the shape.void
Sets the stroke for this shape, with an option to turn on drawsStroke.void
setStrokeColor
(RMColor aColor) Sets the stroke color of the shape.void
setTextColor
(RMColor aColor) Sets the text color for the shape.void
setTime
(float aTime) Tells the shape's anim records to update the shape to the given time.void
setUnderlined
(boolean aFlag) Sets the shape to underline.void
Returns the URL for the shape.void
setWidth
(double aWidth) Sets the width of the shape.void
setWidthDeep
(float w) Sets the width of this shape and its children (proportionally using their autosizing).void
setWidthDeep
(float w, boolean c) Sets the width of this shape and its children (proportionally using their autosizing).void
Sets the shape to its getWidthToFit (which is just the current width for most shapes).void
setX
(double x) Sets the X location of the shape.void
setXY
(double x, double y) Sets the X and Y location of the shape to the given point (convenience).void
Sets the X and Y location of the shape to the given point (convenience).void
setXYP
(float x, float y) Sets the origin point of the shape to the given X and Y in parent's coords.void
setY
(double y) Sets the Y location of the shape.boolean
Editor method.boolean
Editor method - indicates whether this shape can be super selected.toString()
Standard to string implementation (prints class name and shape bounds).toXML
(RXArchiver anArchiver) XML Archival.Undo support.void
Undo support.boolean
undoEquals
(RMObject anObj) Undo support.void
undoerAddDirtyObject
(RMObject anObj) Undoer convenience - tells undoer to add a dirty object.void
Undoer convenience - disable the undoer.void
Undoer convenience - enables the undoer.void
undoerSetUndoTitle
(String aTitle) Undoer convenience - sets title of next registered undo.float
width()
Returns raw width of shape.void
Change notification - call before making attribute changes (provides hook for undo support).void
Change notification - call before making attribute changes (provides hook for undo support).float
x()
Returns raw x location of shape.float
y()
Returns raw y location of shape.Methods inherited from class com.reportmill.base.RMObject
didUndo, getAnimAttribute, getClassNameShort
-
Field Details
-
WRAP_TYPE_NONE
public static final byte WRAP_TYPE_NONE- See Also:
-
WRAP_TYPE_BOTH
public static final byte WRAP_TYPE_BOTH- See Also:
-
-
Constructor Details
-
RMShape
public RMShape()Creates a plain shape. -
RMShape
Creates a shape with the same basic attributes as the given shape.
-
-
Method Details
-
x
public float x()Returns raw x location of shape. Developers should use the more common getX, which presents positive x. -
y
public float y()Returns raw y location of shape. Developers should use the more common getY, which presents positive y. -
width
public float width()Returns raw width of shape. Developers should use the more common getWidth, which presents positive width. -
height
public float height()Returns raw height of shape. Developers should use the more common getHeight, which presents positive height. -
bounds
Returns raw x, y, width and height of shape as rect (preserves possible negative sizes). -
getX
public float getX()Returns the X location of the shape. -
setX
public void setX(double x) Sets the X location of the shape. -
getY
public float getY()Returns the Y location of the shape. -
setY
public void setY(double y) Sets the Y location of the shape. -
getWidth
public float getWidth()Returns the width of the shape. -
setWidth
public void setWidth(double aWidth) Sets the width of the shape. -
getHeight
public float getHeight()Returns the height of the shape. -
setHeight
public void setHeight(double aHeight) Sets the height of the shape. -
getMaxX
public float getMaxX()Returns the max X of the shape (assumes not rotated, scaled or skewed). -
getMaxY
public float getMaxY()Returns the max Y of the shape (assumes not rotated, scaled or skewed). -
getXY
Returns the XY location of the shape as a point. -
setXY
Sets the X and Y location of the shape to the given point (convenience). -
setXY
public void setXY(double x, double y) Sets the X and Y location of the shape to the given point (convenience). -
getSize
Returns the size of the shape. -
setSize
Sets the size of the shape. -
setSize
public void setSize(double width, double height) Sets the size of the shape. -
getBounds
Returns the X, Y, width and height of the shape as a rect (use getFrame if shape has roll/scale/skew). -
setBounds
Sets X, Y, width and height of shape to dimensions in given rect. -
setBounds
public void setBounds(double x, double y, double w, double h) Sets X, Y, width and height of shape to given dimensions. -
getBoundsInside
Returns the bounds of the shape in the shape's own coords. -
offsetXY
public void offsetXY(double dx, double dy) Offsets the X and Y location of the shape by the given dx & dy amount (convenience). -
getXYP
Returns the origin point of the shape in parent's coords. -
setXYP
public void setXYP(float x, float y) Sets the origin point of the shape to the given X and Y in parent's coords. -
getSizeP
Returns the size of the shape in parent coords. -
setSizeP
public void setSizeP(double w, double h) Sets the size of the shape to the given width and height in parent's coords. -
getFrame
Returns the rect in parent coords that fully encloses the shape. -
setFrame
Sets the bounds of the shape such that it exacly fits in the given parent coord rect. -
setFrame
public void setFrame(double x, double y, double w, double h) Sets the bounds of the shape such that it exacly fits in the given parent coord rect. -
getFrameX
public float getFrameX()Returns the X of the rect that fully encloses the shape in parent coords. -
setFrameX
public void setFrameX(double x) Sets a shape's X such that its bounds rect (in parent coords) has origin at the given X. -
getFrameY
public float getFrameY()Returns the Y of the rect that fully encloses the shape in parent coords. -
setFrameY
public void setFrameY(double y) Sets a shape's Y such that its bounds rect (in parent coords) has origin at the given Y. -
getFrameXY
Returns the origin of the shape's bounds rect in parent coords. -
setFrameXY
Sets a shape's origin such that its bounds rect (in parent coords) has origin at the given point. -
setFrameXY
public void setFrameXY(double x, double y) Sets a shape's origin such that its frame (enclosing rect in parent coords) will have the given X and Y. -
setFrameSize
public void setFrameSize(double w, double h) Sets a shape's size such that its frame (enclosing rect in parent coords) will have the given width and height. -
getFrameMaxX
public float getFrameMaxX()Returns the max X of the shape's frame. -
getFrameMaxY
public float getFrameMaxY()Returns the max Y of the shape's frame. -
getFrame
Returns the rect that fully encloses the receiver in the given shape's coords. -
getRoll
public float getRoll()Returns the roll of the shape. -
setRoll
public void setRoll(float aValue) Sets the roll of the shape. -
getScaleX
public float getScaleX()Returns the scale of the X axis of the shape. -
setScaleX
public void setScaleX(float aValue) Sets the scale of the X axis of the shape. -
getScaleY
public float getScaleY()Returns the scale of the Y axis of the shape. -
setScaleY
public void setScaleY(float aValue) Sets the scale of the Y axis of the shape. -
setScaleXY
public void setScaleXY(float sx, float sy) Sets the scale of the X and Y axis. -
getSkewX
public float getSkewX()Returns the skew of the X axis of the shape. -
setSkewX
public void setSkewX(float aValue) Sets the skew of the X axis of the shape. -
getSkewY
public float getSkewY()Returns the skew of the Y axis of the shape. -
setSkewY
public void setSkewY(float aValue) Sets the skew of the Y axis of the shape. -
setSkewXY
public void setSkewXY(float skx, float sky) Sets the skew of the X and Y axis. -
notRSS
public boolean notRSS()Returns whether the shape has been rotated, scaled or skewed (for efficientency). -
getFillCount
public int getFillCount()Returns the number of fills associated with this shape. -
getFill
Returns the specific fill at the given index. -
getFill
Returns the specific fill with the given class. -
getFills
Returns this list of fills - a special list that can be operated on directly. -
getFill
Returns the fill for this shape. -
setFill
Sets the fill for this shape. -
getStroke
Returns the stroke for this shape. -
setStroke
Sets the stroke for this shape, with an option to turn on drawsStroke. -
getColor
Returns the color of the shape. -
setColor
Sets the color of the shape. -
getStrokeColor
Returns the stroke color of the shape. -
setStrokeColor
Sets the stroke color of the shape. -
getLineWidth
public float getLineWidth()Returns the line width of the shape's stroke in printer points. -
setLineWidth
public void setLineWidth(float aValue) Sets the line width of the shape's stroke in printer points. -
getOpacity
public float getOpacity()Returns the opactiy of the shape (1 for opaque, 0 for transparent). -
setOpacity
public void setOpacity(float aValue) Sets the opactiy of the shape (1 for opaque, 0 for transparent). -
getOpacityDeep
public float getOpacityDeep()Returns the combined opacity of this shape and its parent. -
getImageFill
Returns the imageFill for this shape (or null, if fill isn't an RMImageFill). -
getTextColor
Returns the text color for the shape. -
setTextColor
Sets the text color for the shape. -
getName
Returns the name for the shape. -
setName
Sets the name for the shape. -
getUrl
Sets the URL for the shape. -
setUrl
Returns the URL for the shape. -
isLocked
public boolean isLocked()Returns the locked state of the shape (really just to prevent location/size changes in the editor). -
setLocked
public void setLocked(boolean aValue) Sets the locked state of the shape (really just to prevent location/size changes in the editor). -
getCausesWrap
public boolean getCausesWrap()Returns whether this shape causes text wrap. -
getCausesWrapType
public byte getCausesWrapType()Returns how this shape causes text wrap. -
setCausesWrapType
public void setCausesWrapType(byte aType) Sets how this shape causes text wrap. -
getPropertyKeyCount
public int getPropertyKeyCount()Returns the number of property keys (like IsVisible, FillColor, StrokeColor, Width, etc.) -
getPropertyKeyName
Returns the specific settable property key name at the given index. -
getPropertyKey
Returns the specific property key for the given property name. -
putPropertyKey
Puts the specific property key for the given property name. -
getAnim
Returns the collection of animation records for this shape. -
getAnim
Returns the collection of animation records for this shape, with an option to create if absent. -
setAnim
Sets the collection of animation records for this shape. -
setTime
public void setTime(float aTime) Tells the shape's anim records to update the shape to the given time. Recurses to shape children. -
getActionScript
Sets the ActionScript for the shape. -
setActionScript
Returns the ActionScript for the shape. -
get
Returns the Object associated with the given name for the shape. -
put
Sets an Object to be associated with the given name for the shape. -
getFont
Returns the font for the shape. -
setFont
Sets the font for the shape. -
isUnderlined
public boolean isUnderlined()Returns whether the shape is underlined. -
setUnderlined
public void setUnderlined(boolean aFlag) Sets the shape to underline. -
getOutline
Returns the outline for the shape. -
setOutline
Sets the outline for the shape. -
getFormat
Returns the format for the shape. -
setFormat
Sets the format for the shape. -
acceptsFormat
public boolean acceptsFormat()Returns whether the shape can accept a format. -
getAutosizing
Returns the autosizing settings as a string with hyphens for struts and tilde for sprints (horiz,vert). -
setAutosizing
Sets the autosizing settings as a string with hyphens for struts and tilde for sprints (horiz,vert). -
getAutosizeHeight
public boolean getAutosizeHeight()Returns whether the shape's height is set automatically to its ideal height during report generation. -
setAutosizeHeight
public void setAutosizeHeight(boolean aValue) Sets whether the shape's height is set automatically to its ideal height during report generation. -
getPath
Returns the shape's path. -
getPathInBounds
Returns the shape's path scaled to the shape's current bounds. -
setWidthDeep
public void setWidthDeep(float w) Sets the width of this shape and its children (proportionally using their autosizing). -
setWidthDeep
public void setWidthDeep(float w, boolean c) Sets the width of this shape and its children (proportionally using their autosizing). -
setHeightDeep
public void setHeightDeep(float h) Sets the height of this shape and its children (proportionally using their autosizing). -
setHeightDeep
public void setHeightDeep(float h, boolean c) Sets the height of this shape and its children (proportionally using their autosizing). -
setSizeDeep
public void setSizeDeep(float aWidth, float aHeight) Sets the size of this shape and its children (proportionally using their autosizing). -
getBoundsOfChildren
Returns bounds of all children of this shape, which can sometimes differ from this shapes bounds. -
getBoundsOfChildren
Returns the bounds of a given subset of this shape's children. -
getBoundsSuperSelected
Returns the bounds of the shape in parect coords when super selected (same as getBoundsMarked by default). -
getBoundsMarked
Returns the bounds of the path associated with this shape in parent coords, ajusted to account for stroke width. -
getParent
Returns the parent of this shape. -
setParent
Sets the parent of this shape (called automatically by addChild()). -
getParents
Returns a list of this shape's parent, and that shape's parent, up to document. -
getParentCount
public int getParentCount()Returns the number of ancestors (from this shape's parent up to the document). -
getChildCount
public int getChildCount()Returns the number of children associated with this shape. -
getChild
Returns the child at the given index. -
getChildLast
Returns the last child of this shape. -
getChildren
Returns the list of children associated with this shape. -
getChildSortedByX
Returns the child at a given index, ordered by X (left-to-right) order -
setChildren
Sets the list of children associated with this shape. -
reclaimChildren
public void reclaimChildren()Ensures that children associated with this shape know who's their daddy. -
indexOf
public int indexOf()Returns the index of this child in its parent. -
indexOf
Returns the index of the given child in this shape's children list. -
addChild
Adds the given child to the end of this shape's children list. -
addChild
Adds the given child to this shape's children list at the given index. -
addChildBelowLastChild
Adds the given child to the end of this shape's children list at a y position just below previously last child. -
removeChild
Removes the given child from this shape's children list. -
removeChild
public void removeChild(int anIndex) Remove's the child at the given index from this shape's children list. -
removeChildren
public void removeChildren()Removes all children from this shape. -
removeChildren
Removes the given list of children from this shape. -
removeFromParent
public void removeFromParent()Removes this shape from it's parent. -
delete
public void delete()Called when a shape is removed from a shape heirarchy. -
getChildWithName
Returns first child found with the given name (called recursively on children if not found at current level). -
getChildWithClass
Returns first child found with the given class (called recursively on children if not found at current level). -
offsetChildrenXY
public void offsetChildrenXY(float dx, float dy) Offsets this shape's children by the given dx, dy. -
getRootShape
Returns the top level shape (usually an RMDocument). -
getDocument
Returns the RMDocument ancestor of this shape (or null if not there). -
getPageShape
Returns the RMPage ancestor of this shape (or null if not there). -
getUndoer
Returns the undoer for this shape (or null if not there). -
undoerSetUndoTitle
Undoer convenience - sets title of next registered undo. -
undoerDisable
public void undoerDisable()Undoer convenience - disable the undoer. -
undoerEnable
public void undoerEnable()Undoer convenience - enables the undoer. -
undoerAddDirtyObject
Undoer convenience - tells undoer to add a dirty object. -
isRoot
public boolean isRoot()Editor method - returns whether this shape is at the top level (usually RMPage). -
isAncestor
Returns true if given shape is one of this shape's ancestors. -
isDescendant
Returns true if given shape is one of this shape's descendants. -
getCommonAncestor
Returns first ancestor that the given shape and this shape have in common. -
getShapesToDescendant
Returns a list of shape's from this shape to given desendant. -
getShapesToAncestor
Returns a list of shapes from this shape to a given ancestor. -
getShapesToShape
Returns a list of shapes from this shape to given shape. -
getTransform
Returns the transform to this shape from its parent. -
getTransformInverse
Returns the transform from this shape to it's parent. -
getTransformToShape
Returns the transform from this shape to the given shape. -
getTransformFromShape
Returns the transform from the given shape to this shape. -
convertPointToShape
Converts the given point to the given shape's coords (returns it for convenience). -
convertPointFromShape
Converts the given point to the given shape's coords (returns it for convenience). -
convertVectorToShape
Converts the given size (as a vector) to the given shape's coords (returns it for convenience). -
convertVectorFromShape
Converts the given size (as a vector) from the given shape's coords (returns it for convenience). -
convertSizeToShape
Converts the given size to the given shape's coords (returns it for convenience). -
convertSizeFromShape
Converts the given size from the given shape's coords (returns it for convenience). -
convertRectToShape
Converts the given rect to the given shape's coords (returns it for convenience). -
convertRectFromShape
Converts the given rect from the given shape's coords (returns it for convenience). -
convertedPointToShape
Returns the given point converted to the given shape's coords. -
convertedPointFromShape
Returns the given point converted from the given shape's coords. -
convertedVectorToShape
Returns the given size converted to the given shape's coords and normalized. -
convertedVectorFromShape
Returns the given size converted from the given shape's coords and normalized. -
convertedSizeToShape
Returns the given size converted to the given shape's coords. -
convertedSizeFromShape
Returns the given size converted from the given shape's coords. -
convertedRectToShape
Returns the rect encompassing the given rect converted to the given shape's coords. -
convertedRectFromShape
Returns the rect encompassing the given rect converted from the given shape's coords. -
convertPathToShape
Returns the given path converted to the given shape's coords. -
convertPathFromShape
Returns the given path converted from the given shape's coords. -
convertToShape
Transforms the given shape to this shape's coords. -
convertFromShape
Transforms the given shape from this shape's coords. -
getWidthToFit
public float getWidthToFit()Returns the ideal width of this shape to accommodate its contents (just the current width for most shapes). -
setWidthToFit
public void setWidthToFit()Sets the shape to its getWidthToFit (which is just the current width for most shapes). -
getHeightToFit
public float getHeightToFit()Returns the ideal height of this shape to accommodate its contents (just the current height for most shapes). -
setHeightToFit
public void setHeightToFit()Sets the shape to its getHeightToFit (which is just the current height for most shapes). -
setSizeToFit
public void setSizeToFit()Sets the shape to its ideal size from getWidthToFit and getHeightToFit. -
setSizeToFit
public void setSizeToFit(float maxWidth, float maxHeight) This convenience method sets the shape to its ideal size from getWidthToFit and getHeightToFit, allowing you to additionally specify a maxWidth and maxHeight. -
divideShapeFromEdge
Divides the shape by a given amount from the given edge. Returns newShape (or, if null, a clone) whose bounds have been set to the remainder. -
divideShapeFromTop
Divides the shape by a given amount from the top. Returns a clone of the given shape with bounds set to the remainder. Divies children among the two shapes (recursively calling divide shape for those stradling). -
getAnimator
Returns the animator that this shape registers changes with. -
getAnimator
Returns the animator that this shape registers changes with (creating, if requested and currently null). -
getChildAnimator
Returns the animator that this shape's children use. -
getChildAnimator
Returns the animator that this shape's children use (creating, if requested and currently null). The base implementation passes request onto ancestors, but some subclasses create and manage one (RMPage, RMSwitchShape). -
acceptsMouse
public boolean acceptsMouse()Viewer method. -
mousePressed
Viewer method. -
mouseDragged
Viewer method. -
mouseReleased
Viewer method. -
mouseEntered
Viewer method. -
mouseMoved
Viewer method. -
mouseExited
Viewer method. -
rpgClone
A clone implementation that copies this shape and its children, performing data substituion as well. -
rpgCloneBase
An rpgClone hook to provide the basic rpgClone (default implementation just calls Object clone). -
rpgCloneUrl
An rpgClone hook to clone a shape's URL with data substitution. -
rpgCloneChildren
An rpgClone hook to rpgClone a shape's children. -
rpgCloneNotification
An rpgClone hook to call ReportMill's rpgClone notification, if shape is named. -
rpgClonePreprocess
An rpgClone hook called by RMDocument on all children before anything else. -
rpgClonePrepare
An rpgClone hook called by RMDocument before this shape's page is rpgCloned. -
rpgCloneConclude
An rpgClone hook called by RMDocument after this shape's page is rpgCloned. -
resolvePageReferences
Replaces all @Page@ style keys with their actual values for this shape and it's children. -
getPageCount
public int getPageCount()Returns the number of pages associated with this shape. This is generally zero, except for RMDocument's implementation. Additionally, transient RPG objects use this to declare if they have paginated themselves over multiple pages during rpgCloning. -
getListKey
Returns the "List Key" associated with this shape. A List Key is a key path that specifies a specific list of objects in the document's datasource. -
setListKey
Sets the List Key associated with this shape. Not all shapes support this (only List Key shapes, like table, graph, crosstab and labels). In fact this default implementation does nothing. -
getListKeyDeep
Returns the concatenated list keys of this shape and its parents (useful for nested list key shapes. -
getListKeyShape
Returns the real shape used to resolve the list key for this shape. This seems bogus - might go soon. -
contains
Returns whether this shape is hit by the point, given in this shape's parent's coords. -
intersects
Returns whether this shape is hit by the path, given in this shape's parent's coords. -
getChildContaining
Returns the first (top) shape hit by the point given in this shape's coords. -
getChildrenIntersecting
Returns the child shapes hit by the path given in this shape's coords. -
bringShapesToFront
Moves the subset of children in the given list to the front of the children list. -
sendShapesToBack
Moves the subset of children in the given list to the back of the children list. -
groupShapes
Adds the subset of children in given list into a given group shape, which is then added back to receiver. -
getGroupShape
Returns a newly created RMShape whose bounds has been set to the combined bounds of the subset of children in the given list. -
getChildrenWhoHitTest
Returns the subset of children that should be used for hit detection (useful for implementing page layering). -
getChildrenWhoDraw
Returns the subset of children that should be drawn (useful for implementing page layering). -
getChildrenWhoCauseWrap
Returns the subset of children that cause wrap. -
clone
Standard implementation of Object clone. Null's out shape's parent and children. -
cloneDeep
Clones all attributes of this shape with complete clones of its children as well. -
equals
Standard implementation of Object equals. -
copy
Copies all the attributes of the given object that are in common with this object. -
copyShape
Copies basic shape attributes from given RMShape (location, size, fill, stroke, roll, scale, name, url, etc.). -
initWithArchiver
Legacy unarchival.- Specified by:
initWithArchiver
in interfaceRMArchiver.Archiving
- Overrides:
initWithArchiver
in classRMObject
-
toXML
XML Archival. -
fromXML
XML unarchival. -
fromXMLDeep
XML unarchival for shape children -
willChange
public void willChange()Change notification - call before making attribute changes (provides hook for undo support). -
willChange
Change notification - call before making attribute changes (provides hook for undo support). -
setNeedsRepaint
public void setNeedsRepaint()Visual change notification - call before making changes that will require repaint. -
setNeedsRepaint
Visual change notification - call before making changes that will require repaint. -
boundsChanged
public void boundsChanged()Notifies a shape and its parents that its bounds changed. -
boundsChanged
Notifies this shape that a given shape's bounds have changed (presumably a descendant). -
getToolClassName
Editor method - returns the tool class name for this shape. -
canBeUngrouped
public boolean canBeUngrouped()Editor method. -
acceptsChildren
public boolean acceptsChildren()Editor method. -
sizesToFitChildren
public boolean sizesToFitChildren()Editor method. -
superSelectable
public boolean superSelectable()Editor method - indicates whether this shape can be super selected. -
childrenSuperSelectImmediately
public boolean childrenSuperSelectImmediately()Editor method. -
acceptsDragKeys
public boolean acceptsDragKeys()Editor method. -
dragKeyAtPoint
Editor method. -
dropKeyAtPoint
Editor method. -
dragExit
public void dragExit()Editor method. -
toString
Standard to string implementation (prints class name and shape bounds). -
page
public int page()Page number resolution. -
pageMax
public int pageMax()Page number resolution. -
pageBreakMax
public int pageBreakMax()Page number resolution. -
pageBreakPageMax
public int pageBreakPageMax()Page number resolution. -
hasPageBreaks
public boolean hasPageBreaks()Page number resolution. -
undoEquals
Undo support.- Overrides:
undoEquals
in classRMObject
-
undoClone
Undo support. -
undoCopy
Undo support. -
didChange
Undo support.
-