Package com.reportmill.shape
Class RMShape
- java.lang.Object
-
- com.reportmill.base.RMObject
-
- com.reportmill.shape.RMShape
-
- All Implemented Interfaces:
RMArchiver.Archiving,java.lang.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
public class RMShape extends RMObject
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
Fields Modifier and Type Field Description static byteWRAP_TYPE_BOTHstatic byteWRAP_TYPE_NONE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsChildren()Editor method.booleanacceptsDragKeys()Editor method.booleanacceptsFormat()Returns whether the shape can accept a format.booleanacceptsMouse()Viewer method.voidaddChild(RMShape aChild)Adds the given child to the end of this shape's children list.voidaddChild(RMShape aChild, int anIndex)Adds the given child to this shape's children list at the given index.voidaddChildBelowLastChild(RMShape aChild)Adds the given child to the end of this shape's children list at a y position just below previously last child.RMRectbounds()Returns raw x, y, width and height of shape as rect (preserves possible negative sizes).voidboundsChanged()Notifies a shape and its parents that its bounds changed.voidboundsChanged(RMShape aShape)Notifies this shape that a given shape's bounds have changed (presumably a descendant).voidbringShapesToFront(java.util.List shapes)Moves the subset of children in the given list to the front of the children list.booleancanBeUngrouped()Editor method.booleanchildrenSuperSelectImmediately()Editor method.java.lang.Objectclone()Standard implementation of Object clone.RMShapecloneDeep()Clones all attributes of this shape with complete clones of its children as well.booleancontains(RMPoint aPoint)Returns whether this shape is hit by the point, given in this shape's parent's coords.RMPointconvertedPointFromShape(RMPoint aPoint, RMShape aShape)Returns the given point converted from the given shape's coords.RMPointconvertedPointToShape(RMPoint aPoint, RMShape aShape)Returns the given point converted to the given shape's coords.RMRectconvertedRectFromShape(RMRect aRect, RMShape aShape)Returns the rect encompassing the given rect converted from the given shape's coords.RMRectconvertedRectToShape(RMRect aRect, RMShape aShape)Returns the rect encompassing the given rect converted to the given shape's coords.RMSizeconvertedSizeFromShape(RMSize aSize, RMShape aShape)Returns the given size converted from the given shape's coords.RMSizeconvertedSizeToShape(RMSize aSize, RMShape aShape)Returns the given size converted to the given shape's coords.RMSizeconvertedVectorFromShape(RMSize aSize, RMShape aShape)Returns the given size converted from the given shape's coords and normalized.RMSizeconvertedVectorToShape(RMSize aSize, RMShape aShape)Returns the given size converted to the given shape's coords and normalized.voidconvertFromShape(RMShape aShape)Transforms the given shape from this shape's coords.RMPathconvertPathFromShape(RMPath aPath, RMShape aShape)Returns the given path converted from the given shape's coords.RMPathconvertPathToShape(RMPath aPath, RMShape aShape)Returns the given path converted to the given shape's coords.RMPointconvertPointFromShape(RMPoint point, RMShape shape)Converts the given point to the given shape's coords (returns it for convenience).RMPointconvertPointToShape(RMPoint point, RMShape shape)Converts the given point to the given shape's coords (returns it for convenience).RMRectconvertRectFromShape(RMRect rect, RMShape shape)Converts the given rect from the given shape's coords (returns it for convenience).RMRectconvertRectToShape(RMRect rect, RMShape shape)Converts the given rect to the given shape's coords (returns it for convenience).RMSizeconvertSizeFromShape(RMSize size, RMShape shape)Converts the given size from the given shape's coords (returns it for convenience).RMSizeconvertSizeToShape(RMSize size, RMShape shape)Converts the given size to the given shape's coords (returns it for convenience).voidconvertToShape(RMShape aShape)Transforms the given shape to this shape's coords.RMSizeconvertVectorFromShape(RMSize size, RMShape shape)Converts the given size (as a vector) from the given shape's coords (returns it for convenience).RMSizeconvertVectorToShape(RMSize size, RMShape shape)Converts the given size (as a vector) to the given shape's coords (returns it for convenience).voidcopy(java.lang.Object anObj)Copies all the attributes of the given object that are in common with this object.voidcopyShape(RMShape aShape)Copies basic shape attributes from given RMShape (location, size, fill, stroke, roll, scale, name, url, etc.).voiddelete()Called when a shape is removed from a shape heirarchy.voiddidChange(RMObject oldObj)Undo support.RMShapedivideShapeFromEdge(float amount, byte edge, RMShape newShape)Divides the shape by a given amount from the given edge.RMShapedivideShapeFromTop(float amount)Divides the shape by a given amount from the top.voiddragExit()Editor method.voiddragKeyAtPoint(java.lang.String aKey, RMPoint aPoint)Editor method.voiddropKeyAtPoint(java.lang.String aKey, RMPoint aPoint)Editor method.booleanequals(java.lang.Object anObj)Standard implementation of Object equals.java.lang.ObjectfromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.voidfromXMLDeep(RXArchiver anArchiver, RXElement anElement)XML unarchival for shape childrenjava.lang.Objectget(java.lang.String aName)Returns the Object associated with the given name for the shape.java.lang.StringgetActionScript()Sets the ActionScript for the shape.RMShapeAnimgetAnim()Returns the collection of animation records for this shape.RMShapeAnimgetAnim(boolean create)Returns the collection of animation records for this shape, with an option to create if absent.RMAnimatorgetAnimator()Returns the animator that this shape registers changes with.RMAnimatorgetAnimator(boolean create)Returns the animator that this shape registers changes with (creating, if requested and currently null).booleangetAutosizeHeight()Returns whether the shape's height is set automatically to its ideal height during report generation.java.lang.StringgetAutosizing()Returns the autosizing settings as a string with hyphens for struts and tilde for sprints (horiz,vert).RMRectgetBounds()Returns the X, Y, width and height of the shape as a rect (use getFrame if shape has roll/scale/skew).RMRectgetBoundsInside()Returns the bounds of the shape in the shape's own coords.RMRectgetBoundsMarked()Returns the bounds of the path associated with this shape in parent coords, ajusted to account for stroke width.RMRectgetBoundsOfChildren()Returns bounds of all children of this shape, which can sometimes differ from this shapes bounds.RMRectgetBoundsOfChildren(java.util.List aList)Returns the bounds of a given subset of this shape's children.RMRectgetBoundsSuperSelected()Returns the bounds of the shape in parect coords when super selected (same as getBoundsMarked by default).booleangetCausesWrap()Returns whether this shape causes text wrap.bytegetCausesWrapType()Returns how this shape causes text wrap.RMShapegetChild(int anIndex)Returns the child at the given index.RMAnimatorgetChildAnimator()Returns the animator that this shape's children use.RMAnimatorgetChildAnimator(boolean create)Returns the animator that this shape's children use (creating, if requested and currently null).RMShapegetChildContaining(RMPoint aPoint)Returns the first (top) shape hit by the point given in this shape's coords.intgetChildCount()Returns the number of children associated with this shape.RMShapegetChildLast()Returns the last child of this shape.java.util.ListgetChildren()Returns the list of children associated with this shape.java.util.ListgetChildrenIntersecting(RMPath aPath)Returns the child shapes hit by the path given in this shape's coords.java.util.ListgetChildrenWhoCauseWrap(RMShape aPeer)Returns the subset of children that cause wrap.java.util.ListgetChildrenWhoDraw()Returns the subset of children that should be drawn (useful for implementing page layering).java.util.ListgetChildrenWhoHitTest()Returns the subset of children that should be used for hit detection (useful for implementing page layering).RMShapegetChildSortedByX(int anIndex)Returns the child at a given index, ordered by X (left-to-right) orderRMShapegetChildWithClass(java.lang.Class aClass)Returns first child found with the given class (called recursively on children if not found at current level).RMShapegetChildWithName(java.lang.String aName)Returns first child found with the given name (called recursively on children if not found at current level).RMColorgetColor()Returns the color of the shape.RMShapegetCommonAncestor(RMShape aShape)Returns first ancestor that the given shape and this shape have in common.RMDocumentgetDocument()Returns the RMDocument ancestor of this shape (or null if not there).RMFillgetFill()Returns the fill for this shape.RMFillgetFill(int anIndex)Returns the specific fill at the given index.RMFillgetFill(java.lang.Class aClass)Returns the specific fill with the given class.intgetFillCount()Returns the number of fills associated with this shape.java.util.ListgetFills()Returns this list of fills - a special list that can be operated on directly.RMFontgetFont()Returns the font for the shape.RMFormatgetFormat()Returns the format for the shape.RMRectgetFrame()Returns the rect in parent coords that fully encloses the shape.RMRectgetFrame(RMShape aShape)Returns the rect that fully encloses the receiver in the given shape's coords.floatgetFrameMaxX()Returns the max X of the shape's frame.floatgetFrameMaxY()Returns the max Y of the shape's frame.floatgetFrameX()Returns the X of the rect that fully encloses the shape in parent coords.RMPointgetFrameXY()Returns the origin of the shape's bounds rect in parent coords.floatgetFrameY()Returns the Y of the rect that fully encloses the shape in parent coords.RMShapegetGroupShape(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.floatgetHeight()Returns the height of the shape.floatgetHeightToFit()Returns the ideal height of this shape to accommodate its contents (just the current height for most shapes).RMImageFillgetImageFill()Returns the imageFill for this shape (or null, if fill isn't an RMImageFill).floatgetLineWidth()Returns the line width of the shape's stroke in printer points.java.lang.StringgetListKey()Returns the "List Key" associated with this shape.java.lang.StringgetListKeyDeep()Returns the concatenated list keys of this shape and its parents (useful for nested list key shapes.RMShapegetListKeyShape()Returns the real shape used to resolve the list key for this shape.floatgetMaxX()Returns the max X of the shape (assumes not rotated, scaled or skewed).floatgetMaxY()Returns the max Y of the shape (assumes not rotated, scaled or skewed).java.lang.StringgetName()Returns the name for the shape.floatgetOpacity()Returns the opactiy of the shape (1 for opaque, 0 for transparent).floatgetOpacityDeep()Returns the combined opacity of this shape and its parent.RMXString.OutlinegetOutline()Returns the outline for the shape.intgetPageCount()Returns the number of pages associated with this shape.RMShapegetPageShape()Returns the RMPage ancestor of this shape (or null if not there).RMShapegetParent()Returns the parent of this shape.intgetParentCount()Returns the number of ancestors (from this shape's parent up to the document).java.util.ListgetParents()Returns a list of this shape's parent, and that shape's parent, up to document.RMPathgetPath()Returns the shape's path.RMPathgetPathInBounds()Returns the shape's path scaled to the shape's current bounds.java.lang.StringgetPropertyKey(java.lang.String aName)Returns the specific property key for the given property name.intgetPropertyKeyCount()Returns the number of property keys (like IsVisible, FillColor, StrokeColor, Width, etc.)java.lang.StringgetPropertyKeyName(int anIndex)Returns the specific settable property key name at the given index.floatgetRoll()Returns the roll of the shape.RMShapegetRootShape()Returns the top level shape (usually an RMDocument).floatgetScaleX()Returns the scale of the X axis of the shape.floatgetScaleY()Returns the scale of the Y axis of the shape.java.util.ListgetShapesToAncestor(RMShape shape)Returns a list of shapes from this shape to a given ancestor.java.util.ListgetShapesToDescendant(RMShape aShape)Returns a list of shape's from this shape to given desendant.java.util.ListgetShapesToShape(RMShape aShape)Returns a list of shapes from this shape to given shape.RMSizegetSize()Returns the size of the shape.RMSizegetSizeP()Returns the size of the shape in parent coords.floatgetSkewX()Returns the skew of the X axis of the shape.floatgetSkewY()Returns the skew of the Y axis of the shape.RMStrokegetStroke()Returns the stroke for this shape.RMColorgetStrokeColor()Returns the stroke color of the shape.RMColorgetTextColor()Returns the text color for the shape.java.lang.StringgetToolClassName()Editor method - returns the tool class name for this shape.RMTransformgetTransform()Returns the transform to this shape from its parent.RMTransformgetTransformFromShape(RMShape aShape)Returns the transform from the given shape to this shape.RMTransformgetTransformInverse()Returns the transform from this shape to it's parent.RMTransformgetTransformToShape(RMShape aShape)Returns the transform from this shape to the given shape.RMUndoergetUndoer()Returns the undoer for this shape (or null if not there).java.lang.StringgetUrl()Sets the URL for the shape.floatgetWidth()Returns the width of the shape.floatgetWidthToFit()Returns the ideal width of this shape to accommodate its contents (just the current width for most shapes).floatgetX()Returns the X location of the shape.RMPointgetXY()Returns the XY location of the shape as a point.RMPointgetXYP()Returns the origin point of the shape in parent's coords.floatgetY()Returns the Y location of the shape.RMShapegroupShapes(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.booleanhasPageBreaks()Page number resolution.floatheight()Returns raw height of shape.intindexOf()Returns the index of this child in its parent.intindexOf(RMShape aChild)Returns the index of the given child in this shape's children list.java.lang.ObjectinitWithArchiver(RMArchiver anArchiver)Legacy unarchival.booleanintersects(RMPath aPath)Returns whether this shape is hit by the path, given in this shape's parent's coords.booleanisAncestor(RMShape aShape)Returns true if given shape is one of this shape's ancestors.booleanisDescendant(RMShape aShape)Returns true if given shape is one of this shape's descendants.booleanisLocked()Returns the locked state of the shape (really just to prevent location/size changes in the editor).booleanisRoot()Editor method - returns whether this shape is at the top level (usually RMPage).booleanisUnderlined()Returns whether the shape is underlined.voidmouseDragged(RMViewer aViewer, java.awt.event.MouseEvent anEvent)Viewer method.voidmouseEntered(RMViewer aViewer, java.awt.event.MouseEvent anEvent)Viewer method.voidmouseExited(RMViewer aViewer, java.awt.event.MouseEvent anEvent)Viewer method.voidmouseMoved(RMViewer aViewer, java.awt.event.MouseEvent anEvent)Viewer method.voidmousePressed(RMViewer aViewer, java.awt.event.MouseEvent anEvent)Viewer method.voidmouseReleased(RMViewer aViewer, java.awt.event.MouseEvent anEvent)Viewer method.booleannotRSS()Returns whether the shape has been rotated, scaled or skewed (for efficientency).voidoffsetChildrenXY(float dx, float dy)Offsets this shape's children by the given dx, dy.voidoffsetXY(double dx, double dy)Offsets the X and Y location of the shape by the given dx & dy amount (convenience).intpage()Page number resolution.intpageBreakMax()Page number resolution.intpageBreakPageMax()Page number resolution.intpageMax()Page number resolution.voidput(java.lang.String aName, java.lang.Object anObj)Sets an Object to be associated with the given name for the shape.voidputPropertyKey(java.lang.String aName, java.lang.String aKey)Puts the specific property key for the given property name.voidreclaimChildren()Ensures that children associated with this shape know who's their daddy.voidremoveChild(int anIndex)Remove's the child at the given index from this shape's children list.voidremoveChild(RMShape aChild)Removes the given child from this shape's children list.voidremoveChildren()Removes all children from this shape.voidremoveChildren(java.util.List l)Removes the given list of children from this shape.voidremoveFromParent()Removes this shape from it's parent.voidresolvePageReferences(ReportMill rm, java.lang.Object userInfo)Replaces all @Page@ style keys with their actual values for this shape and it's children.RMShaperpgClone(ReportMill rm)A clone implementation that copies this shape and its children, performing data substituion as well.java.lang.ObjectrpgCloneBase()An rpgClone hook to provide the basic rpgClone (default implementation just calls Object clone).voidrpgCloneChildren(ReportMill rm, RMShape copy)An rpgClone hook to rpgClone a shape's children.voidrpgCloneConclude(ReportMill rm)An rpgClone hook called by RMDocument after this shape's page is rpgCloned.voidrpgCloneNotification(ReportMill aReportMill, RMShape copy)An rpgClone hook to call ReportMill's rpgClone notification, if shape is named.voidrpgClonePrepare(ReportMill rm)An rpgClone hook called by RMDocument before this shape's page is rpgCloned.voidrpgClonePreprocess(ReportMill rm)An rpgClone hook called by RMDocument on all children before anything else.voidrpgCloneUrl(ReportMill aReportMill, RMShape rpgClone)An rpgClone hook to clone a shape's URL with data substitution.voidsendShapesToBack(java.util.List shapes)Moves the subset of children in the given list to the back of the children list.voidsetActionScript(java.lang.String aString)Returns the ActionScript for the shape.voidsetAnim(RMShapeAnim anAnim)Sets the collection of animation records for this shape.voidsetAutosizeHeight(boolean aValue)Sets whether the shape's height is set automatically to its ideal height during report generation.voidsetAutosizing(java.lang.String aVal)Sets the autosizing settings as a string with hyphens for struts and tilde for sprints (horiz,vert).voidsetBounds(double x, double y, double w, double h)Sets X, Y, width and height of shape to given dimensions.voidsetBounds(java.awt.geom.Rectangle2D aRect)Sets X, Y, width and height of shape to dimensions in given rect.voidsetCausesWrapType(byte aType)Sets how this shape causes text wrap.voidsetChildren(java.util.List aList)Sets the list of children associated with this shape.voidsetColor(RMColor aColor)Sets the color of the shape.voidsetFill(RMFill aFill)Sets the fill for this shape.voidsetFont(RMFont aFont)Sets the font for the shape.voidsetFormat(RMFormat aFormat)Sets the format for the shape.voidsetFrame(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.voidsetFrame(java.awt.geom.Rectangle2D aRect)Sets the bounds of the shape such that it exacly fits in the given parent coord rect.voidsetFrameSize(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.voidsetFrameX(double x)Sets a shape's X such that its bounds rect (in parent coords) has origin at the given X.voidsetFrameXY(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.voidsetFrameXY(RMPoint aPoint)Sets a shape's origin such that its bounds rect (in parent coords) has origin at the given point.voidsetFrameY(double y)Sets a shape's Y such that its bounds rect (in parent coords) has origin at the given Y.voidsetHeight(double aHeight)Sets the height of the shape.voidsetHeightDeep(float h)Sets the height of this shape and its children (proportionally using their autosizing).voidsetHeightDeep(float h, boolean c)Sets the height of this shape and its children (proportionally using their autosizing).voidsetHeightToFit()Sets the shape to its getHeightToFit (which is just the current height for most shapes).voidsetLineWidth(float aValue)Sets the line width of the shape's stroke in printer points.voidsetListKey(java.lang.String aKeyPath)Sets the List Key associated with this shape.voidsetLocked(boolean aValue)Sets the locked state of the shape (really just to prevent location/size changes in the editor).voidsetName(java.lang.String aName)Sets the name for the shape.voidsetNeedsRepaint()Visual change notification - call before making changes that will require repaint.voidsetNeedsRepaint(RMShape aShape)Visual change notification - call before making changes that will require repaint.voidsetOpacity(float aValue)Sets the opactiy of the shape (1 for opaque, 0 for transparent).voidsetOutline(RMXString.Outline anOutline)Sets the outline for the shape.voidsetParent(RMShape aShape)Sets the parent of this shape (called automatically by addChild()).voidsetRoll(float aValue)Sets the roll of the shape.voidsetScaleX(float aValue)Sets the scale of the X axis of the shape.voidsetScaleXY(float sx, float sy)Sets the scale of the X and Y axis.voidsetScaleY(float aValue)Sets the scale of the Y axis of the shape.voidsetSize(double width, double height)Sets the size of the shape.voidsetSize(RMSize aSize)Sets the size of the shape.voidsetSizeDeep(float aWidth, float aHeight)Sets the size of this shape and its children (proportionally using their autosizing).voidsetSizeP(double w, double h)Sets the size of the shape to the given width and height in parent's coords.voidsetSizeToFit()Sets the shape to its ideal size from getWidthToFit and getHeightToFit.voidsetSizeToFit(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.voidsetSkewX(float aValue)Sets the skew of the X axis of the shape.voidsetSkewXY(float skx, float sky)Sets the skew of the X and Y axis.voidsetSkewY(float aValue)Sets the skew of the Y axis of the shape.voidsetStroke(RMStroke aStroke)Sets the stroke for this shape, with an option to turn on drawsStroke.voidsetStrokeColor(RMColor aColor)Sets the stroke color of the shape.voidsetTextColor(RMColor aColor)Sets the text color for the shape.voidsetTime(float aTime)Tells the shape's anim records to update the shape to the given time.voidsetUnderlined(boolean aFlag)Sets the shape to underline.voidsetUrl(java.lang.String aUrl)Returns the URL for the shape.voidsetWidth(double aWidth)Sets the width of the shape.voidsetWidthDeep(float w)Sets the width of this shape and its children (proportionally using their autosizing).voidsetWidthDeep(float w, boolean c)Sets the width of this shape and its children (proportionally using their autosizing).voidsetWidthToFit()Sets the shape to its getWidthToFit (which is just the current width for most shapes).voidsetX(double x)Sets the X location of the shape.voidsetXY(double x, double y)Sets the X and Y location of the shape to the given point (convenience).voidsetXY(java.awt.geom.Point2D aPoint)Sets the X and Y location of the shape to the given point (convenience).voidsetXYP(float x, float y)Sets the origin point of the shape to the given X and Y in parent's coords.voidsetY(double y)Sets the Y location of the shape.booleansizesToFitChildren()Editor method.booleansuperSelectable()Editor method - indicates whether this shape can be super selected.java.lang.StringtoString()Standard to string implementation (prints class name and shape bounds).RXElementtoXML(RXArchiver anArchiver)XML Archival.RMObjectundoClone()Undo support.voidundoCopy(RMObject anObj)Undo support.booleanundoEquals(RMObject anObj)Undo support.voidundoerAddDirtyObject(RMObject anObj)Undoer convenience - tells undoer to add a dirty object.voidundoerDisable()Undoer convenience - disable the undoer.voidundoerEnable()Undoer convenience - enables the undoer.voidundoerSetUndoTitle(java.lang.String aTitle)Undoer convenience - sets title of next registered undo.floatwidth()Returns raw width of shape.voidwillChange()Change notification - call before making attribute changes (provides hook for undo support).voidwillChange(RMShape s)Change notification - call before making attribute changes (provides hook for undo support).floatx()Returns raw x location of shape.floaty()Returns raw y location of shape.-
Methods inherited from class com.reportmill.base.RMObject
didUndo, getAnimAttribute, getClassNameShort
-
-
-
-
Field Detail
-
WRAP_TYPE_NONE
public static final byte WRAP_TYPE_NONE
- See Also:
- Constant Field Values
-
WRAP_TYPE_BOTH
public static final byte WRAP_TYPE_BOTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RMShape
public RMShape()
Creates a plain shape.
-
RMShape
public RMShape(RMShape aShape)
Creates a shape with the same basic attributes as the given shape.
-
-
Method Detail
-
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
public RMRect 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
public RMPoint getXY()
Returns the XY location of the shape as a point.
-
setXY
public void setXY(java.awt.geom.Point2D aPoint)
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
public RMSize getSize()
Returns the size of the shape.
-
setSize
public void setSize(RMSize aSize)
Sets the size of the shape.
-
setSize
public void setSize(double width, double height)Sets the size of the shape.
-
getBounds
public RMRect getBounds()
Returns the X, Y, width and height of the shape as a rect (use getFrame if shape has roll/scale/skew).
-
setBounds
public void setBounds(java.awt.geom.Rectangle2D aRect)
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
public RMRect 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
public RMPoint 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
public RMSize 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
public RMRect getFrame()
Returns the rect in parent coords that fully encloses the shape.
-
setFrame
public void setFrame(java.awt.geom.Rectangle2D aRect)
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
public RMPoint getFrameXY()
Returns the origin of the shape's bounds rect in parent coords.
-
setFrameXY
public void setFrameXY(RMPoint aPoint)
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
public RMRect getFrame(RMShape aShape)
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
public RMFill getFill(int anIndex)
Returns the specific fill at the given index.
-
getFill
public RMFill getFill(java.lang.Class aClass)
Returns the specific fill with the given class.
-
getFills
public java.util.List getFills()
Returns this list of fills - a special list that can be operated on directly.
-
getFill
public RMFill getFill()
Returns the fill for this shape.
-
setFill
public void setFill(RMFill aFill)
Sets the fill for this shape.
-
getStroke
public RMStroke getStroke()
Returns the stroke for this shape.
-
setStroke
public void setStroke(RMStroke aStroke)
Sets the stroke for this shape, with an option to turn on drawsStroke.
-
getColor
public RMColor getColor()
Returns the color of the shape.
-
setColor
public void setColor(RMColor aColor)
Sets the color of the shape.
-
getStrokeColor
public RMColor getStrokeColor()
Returns the stroke color of the shape.
-
setStrokeColor
public void setStrokeColor(RMColor aColor)
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
public RMImageFill getImageFill()
Returns the imageFill for this shape (or null, if fill isn't an RMImageFill).
-
getTextColor
public RMColor getTextColor()
Returns the text color for the shape.
-
setTextColor
public void setTextColor(RMColor aColor)
Sets the text color for the shape.
-
getName
public java.lang.String getName()
Returns the name for the shape.
-
setName
public void setName(java.lang.String aName)
Sets the name for the shape.
-
getUrl
public java.lang.String getUrl()
Sets the URL for the shape.
-
setUrl
public void setUrl(java.lang.String aUrl)
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
public java.lang.String getPropertyKeyName(int anIndex)
Returns the specific settable property key name at the given index.
-
getPropertyKey
public java.lang.String getPropertyKey(java.lang.String aName)
Returns the specific property key for the given property name.
-
putPropertyKey
public void putPropertyKey(java.lang.String aName, java.lang.String aKey)Puts the specific property key for the given property name.
-
getAnim
public RMShapeAnim getAnim()
Returns the collection of animation records for this shape.
-
getAnim
public RMShapeAnim getAnim(boolean create)
Returns the collection of animation records for this shape, with an option to create if absent.
-
setAnim
public void setAnim(RMShapeAnim anAnim)
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
public java.lang.String getActionScript()
Sets the ActionScript for the shape.
-
setActionScript
public void setActionScript(java.lang.String aString)
Returns the ActionScript for the shape.
-
get
public java.lang.Object get(java.lang.String aName)
Returns the Object associated with the given name for the shape.
-
put
public void put(java.lang.String aName, java.lang.Object anObj)Sets an Object to be associated with the given name for the shape.
-
getFont
public RMFont getFont()
Returns the font for the shape.
-
setFont
public void setFont(RMFont aFont)
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
public RMXString.Outline getOutline()
Returns the outline for the shape.
-
setOutline
public void setOutline(RMXString.Outline anOutline)
Sets the outline for the shape.
-
getFormat
public RMFormat getFormat()
Returns the format for the shape.
-
setFormat
public void setFormat(RMFormat aFormat)
Sets the format for the shape.
-
acceptsFormat
public boolean acceptsFormat()
Returns whether the shape can accept a format.
-
getAutosizing
public java.lang.String getAutosizing()
Returns the autosizing settings as a string with hyphens for struts and tilde for sprints (horiz,vert).
-
setAutosizing
public void setAutosizing(java.lang.String aVal)
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
public RMPath getPath()
Returns the shape's path.
-
getPathInBounds
public RMPath 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
public RMRect getBoundsOfChildren()
Returns bounds of all children of this shape, which can sometimes differ from this shapes bounds.
-
getBoundsOfChildren
public RMRect getBoundsOfChildren(java.util.List aList)
Returns the bounds of a given subset of this shape's children.
-
getBoundsSuperSelected
public RMRect getBoundsSuperSelected()
Returns the bounds of the shape in parect coords when super selected (same as getBoundsMarked by default).
-
getBoundsMarked
public RMRect getBoundsMarked()
Returns the bounds of the path associated with this shape in parent coords, ajusted to account for stroke width.
-
getParent
public RMShape getParent()
Returns the parent of this shape.
-
setParent
public void setParent(RMShape aShape)
Sets the parent of this shape (called automatically by addChild()).
-
getParents
public java.util.List 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
public RMShape getChild(int anIndex)
Returns the child at the given index.
-
getChildLast
public RMShape getChildLast()
Returns the last child of this shape.
-
getChildren
public java.util.List getChildren()
Returns the list of children associated with this shape.
-
getChildSortedByX
public RMShape getChildSortedByX(int anIndex)
Returns the child at a given index, ordered by X (left-to-right) order
-
setChildren
public void setChildren(java.util.List aList)
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
public int indexOf(RMShape aChild)
Returns the index of the given child in this shape's children list.
-
addChild
public void addChild(RMShape aChild)
Adds the given child to the end of this shape's children list.
-
addChild
public void addChild(RMShape aChild, int anIndex)
Adds the given child to this shape's children list at the given index.
-
addChildBelowLastChild
public 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.
-
removeChild
public void removeChild(RMShape aChild)
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
public void removeChildren(java.util.List l)
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
public RMShape getChildWithName(java.lang.String aName)
Returns first child found with the given name (called recursively on children if not found at current level).
-
getChildWithClass
public RMShape getChildWithClass(java.lang.Class aClass)
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
public RMShape getRootShape()
Returns the top level shape (usually an RMDocument).
-
getDocument
public RMDocument getDocument()
Returns the RMDocument ancestor of this shape (or null if not there).
-
getPageShape
public RMShape getPageShape()
Returns the RMPage ancestor of this shape (or null if not there).
-
getUndoer
public RMUndoer getUndoer()
Returns the undoer for this shape (or null if not there).
-
undoerSetUndoTitle
public void undoerSetUndoTitle(java.lang.String aTitle)
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
public void undoerAddDirtyObject(RMObject anObj)
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
public boolean isAncestor(RMShape aShape)
Returns true if given shape is one of this shape's ancestors.
-
isDescendant
public boolean isDescendant(RMShape aShape)
Returns true if given shape is one of this shape's descendants.
-
getCommonAncestor
public RMShape getCommonAncestor(RMShape aShape)
Returns first ancestor that the given shape and this shape have in common.
-
getShapesToDescendant
public java.util.List getShapesToDescendant(RMShape aShape)
Returns a list of shape's from this shape to given desendant.
-
getShapesToAncestor
public java.util.List getShapesToAncestor(RMShape shape)
Returns a list of shapes from this shape to a given ancestor.
-
getShapesToShape
public java.util.List getShapesToShape(RMShape aShape)
Returns a list of shapes from this shape to given shape.
-
getTransform
public RMTransform getTransform()
Returns the transform to this shape from its parent.
-
getTransformInverse
public RMTransform getTransformInverse()
Returns the transform from this shape to it's parent.
-
getTransformToShape
public RMTransform getTransformToShape(RMShape aShape)
Returns the transform from this shape to the given shape.
-
getTransformFromShape
public RMTransform getTransformFromShape(RMShape aShape)
Returns the transform from the given shape to this shape.
-
convertPointToShape
public RMPoint convertPointToShape(RMPoint point, RMShape shape)
Converts the given point to the given shape's coords (returns it for convenience).
-
convertPointFromShape
public RMPoint convertPointFromShape(RMPoint point, RMShape shape)
Converts the given point to the given shape's coords (returns it for convenience).
-
convertVectorToShape
public RMSize convertVectorToShape(RMSize size, RMShape shape)
Converts the given size (as a vector) to the given shape's coords (returns it for convenience).
-
convertVectorFromShape
public RMSize convertVectorFromShape(RMSize size, RMShape shape)
Converts the given size (as a vector) from the given shape's coords (returns it for convenience).
-
convertSizeToShape
public RMSize convertSizeToShape(RMSize size, RMShape shape)
Converts the given size to the given shape's coords (returns it for convenience).
-
convertSizeFromShape
public RMSize convertSizeFromShape(RMSize size, RMShape shape)
Converts the given size from the given shape's coords (returns it for convenience).
-
convertRectToShape
public RMRect convertRectToShape(RMRect rect, RMShape shape)
Converts the given rect to the given shape's coords (returns it for convenience).
-
convertRectFromShape
public RMRect convertRectFromShape(RMRect rect, RMShape shape)
Converts the given rect from the given shape's coords (returns it for convenience).
-
convertedPointToShape
public RMPoint convertedPointToShape(RMPoint aPoint, RMShape aShape)
Returns the given point converted to the given shape's coords.
-
convertedPointFromShape
public RMPoint convertedPointFromShape(RMPoint aPoint, RMShape aShape)
Returns the given point converted from the given shape's coords.
-
convertedVectorToShape
public RMSize convertedVectorToShape(RMSize aSize, RMShape aShape)
Returns the given size converted to the given shape's coords and normalized.
-
convertedVectorFromShape
public RMSize convertedVectorFromShape(RMSize aSize, RMShape aShape)
Returns the given size converted from the given shape's coords and normalized.
-
convertedSizeToShape
public RMSize convertedSizeToShape(RMSize aSize, RMShape aShape)
Returns the given size converted to the given shape's coords.
-
convertedSizeFromShape
public RMSize convertedSizeFromShape(RMSize aSize, RMShape aShape)
Returns the given size converted from the given shape's coords.
-
convertedRectToShape
public RMRect convertedRectToShape(RMRect aRect, RMShape aShape)
Returns the rect encompassing the given rect converted to the given shape's coords.
-
convertedRectFromShape
public RMRect convertedRectFromShape(RMRect aRect, RMShape aShape)
Returns the rect encompassing the given rect converted from the given shape's coords.
-
convertPathToShape
public RMPath convertPathToShape(RMPath aPath, RMShape aShape)
Returns the given path converted to the given shape's coords.
-
convertPathFromShape
public RMPath convertPathFromShape(RMPath aPath, RMShape aShape)
Returns the given path converted from the given shape's coords.
-
convertToShape
public void convertToShape(RMShape aShape)
Transforms the given shape to this shape's coords.
-
convertFromShape
public void convertFromShape(RMShape aShape)
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
public RMShape divideShapeFromEdge(float amount, byte edge, RMShape newShape)
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
public RMShape divideShapeFromTop(float amount)
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
public RMAnimator getAnimator()
Returns the animator that this shape registers changes with.
-
getAnimator
public RMAnimator getAnimator(boolean create)
Returns the animator that this shape registers changes with (creating, if requested and currently null).
-
getChildAnimator
public RMAnimator getChildAnimator()
Returns the animator that this shape's children use.
-
getChildAnimator
public RMAnimator getChildAnimator(boolean create)
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
public void mousePressed(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
Viewer method.
-
mouseDragged
public void mouseDragged(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
Viewer method.
-
mouseReleased
public void mouseReleased(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
Viewer method.
-
mouseEntered
public void mouseEntered(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
Viewer method.
-
mouseMoved
public void mouseMoved(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
Viewer method.
-
mouseExited
public void mouseExited(RMViewer aViewer, java.awt.event.MouseEvent anEvent)
Viewer method.
-
rpgClone
public RMShape rpgClone(ReportMill rm)
A clone implementation that copies this shape and its children, performing data substituion as well.
-
rpgCloneBase
public java.lang.Object rpgCloneBase()
An rpgClone hook to provide the basic rpgClone (default implementation just calls Object clone).
-
rpgCloneUrl
public void rpgCloneUrl(ReportMill aReportMill, RMShape rpgClone)
An rpgClone hook to clone a shape's URL with data substitution.
-
rpgCloneChildren
public void rpgCloneChildren(ReportMill rm, RMShape copy)
An rpgClone hook to rpgClone a shape's children.
-
rpgCloneNotification
public void rpgCloneNotification(ReportMill aReportMill, RMShape copy)
An rpgClone hook to call ReportMill's rpgClone notification, if shape is named.
-
rpgClonePreprocess
public void rpgClonePreprocess(ReportMill rm)
An rpgClone hook called by RMDocument on all children before anything else.
-
rpgClonePrepare
public void rpgClonePrepare(ReportMill rm)
An rpgClone hook called by RMDocument before this shape's page is rpgCloned.
-
rpgCloneConclude
public void rpgCloneConclude(ReportMill rm)
An rpgClone hook called by RMDocument after this shape's page is rpgCloned.
-
resolvePageReferences
public void resolvePageReferences(ReportMill rm, java.lang.Object userInfo)
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
public java.lang.String 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
public void setListKey(java.lang.String aKeyPath)
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
public java.lang.String getListKeyDeep()
Returns the concatenated list keys of this shape and its parents (useful for nested list key shapes.
-
getListKeyShape
public RMShape getListKeyShape()
Returns the real shape used to resolve the list key for this shape. This seems bogus - might go soon.
-
contains
public boolean contains(RMPoint aPoint)
Returns whether this shape is hit by the point, given in this shape's parent's coords.
-
intersects
public boolean intersects(RMPath aPath)
Returns whether this shape is hit by the path, given in this shape's parent's coords.
-
getChildContaining
public RMShape getChildContaining(RMPoint aPoint)
Returns the first (top) shape hit by the point given in this shape's coords.
-
getChildrenIntersecting
public java.util.List getChildrenIntersecting(RMPath aPath)
Returns the child shapes hit by the path given in this shape's coords.
-
bringShapesToFront
public void bringShapesToFront(java.util.List shapes)
Moves the subset of children in the given list to the front of the children list.
-
sendShapesToBack
public void sendShapesToBack(java.util.List shapes)
Moves the subset of children in the given list to the back of the children list.
-
groupShapes
public 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.
-
getGroupShape
public 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.
-
getChildrenWhoHitTest
public java.util.List getChildrenWhoHitTest()
Returns the subset of children that should be used for hit detection (useful for implementing page layering).
-
getChildrenWhoDraw
public java.util.List getChildrenWhoDraw()
Returns the subset of children that should be drawn (useful for implementing page layering).
-
getChildrenWhoCauseWrap
public java.util.List getChildrenWhoCauseWrap(RMShape aPeer)
Returns the subset of children that cause wrap.
-
clone
public java.lang.Object clone()
Standard implementation of Object clone. Null's out shape's parent and children.
-
cloneDeep
public RMShape cloneDeep()
Clones all attributes of this shape with complete clones of its children as well.
-
equals
public boolean equals(java.lang.Object anObj)
Standard implementation of Object equals.- Overrides:
equalsin classjava.lang.Object
-
copy
public void copy(java.lang.Object anObj)
Copies all the attributes of the given object that are in common with this object.
-
copyShape
public void copyShape(RMShape aShape)
Copies basic shape attributes from given RMShape (location, size, fill, stroke, roll, scale, name, url, etc.).
-
initWithArchiver
public java.lang.Object initWithArchiver(RMArchiver anArchiver)
Legacy unarchival.- Specified by:
initWithArchiverin interfaceRMArchiver.Archiving- Overrides:
initWithArchiverin classRMObject
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML Archival.
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.
-
fromXMLDeep
public void fromXMLDeep(RXArchiver anArchiver, RXElement anElement)
XML unarchival for shape children
-
willChange
public void willChange()
Change notification - call before making attribute changes (provides hook for undo support).
-
willChange
public void willChange(RMShape s)
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
public void setNeedsRepaint(RMShape aShape)
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
public void boundsChanged(RMShape aShape)
Notifies this shape that a given shape's bounds have changed (presumably a descendant).
-
getToolClassName
public java.lang.String 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
public void dragKeyAtPoint(java.lang.String aKey, RMPoint aPoint)Editor method.
-
dropKeyAtPoint
public void dropKeyAtPoint(java.lang.String aKey, RMPoint aPoint)Editor method.
-
dragExit
public void dragExit()
Editor method.
-
toString
public java.lang.String toString()
Standard to string implementation (prints class name and shape bounds).- Overrides:
toStringin classjava.lang.Object
-
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
public boolean undoEquals(RMObject anObj)
Undo support.- Overrides:
undoEqualsin classRMObject
-
-