public class RMShape extends RMObject
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);
Modifier and Type | Field and Description |
---|---|
static byte |
WRAP_TYPE_BOTH |
static byte |
WRAP_TYPE_NONE |
Constructor and Description |
---|
RMShape()
Creates a plain shape.
|
RMShape(RMShape aShape)
Creates a shape with the same basic attributes as the given shape.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsChildren()
Editor method.
|
boolean |
acceptsDragKeys()
Editor method.
|
boolean |
acceptsFormat()
Returns whether the shape can accept a format.
|
boolean |
acceptsMouse()
Viewer method.
|
void |
addChild(RMShape aChild)
Adds the given child to the end of this shape's children list.
|
void |
addChild(RMShape aChild,
int anIndex)
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.
|
RMRect |
bounds()
Returns raw x, y, width and height of shape as rect (preserves possible negative sizes).
|
void |
boundsChanged()
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(java.util.List shapes)
Moves the subset of children in the given list to the front of the children list.
|
boolean |
canBeUngrouped()
Editor method.
|
boolean |
childrenSuperSelectImmediately()
Editor method.
|
java.lang.Object |
clone()
Standard implementation of Object clone.
|
RMShape |
cloneDeep()
Clones all attributes of this shape with complete clones of its children as well.
|
boolean |
contains(RMPoint aPoint)
Returns whether this shape is hit by the point, given in this shape's parent's coords.
|
RMPoint |
convertedPointFromShape(RMPoint aPoint,
RMShape aShape)
Returns the given point converted from the given shape's coords.
|
RMPoint |
convertedPointToShape(RMPoint aPoint,
RMShape aShape)
Returns the given point converted to the given shape's coords.
|
RMRect |
convertedRectFromShape(RMRect aRect,
RMShape aShape)
Returns the rect encompassing the given rect converted from the given shape's coords.
|
RMRect |
convertedRectToShape(RMRect aRect,
RMShape aShape)
Returns the rect encompassing the given rect converted to the given shape's coords.
|
RMSize |
convertedSizeFromShape(RMSize aSize,
RMShape aShape)
Returns the given size converted from the given shape's coords.
|
RMSize |
convertedSizeToShape(RMSize aSize,
RMShape aShape)
Returns the given size converted to the given shape's coords.
|
RMSize |
convertedVectorFromShape(RMSize aSize,
RMShape aShape)
Returns the given size converted from the given shape's coords and normalized.
|
RMSize |
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.
|
RMPath |
convertPathFromShape(RMPath aPath,
RMShape aShape)
Returns the given path converted from the given shape's coords.
|
RMPath |
convertPathToShape(RMPath aPath,
RMShape aShape)
Returns the given path converted to the given shape's coords.
|
RMPoint |
convertPointFromShape(RMPoint point,
RMShape shape)
Converts the given point to the given shape's coords (returns it for convenience).
|
RMPoint |
convertPointToShape(RMPoint point,
RMShape shape)
Converts the given point to the given shape's coords (returns it for convenience).
|
RMRect |
convertRectFromShape(RMRect rect,
RMShape shape)
Converts the given rect from the given shape's coords (returns it for convenience).
|
RMRect |
convertRectToShape(RMRect rect,
RMShape shape)
Converts the given rect to the given shape's coords (returns it for convenience).
|
RMSize |
convertSizeFromShape(RMSize size,
RMShape shape)
Converts the given size from the given shape's coords (returns it for convenience).
|
RMSize |
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.
|
RMSize |
convertVectorFromShape(RMSize size,
RMShape shape)
Converts the given size (as a vector) from the given shape's coords (returns it for convenience).
|
RMSize |
convertVectorToShape(RMSize size,
RMShape shape)
Converts the given size (as a vector) to the given shape's coords (returns it for convenience).
|
void |
copy(java.lang.Object anObj)
Copies all the attributes of the given object that are in common with this object.
|
void |
copyShape(RMShape aShape)
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 |
didChange(RMObject oldObj)
Undo support.
|
RMShape |
divideShapeFromEdge(float amount,
byte edge,
RMShape newShape)
Divides the shape by a given amount from the given edge.
|
RMShape |
divideShapeFromTop(float amount)
Divides the shape by a given amount from the top.
|
void |
dragExit()
Editor method.
|
void |
dragKeyAtPoint(java.lang.String aKey,
RMPoint aPoint)
Editor method.
|
void |
dropKeyAtPoint(java.lang.String aKey,
RMPoint aPoint)
Editor method.
|
boolean |
equals(java.lang.Object anObj)
Standard implementation of Object equals.
|
java.lang.Object |
fromXML(RXArchiver anArchiver,
RXElement anElement)
XML unarchival.
|
void |
fromXMLDeep(RXArchiver anArchiver,
RXElement anElement)
XML unarchival for shape children
|
java.lang.Object |
get(java.lang.String aName)
Returns the Object associated with the given name for the shape.
|
java.lang.String |
getActionScript()
Sets the ActionScript for the shape.
|
RMShapeAnim |
getAnim()
Returns the collection of animation records for this shape.
|
RMShapeAnim |
getAnim(boolean create)
Returns the collection of animation records for this shape, with an option to create if absent.
|
RMAnimator |
getAnimator()
Returns the animator that this shape registers changes with.
|
RMAnimator |
getAnimator(boolean create)
Returns the animator that this shape registers changes with (creating, if requested and currently null).
|
boolean |
getAutosizeHeight()
Returns whether the shape's height is set automatically to its ideal height during report generation.
|
java.lang.String |
getAutosizing()
Returns the autosizing settings as a string with hyphens for struts and tilde for sprints (horiz,vert).
|
RMRect |
getBounds()
Returns the X, Y, width and height of the shape as a rect (use getFrame if shape has roll/scale/skew).
|
RMRect |
getBoundsInside()
Returns the bounds of the shape in the shape's own coords.
|
RMRect |
getBoundsMarked()
Returns the bounds of the path associated with this shape in parent coords, ajusted to account for stroke width.
|
RMRect |
getBoundsOfChildren()
Returns bounds of all children of this shape, which can sometimes differ from this shapes bounds.
|
RMRect |
getBoundsOfChildren(java.util.List aList)
Returns the bounds of a given subset of this shape's children.
|
RMRect |
getBoundsSuperSelected()
Returns the bounds of the shape in parect coords when super selected (same as getBoundsMarked by default).
|
boolean |
getCausesWrap()
Returns whether this shape causes text wrap.
|
byte |
getCausesWrapType()
Returns how this shape causes text wrap.
|
RMShape |
getChild(int anIndex)
Returns the child at the given index.
|
RMAnimator |
getChildAnimator()
Returns the animator that this shape's children use.
|
RMAnimator |
getChildAnimator(boolean create)
Returns the animator that this shape's children use (creating, if requested and currently null).
|
RMShape |
getChildContaining(RMPoint aPoint)
Returns the first (top) shape hit by the point given in this shape's coords.
|
int |
getChildCount()
Returns the number of children associated with this shape.
|
RMShape |
getChildLast()
Returns the last child of this shape.
|
java.util.List |
getChildren()
Returns the list of children associated with this shape.
|
java.util.List |
getChildrenIntersecting(RMPath aPath)
Returns the child shapes hit by the path given in this shape's coords.
|
java.util.List |
getChildrenWhoCauseWrap(RMShape aPeer)
Returns the subset of children that cause wrap.
|
java.util.List |
getChildrenWhoDraw()
Returns the subset of children that should be drawn (useful for implementing page layering).
|
java.util.List |
getChildrenWhoHitTest()
Returns the subset of children that should be used for hit detection (useful for implementing page layering).
|
RMShape |
getChildSortedByX(int anIndex)
Returns the child at a given index, ordered by X (left-to-right) order
|
RMShape |
getChildWithClass(java.lang.Class aClass)
Returns first child found with the given class (called recursively on children if not found at current level).
|
RMShape |
getChildWithName(java.lang.String aName)
Returns first child found with the given name (called recursively on children if not found at current level).
|
RMColor |
getColor()
Returns the color of the shape.
|
RMShape |
getCommonAncestor(RMShape aShape)
Returns first ancestor that the given shape and this shape have in common.
|
RMDocument |
getDocument()
Returns the RMDocument ancestor of this shape (or null if not there).
|
RMFill |
getFill()
Returns the fill for this shape.
|
RMFill |
getFill(java.lang.Class aClass)
Returns the specific fill with the given class.
|
RMFill |
getFill(int anIndex)
Returns the specific fill at the given index.
|
int |
getFillCount()
Returns the number of fills associated with this shape.
|
java.util.List |
getFills()
Returns this list of fills - a special list that can be operated on directly.
|
RMFont |
getFont()
Returns the font for the shape.
|
RMFormat |
getFormat()
Returns the format for the shape.
|
RMRect |
getFrame()
Returns the rect in parent coords that fully encloses the shape.
|
RMRect |
getFrame(RMShape aShape)
Returns the rect that fully encloses the receiver in the given shape's coords.
|
float |
getFrameMaxX()
Returns the max X of the shape's frame.
|
float |
getFrameMaxY()
Returns the max Y of the shape's frame.
|
float |
getFrameX()
Returns the X of the rect that fully encloses the shape in parent coords.
|
RMPoint |
getFrameXY()
Returns the origin of the shape's bounds rect in parent coords.
|
float |
getFrameY()
Returns the Y of the rect that fully encloses the shape in parent coords.
|
RMShape |
getGroupShape(java.util.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 |
getHeight()
Returns the height of the shape.
|
float |
getHeightToFit()
Returns the ideal height of this shape to accommodate its contents (just the current height for most shapes).
|
RMImageFill |
getImageFill()
Returns the imageFill for this shape (or null, if fill isn't an RMImageFill).
|
float |
getLineWidth()
Returns the line width of the shape's stroke in printer points.
|
java.lang.String |
getListKey()
Returns the "List Key" associated with this shape.
|
java.lang.String |
getListKeyDeep()
Returns the concatenated list keys of this shape and its parents (useful for nested list key shapes.
|
RMShape |
getListKeyShape()
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).
|
java.lang.String |
getName()
Returns the name for the shape.
|
float |
getOpacity()
Returns the opactiy of the shape (1 for opaque, 0 for transparent).
|
float |
getOpacityDeep()
Returns the combined opacity of this shape and its parent.
|
RMXString.Outline |
getOutline()
Returns the outline for the shape.
|
int |
getPageCount()
Returns the number of pages associated with this shape.
|
RMShape |
getPageShape()
Returns the RMPage ancestor of this shape (or null if not there).
|
RMShape |
getParent()
Returns the parent of this shape.
|
int |
getParentCount()
Returns the number of ancestors (from this shape's parent up to the document).
|
java.util.List |
getParents()
Returns a list of this shape's parent, and that shape's parent, up to document.
|
RMPath |
getPath()
Returns the shape's path.
|
RMPath |
getPathInBounds()
Returns the shape's path scaled to the shape's current bounds.
|
java.lang.String |
getPropertyKey(java.lang.String aName)
Returns the specific property key for the given property name.
|
int |
getPropertyKeyCount()
Returns the number of property keys (like IsVisible, FillColor, StrokeColor, Width, etc.)
|
java.lang.String |
getPropertyKeyName(int anIndex)
Returns the specific settable property key name at the given index.
|
float |
getRoll()
Returns the roll of the shape.
|
RMShape |
getRootShape()
Returns the top level shape (usually an RMDocument).
|
float |
getScaleX()
Returns the scale of the X axis of the shape.
|
float |
getScaleY()
Returns the scale of the Y axis of the shape.
|
java.util.List |
getShapesToAncestor(RMShape shape)
Returns a list of shapes from this shape to a given ancestor.
|
java.util.List |
getShapesToDescendant(RMShape aShape)
Returns a list of shape's from this shape to given desendant.
|
java.util.List |
getShapesToShape(RMShape aShape)
Returns a list of shapes from this shape to given shape.
|
RMSize |
getSize()
Returns the size of the shape.
|
RMSize |
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.
|
RMStroke |
getStroke()
Returns the stroke for this shape.
|
RMColor |
getStrokeColor()
Returns the stroke color of the shape.
|
RMColor |
getTextColor()
Returns the text color for the shape.
|
java.lang.String |
getToolClassName()
Editor method - returns the tool class name for this shape.
|
RMTransform |
getTransform()
Returns the transform to this shape from its parent.
|
RMTransform |
getTransformFromShape(RMShape aShape)
Returns the transform from the given shape to this shape.
|
RMTransform |
getTransformInverse()
Returns the transform from this shape to it's parent.
|
RMTransform |
getTransformToShape(RMShape aShape)
Returns the transform from this shape to the given shape.
|
RMUndoer |
getUndoer()
Returns the undoer for this shape (or null if not there).
|
java.lang.String |
getUrl()
Sets the URL for the shape.
|
float |
getWidth()
Returns the width of the shape.
|
float |
getWidthToFit()
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.
|
RMPoint |
getXY()
Returns the XY location of the shape as a point.
|
RMPoint |
getXYP()
Returns the origin point of the shape in parent's coords.
|
float |
getY()
Returns the Y location of the shape.
|
RMShape |
groupShapes(java.util.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 |
hasPageBreaks()
Page number resolution.
|
float |
height()
Returns raw height of shape.
|
int |
indexOf()
Returns the index of this child in its parent.
|
int |
indexOf(RMShape aChild)
Returns the index of the given child in this shape's children list.
|
java.lang.Object |
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 |
isUnderlined()
Returns whether the shape is underlined.
|
void |
mouseDragged(RMViewer aViewer,
java.awt.event.MouseEvent anEvent)
Viewer method.
|
void |
mouseEntered(RMViewer aViewer,
java.awt.event.MouseEvent anEvent)
Viewer method.
|
void |
mouseExited(RMViewer aViewer,
java.awt.event.MouseEvent anEvent)
Viewer method.
|
void |
mouseMoved(RMViewer aViewer,
java.awt.event.MouseEvent anEvent)
Viewer method.
|
void |
mousePressed(RMViewer aViewer,
java.awt.event.MouseEvent anEvent)
Viewer method.
|
void |
mouseReleased(RMViewer aViewer,
java.awt.event.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 |
pageBreakMax()
Page number resolution.
|
int |
pageBreakPageMax()
Page number resolution.
|
int |
pageMax()
Page number resolution.
|
void |
put(java.lang.String aName,
java.lang.Object anObj)
Sets an Object to be associated with the given name for the shape.
|
void |
putPropertyKey(java.lang.String aName,
java.lang.String aKey)
Puts the specific property key for the given property name.
|
void |
reclaimChildren()
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 |
removeChildren()
Removes all children from this shape.
|
void |
removeChildren(java.util.List l)
Removes the given list of children from this shape.
|
void |
removeFromParent()
Removes this shape from it's parent.
|
void |
resolvePageReferences(ReportMill rm,
java.lang.Object userInfo)
Replaces all @Page@ style keys with their actual values for this shape and it's children.
|
RMShape |
rpgClone(ReportMill rm)
A clone implementation that copies this shape and its children, performing data substituion as well.
|
java.lang.Object |
rpgCloneBase()
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 |
rpgCloneConclude(ReportMill rm)
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 |
rpgClonePrepare(ReportMill rm)
An rpgClone hook called by RMDocument before this shape's page is rpgCloned.
|
void |
rpgClonePreprocess(ReportMill rm)
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(java.util.List shapes)
Moves the subset of children in the given list to the back of the children list.
|
void |
setActionScript(java.lang.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(java.lang.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(java.awt.geom.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(java.util.List aList)
Sets the list of children associated with this shape.
|
void |
setColor(RMColor aColor)
Sets the color of the shape.
|
void |
setFill(RMFill aFill)
Sets the fill for this shape.
|
void |
setFont(RMFont aFont)
Sets the font for the shape.
|
void |
setFormat(RMFormat aFormat)
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(java.awt.geom.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 |
setHeightToFit()
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(java.lang.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 |
setName(java.lang.String aName)
Sets the name for the shape.
|
void |
setNeedsRepaint()
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 |
setParent(RMShape aShape)
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 |
setSize(RMSize aSize)
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 |
setSizeToFit()
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 |
setStroke(RMStroke aStroke)
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 |
setUrl(java.lang.String aUrl)
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 |
setWidthToFit()
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 |
setXY(java.awt.geom.Point2D aPoint)
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 |
sizesToFitChildren()
Editor method.
|
boolean |
superSelectable()
Editor method - indicates whether this shape can be super selected.
|
java.lang.String |
toString()
Standard to string implementation (prints class name and shape bounds).
|
RXElement |
toXML(RXArchiver anArchiver)
XML Archival.
|
RMObject |
undoClone()
Undo support.
|
void |
undoCopy(RMObject anObj)
Undo support.
|
boolean |
undoEquals(RMObject anObj)
Undo support.
|
void |
undoerAddDirtyObject(RMObject anObj)
Undoer convenience - tells undoer to add a dirty object.
|
void |
undoerDisable()
Undoer convenience - disable the undoer.
|
void |
undoerEnable()
Undoer convenience - enables the undoer.
|
void |
undoerSetUndoTitle(java.lang.String aTitle)
Undoer convenience - sets title of next registered undo.
|
float |
width()
Returns raw width of shape.
|
void |
willChange()
Change notification - call before making attribute changes (provides hook for undo support).
|
void |
willChange(RMShape s)
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.
|
didUndo, getAnimAttribute, getClassNameShort
public static final byte WRAP_TYPE_NONE
public static final byte WRAP_TYPE_BOTH
public RMShape()
public RMShape(RMShape aShape)
public float x()
public float y()
public float width()
public float height()
public RMRect bounds()
public float getX()
public void setX(double x)
public float getY()
public void setY(double y)
public float getWidth()
public void setWidth(double aWidth)
public float getHeight()
public void setHeight(double aHeight)
public float getMaxX()
public float getMaxY()
public RMPoint getXY()
public void setXY(java.awt.geom.Point2D aPoint)
public void setXY(double x, double y)
public RMSize getSize()
public void setSize(RMSize aSize)
public void setSize(double width, double height)
public RMRect getBounds()
public void setBounds(java.awt.geom.Rectangle2D aRect)
public void setBounds(double x, double y, double w, double h)
public RMRect getBoundsInside()
public void offsetXY(double dx, double dy)
public RMPoint getXYP()
public void setXYP(float x, float y)
public RMSize getSizeP()
public void setSizeP(double w, double h)
public RMRect getFrame()
public void setFrame(java.awt.geom.Rectangle2D aRect)
public void setFrame(double x, double y, double w, double h)
public float getFrameX()
public void setFrameX(double x)
public float getFrameY()
public void setFrameY(double y)
public RMPoint getFrameXY()
public void setFrameXY(RMPoint aPoint)
public void setFrameXY(double x, double y)
public void setFrameSize(double w, double h)
public float getFrameMaxX()
public float getFrameMaxY()
public RMRect getFrame(RMShape aShape)
public float getRoll()
public void setRoll(float aValue)
public float getScaleX()
public void setScaleX(float aValue)
public float getScaleY()
public void setScaleY(float aValue)
public void setScaleXY(float sx, float sy)
public float getSkewX()
public void setSkewX(float aValue)
public float getSkewY()
public void setSkewY(float aValue)
public void setSkewXY(float skx, float sky)
public boolean notRSS()
public int getFillCount()
public RMFill getFill(int anIndex)
public RMFill getFill(java.lang.Class aClass)
public java.util.List getFills()
public RMFill getFill()
public void setFill(RMFill aFill)
public RMStroke getStroke()
public void setStroke(RMStroke aStroke)
public RMColor getColor()
public void setColor(RMColor aColor)
public RMColor getStrokeColor()
public void setStrokeColor(RMColor aColor)
public float getLineWidth()
public void setLineWidth(float aValue)
public float getOpacity()
public void setOpacity(float aValue)
public float getOpacityDeep()
public RMImageFill getImageFill()
public RMColor getTextColor()
public void setTextColor(RMColor aColor)
public java.lang.String getName()
public void setName(java.lang.String aName)
public java.lang.String getUrl()
public void setUrl(java.lang.String aUrl)
public boolean isLocked()
public void setLocked(boolean aValue)
public boolean getCausesWrap()
public byte getCausesWrapType()
public void setCausesWrapType(byte aType)
public int getPropertyKeyCount()
public java.lang.String getPropertyKeyName(int anIndex)
public java.lang.String getPropertyKey(java.lang.String aName)
public void putPropertyKey(java.lang.String aName, java.lang.String aKey)
public RMShapeAnim getAnim()
public RMShapeAnim getAnim(boolean create)
public void setAnim(RMShapeAnim anAnim)
public void setTime(float aTime)
public java.lang.String getActionScript()
public void setActionScript(java.lang.String aString)
public java.lang.Object get(java.lang.String aName)
public void put(java.lang.String aName, java.lang.Object anObj)
public RMFont getFont()
public void setFont(RMFont aFont)
public boolean isUnderlined()
public void setUnderlined(boolean aFlag)
public RMXString.Outline getOutline()
public void setOutline(RMXString.Outline anOutline)
public RMFormat getFormat()
public void setFormat(RMFormat aFormat)
public boolean acceptsFormat()
public java.lang.String getAutosizing()
public void setAutosizing(java.lang.String aVal)
public boolean getAutosizeHeight()
public void setAutosizeHeight(boolean aValue)
public RMPath getPath()
public RMPath getPathInBounds()
public void setWidthDeep(float w)
public void setWidthDeep(float w, boolean c)
public void setHeightDeep(float h)
public void setHeightDeep(float h, boolean c)
public void setSizeDeep(float aWidth, float aHeight)
public RMRect getBoundsOfChildren()
public RMRect getBoundsOfChildren(java.util.List aList)
public RMRect getBoundsSuperSelected()
public RMRect getBoundsMarked()
public RMShape getParent()
public void setParent(RMShape aShape)
public java.util.List getParents()
public int getParentCount()
public int getChildCount()
public RMShape getChild(int anIndex)
public RMShape getChildLast()
public java.util.List getChildren()
public RMShape getChildSortedByX(int anIndex)
public void setChildren(java.util.List aList)
public void reclaimChildren()
public int indexOf()
public int indexOf(RMShape aChild)
public void addChild(RMShape aChild)
public void addChild(RMShape aChild, int anIndex)
public void addChildBelowLastChild(RMShape aChild)
public void removeChild(RMShape aChild)
public void removeChild(int anIndex)
public void removeChildren()
public void removeChildren(java.util.List l)
public void removeFromParent()
public void delete()
public RMShape getChildWithName(java.lang.String aName)
public RMShape getChildWithClass(java.lang.Class aClass)
public void offsetChildrenXY(float dx, float dy)
public RMShape getRootShape()
public RMDocument getDocument()
public RMShape getPageShape()
public RMUndoer getUndoer()
public void undoerSetUndoTitle(java.lang.String aTitle)
public void undoerDisable()
public void undoerEnable()
public void undoerAddDirtyObject(RMObject anObj)
public boolean isRoot()
public boolean isAncestor(RMShape aShape)
public boolean isDescendant(RMShape aShape)
public RMShape getCommonAncestor(RMShape aShape)
public java.util.List getShapesToDescendant(RMShape aShape)
public java.util.List getShapesToAncestor(RMShape shape)
public java.util.List getShapesToShape(RMShape aShape)
public RMTransform getTransform()
public RMTransform getTransformInverse()
public RMTransform getTransformToShape(RMShape aShape)
public RMTransform getTransformFromShape(RMShape aShape)
public RMPoint convertPointToShape(RMPoint point, RMShape shape)
public RMPoint convertPointFromShape(RMPoint point, RMShape shape)
public RMSize convertVectorToShape(RMSize size, RMShape shape)
public RMSize convertVectorFromShape(RMSize size, RMShape shape)
public RMSize convertSizeToShape(RMSize size, RMShape shape)
public RMSize convertSizeFromShape(RMSize size, RMShape shape)
public RMRect convertRectToShape(RMRect rect, RMShape shape)
public RMRect convertRectFromShape(RMRect rect, RMShape shape)
public RMPoint convertedPointToShape(RMPoint aPoint, RMShape aShape)
public RMPoint convertedPointFromShape(RMPoint aPoint, RMShape aShape)
public RMSize convertedVectorToShape(RMSize aSize, RMShape aShape)
public RMSize convertedVectorFromShape(RMSize aSize, RMShape aShape)
public RMSize convertedSizeToShape(RMSize aSize, RMShape aShape)
public RMSize convertedSizeFromShape(RMSize aSize, RMShape aShape)
public RMRect convertedRectToShape(RMRect aRect, RMShape aShape)
public RMRect convertedRectFromShape(RMRect aRect, RMShape aShape)
public RMPath convertPathToShape(RMPath aPath, RMShape aShape)
public RMPath convertPathFromShape(RMPath aPath, RMShape aShape)
public void convertToShape(RMShape aShape)
public void convertFromShape(RMShape aShape)
public float getWidthToFit()
public void setWidthToFit()
public float getHeightToFit()
public void setHeightToFit()
public void setSizeToFit()
public void setSizeToFit(float maxWidth, float maxHeight)
public RMShape divideShapeFromEdge(float amount, byte edge, RMShape newShape)
public RMShape divideShapeFromTop(float amount)
public RMAnimator getAnimator()
public RMAnimator getAnimator(boolean create)
public RMAnimator getChildAnimator()
public RMAnimator getChildAnimator(boolean create)
public boolean acceptsMouse()
public void mousePressed(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
public void mouseDragged(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
public void mouseReleased(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
public void mouseEntered(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
public void mouseMoved(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
public void mouseExited(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
public RMShape rpgClone(ReportMill rm)
public java.lang.Object rpgCloneBase()
public void rpgCloneUrl(ReportMill aReportMill, RMShape rpgClone)
public void rpgCloneChildren(ReportMill rm, RMShape copy)
public void rpgCloneNotification(ReportMill aReportMill, RMShape copy)
public void rpgClonePreprocess(ReportMill rm)
public void rpgClonePrepare(ReportMill rm)
public void rpgCloneConclude(ReportMill rm)
public void resolvePageReferences(ReportMill rm, java.lang.Object userInfo)
public int getPageCount()
public java.lang.String getListKey()
public void setListKey(java.lang.String aKeyPath)
public java.lang.String getListKeyDeep()
public RMShape getListKeyShape()
public boolean contains(RMPoint aPoint)
public boolean intersects(RMPath aPath)
public RMShape getChildContaining(RMPoint aPoint)
public java.util.List getChildrenIntersecting(RMPath aPath)
public void bringShapesToFront(java.util.List shapes)
public void sendShapesToBack(java.util.List shapes)
public RMShape groupShapes(java.util.List shapes, RMShape groupShape)
public RMShape getGroupShape(java.util.List shapes)
public java.util.List getChildrenWhoHitTest()
public java.util.List getChildrenWhoDraw()
public java.util.List getChildrenWhoCauseWrap(RMShape aPeer)
public java.lang.Object clone()
public RMShape cloneDeep()
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public void copy(java.lang.Object anObj)
public void copyShape(RMShape aShape)
public java.lang.Object initWithArchiver(RMArchiver anArchiver)
initWithArchiver
in interface RMArchiver.Archiving
initWithArchiver
in class RMObject
public RXElement toXML(RXArchiver anArchiver)
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
public void fromXMLDeep(RXArchiver anArchiver, RXElement anElement)
public void willChange()
public void willChange(RMShape s)
public void setNeedsRepaint()
public void setNeedsRepaint(RMShape aShape)
public void boundsChanged()
public void boundsChanged(RMShape aShape)
public java.lang.String getToolClassName()
public boolean canBeUngrouped()
public boolean acceptsChildren()
public boolean sizesToFitChildren()
public boolean superSelectable()
public boolean childrenSuperSelectImmediately()
public boolean acceptsDragKeys()
public void dragKeyAtPoint(java.lang.String aKey, RMPoint aPoint)
public void dropKeyAtPoint(java.lang.String aKey, RMPoint aPoint)
public void dragExit()
public java.lang.String toString()
toString
in class java.lang.Object
public int page()
public int pageMax()
public int pageBreakMax()
public int pageBreakPageMax()
public boolean hasPageBreaks()
public boolean undoEquals(RMObject anObj)
undoEquals
in class RMObject