public class RMShape extends RMObject implements java.beans.PropertyChangeListener, DeepChangeListener, RMTypes
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);
RMTypes.AlignX, RMTypes.AlignY
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 |
acceptsMouse()
Returns whether shape accepts mouse events.
|
void |
addAction(RMAction anAction)
Adds an action.
|
void |
addActions(RMAction... theActions)
Adds actions.
|
void |
addBinding(javi.ui.Binding aBinding)
Adds the individual binding to the shape's bindings list.
|
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 |
addChild(RMShape aChild,
int anIndex,
java.lang.Object theLayoutInfo)
Adds the given child to this shape's children list at the given index.
|
void |
addChild(RMShape aChild,
java.lang.Object theConstr)
Adds the given child with the given constraints.
|
void |
addDeepChangeListener(DeepChangeListener aListener)
Adds a deep change listener to shape to listen for shape changes and property changes received by shape.
|
<T> void |
addListener(java.lang.Class<T> aClass,
T aListener)
Override to start listening to children when first PropertyChangeListener is added to this shape.
|
void |
addMouseListener(RMShapeMouseListener aListener)
Add mouse listener.
|
void |
animUpdate(java.beans.PropertyChangeEvent anEvent)
Called to update shape anim.
|
RMRect |
bounds()
Returns raw x, y, width and height of shape as rect (preserves possible negative sizes).
|
void |
bringShapesToFront(java.util.List<RMShape> shapes)
Moves the subset of children in the given list to the front of the children list.
|
boolean |
childrenSuperSelectImmediately()
Editor method.
|
RMShape |
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 |
copyShape(RMShape aShape)
Copies basic shape attributes from given RMShape (location, size, fill, stroke, roll, scale, name, url, etc.).
|
RMShape |
createDivideShapeRemainder(byte anEdge)
Creates a shape suitable for the "remainder" portion of a divideShape call (just a clone by default).
|
RMShape |
createPartClone()
Creates a new clone of this shape to hold multi-part children.
|
void |
deepChange(java.beans.PropertyChangeListener aListener,
java.beans.PropertyChangeEvent anEvent)
Deep property change listener implementation.
|
RMShape |
divideShapeFromEdge(float amount,
byte edge,
RMShape newShape)
Divides the shape by a given amount from the given edge.
|
RMShape |
divideShapeFromTop(float anAmount)
Divides the shape by a given amount from the top.
|
void |
doLayout()
Does immediate layout.
|
boolean |
equals(java.lang.Object anObj)
Standard implementation of Object equals.
|
java.lang.Object |
fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival generic - break fromXML into fromXMLShape and fromXMLShapeChildren.
|
java.lang.Object |
fromXMLShape(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival.
|
void |
fromXMLShapeChildren(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival for shape children.
|
void |
fromXMLShapeLayout(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival for shape layout.
|
java.lang.Object |
get(java.lang.String aName)
Returns the Object associated with the given name for the shape.
|
java.lang.Object |
get(java.lang.String aName,
java.lang.Object aDefault)
Returns the object associated with given key, using the given default if not found.
|
RMAction |
getAction()
Returns the action for this shape.
|
RMTypes.AlignX |
getAlignmentX()
Returns the horizontal alignment.
|
RMTypes.AlignY |
getAlignmentY()
Returns the vertical alignment.
|
RMShape |
getAncestor(int anIndex)
Returns the ancestor at the given index (parent is ancestor 0).
|
int |
getAncestorCount()
Returns the number of ancestors (from this shape's parent up to the document).
|
RMShape |
getAncestorInCommon(RMShape aShape)
Returns first ancestor that the given shape and this shape have in common.
|
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).
|
java.lang.String |
getAutosizing()
Returns the autosizing settings as a string with hyphens for struts and tilde for sprints (horiz,vert).
|
java.lang.String |
getAutosizingDefault()
Returns the autosizing default.
|
float |
getBestHeight()
Returns the best height for current width.
|
RMSize |
getBestSize()
Returns the best size, which is the preferred size constrained to min/max size.
|
RMSize |
getBestSize(float aMaxWidth,
float aMaxHeight)
Returns the best size for given available size, which is the preferred size constrained to min/max size.
|
float |
getBestWidth()
Returns the best width for current height.
|
javi.ui.Binding |
getBinding(int anIndex)
Returns the individual binding at the given index.
|
javi.ui.Binding |
getBinding(java.lang.String aPropertyName)
Returns the individual binding with the given property name.
|
int |
getBindingCount()
Returns the number of bindings associated with shape.
|
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 local coords, adjusted to account for stroke width.
|
RMRect |
getBoundsMarkedDeep()
Returns the marked bounds of this shape and it's children.
|
RMRect |
getBoundsOfChildren()
Returns bounds of all children of this shape, which can sometimes differ from this shapes bounds.
|
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[] |
getChildArray()
Returns a copy of the children as an array.
|
java.awt.Shape |
getChildClipShape()
Returns clip shape to be used for children.
|
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<RMShape> |
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.
|
<T extends RMShape> |
getChildrenWithClass(java.lang.Class<T> aClass)
Returns all the shapes in the shape hierarchy of a particular class.
|
<T extends RMShape> |
getChildrenWithClass(java.util.List aList,
java.lang.Class<T> aClass)
Adds all the shapes in the shape hierarchy of a particular class to the list.
|
<T extends RMShape> |
getChildWithClass(java.lang.Class<T> 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).
|
java.awt.Shape |
getClipShape()
Returns clip shape for shape.
|
RMColor |
getColor()
Returns the color of the shape.
|
javi.data.Entity |
getDatasetEntity()
Returns the entity this shape should show in keys browser.
|
java.lang.String |
getDatasetKey()
Returns the dataset key associated with this shape.
|
RMDocument |
getDocument()
Returns the RMDocument ancestor of this shape (or null if not there).
|
RMEffect |
getEffect()
Returns the effect for this shape.
|
RMShapeEventAdapter |
getEventAdapter(boolean doCreate)
Returns the ShapeEventAdapter for this shape.
|
RMFill |
getFill()
Returns the fill for this shape.
|
RMFont |
getFont()
Returns the font for the shape (or first child with font).
|
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.
|
float |
getHeight()
Returns the height of the shape.
|
java.lang.String |
getHover()
Sets the Hover string for the shape.
|
RMImageFill |
getImageFill()
Returns the imageFill for this shape (or null, if fill isn't an RMImageFill).
|
RMShapeLayout |
getLayout()
Returns the layout for this shape.
|
RMShapeLayout |
getLayout(boolean doCreate)
Returns the layout for this shape with option to create if missing.
|
java.lang.Object |
getLayoutInfo()
Returns an object describing layout paramaters of this shape in its parent's layout.
|
float |
getLineWidth()
Deprecated.
|
RMPath |
getMaskPath()
Returns the outline of the shape as a path.
|
RMSize |
getMaximumSize()
Returns the shape maximum size.
|
RMSize |
getMaximumSizeProperty()
Returns the maximum size as set in properties.
|
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).
|
RMSize |
getMinimumSize()
Returns the shape minimum size.
|
RMSize |
getMinimumSizeProperty()
Returns the minimum size as set in properties.
|
java.lang.String |
getName()
Returns the name for the shape.
|
float |
getOpacity()
Returns the opacity of the shape (1 for opaque, 0 for transparent).
|
float |
getOpacityDeep()
Returns the combined opacity of this shape and its parent.
|
RMShape |
getOriginal()
Returns the original, if this shape was created via clone.
|
RMXString.Outline |
getOutline()
Returns the outline for the shape.
|
int |
getPageBreak()
Returns the "PageBreak" for this shape as defined by shapes that define a page break (currently only RMTable).
|
int |
getPageBreakMax()
Returns the "PageBreakMax" for this shape as defined by shapes that define a page break (currently only RMTable).
|
int |
getPageBreakPage()
Returns the "PageBreakPage" for this shape, or the page number relative to the last page break,
as defined by shapes that define explicit page breaks (currently only RMTable).
|
int |
getPageBreakPageMax()
Returns the "PageBreakPageMax" for this shape, or the max page number relative to the last and next page breaks,
as defined by shapes that define explicit page breaks (currently only RMTable).
|
RMShape |
getPageShape()
Returns the RMPage ancestor of this shape (or null if not there).
|
RMShape |
getParent()
Returns the parent of this shape.
|
<T extends RMShape> |
getParentWithClass(java.lang.Class<T> aClass)
Returns the first parent with given class by iterating up parent hierarchy.
|
RMShape |
getPart(int anIndex)
Returns the individual part at the given index.
|
int |
getPartCount()
Returns the number of parts this shape needs to represent itself, if it's a multi-part shape.
|
RMShape |
getPartDeep(int anIndex,
ReportMill aReportMill)
Returns the individual part for given index, by getting parts deep.
|
int |
getPartDeepCount()
Returns the number of parts needed to represent this shape and its children.
|
RMPath |
getPath()
Returns the shape's path.
|
RMPath |
getPathInBounds()
Returns the shape's path scaled to the shape's current bounds.
|
RMSize |
getPreferredSize()
Returns the shape preferred size.
|
RMSize |
getPreferredSize(float aMaxWidth,
float aMaxHeight)
Returns the shape preferred size.
|
RMSize |
getPreferredSizeProperty()
Returns the preferred size as set in properties.
|
java.lang.String |
getPropertyNameMapped(java.lang.String aName)
Returns a mapped property name.
|
java.util.List<java.lang.String> |
getPropertyNames()
Returns the property names for helper's instance class.
|
ReportMill |
getReportMill()
Returns the reportmill available for this shape.
|
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<RMShape> |
getShapesToAncestor(RMShape aShape)
Returns a list of shapes from this shape to a given ancestor, inclusive.
|
java.util.List<RMShape> |
getShapesToDescendant(RMShape aShape)
Returns a list of shape's from this shape to given descendant, inclusive.
|
java.util.List<RMShape> |
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.
|
float |
getStrokeWidth()
Returns the stroke width of the shape's stroke in printer points.
|
RMColor |
getTextColor()
Returns the text color for the shape.
|
RMTimeline |
getTimeline()
Returns the timeline for animating shape property changes.
|
RMTimeline |
getTimeline(boolean create)
Returns the timeline for animating shape property changes, with an option to create if absent.
|
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.
|
java.awt.Shape |
getVisbileBounds()
Returns the visible bounds in shape coords, by intersecting this shape's bounds with ancester clip and child clip.
|
java.awt.Shape |
getVisibleBounds(RMRect aRect)
Returns the visible bounds of given rect in shape coords, by intersecting rect with ancester clip and child clip.
|
java.awt.Shape |
getVisibleBounds(RMRect aRect,
RMShape anAncestor)
Returns the visible bounds of given rect in given ancestor coords, by intersecting the rect with ancester clip and child clip.
|
java.awt.Shape |
getVisibleBounds(RMShape anAncestor)
Returns the visible bounds in given ancestor coords, by intersecting this shape's bounds with ancester clip and child clip.
|
float |
getWidth()
Returns the width of the shape.
|
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.
|
float |
height()
Returns raw height of shape.
|
int |
indexOf()
Returns the index of this child in its parent.
|
int |
indexOfChild(RMShape aChild)
Returns the index of the given child in this shape's children list.
|
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 |
isAnimProperty(java.lang.String aPropertyName)
Returns whether given property name is anim property.
|
boolean |
isDescendant(RMShape aShape)
Returns true if given shape is one of this shape's descendants.
|
boolean |
isEditing()
Returns whether this shape (and its parents) is visible in a editor.
|
boolean |
isEnabled(javi.ui.UITypes.UIEventType aType)
Returns whether given event is enabled.
|
boolean |
isHittable()
Returns whether shape is hittable (by asking parent).
|
boolean |
isHittableChild(RMShape aChild)
Returns whether given child shape is hittable.
|
boolean |
isLocked()
Returns the locked state of the shape (really just to prevent location/size changes in the editor).
|
boolean |
isMaximumSizeSet()
Returns whether shape maximum size is set.
|
boolean |
isMinimumSizeSet()
Returns whether shape minimum size is set.
|
boolean |
isRoot()
Editor method - returns whether this shape is at the top level (usually RMPage).
|
boolean |
isRSS()
Returns whether the shape has been rotated, scaled or skewed (for efficiency).
|
boolean |
isShowing()
Returns whether this shape (and its parents) is visible in a viewer or editor.
|
boolean |
isUnderlined()
Returns whether the shape is underlined.
|
boolean |
isViewing()
Returns whether this shape (and its parents) is visible in a viewer.
|
boolean |
isVisible()
Returns whether this shape is visible.
|
boolean |
isVisibleChild(RMShape aChild)
Returns whether given child shape is visible.
|
void |
layoutReset()
Resets the shape layout (convenience to account for null layouts).
|
void |
mouseClicked(RMShapeMouseEvent anEvent)
Handles mouse clicked events.
|
void |
mouseDragged(RMShapeMouseEvent anEvent)
Handles mouse dragged events.
|
void |
mouseEntered(RMShapeMouseEvent anEvent)
Handles mouse entered events.
|
void |
mouseExited(RMShapeMouseEvent anEvent)
Handles mouse exited events.
|
void |
mouseMoved(RMShapeMouseEvent anEvent)
Handles mouse moved events.
|
void |
mousePressed(RMShapeMouseEvent anEvent)
Handles mouse pressed events.
|
void |
mouseReleased(RMShapeMouseEvent anEvent)
Handles mouse released events.
|
boolean |
notRSS()
Returns whether the shape has been rotated, scaled or skewed (for efficiency).
|
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 |
pageMax()
Page number resolution.
|
void |
paint(java.awt.Graphics2D aGraphics)
Top-level generic shape painting - sets transform and opacity then does a paintAll.
|
void |
paintShape(java.awt.Graphics2D aGraphics)
Basic shape painting - paints shape fill and stroke.
|
void |
paintShapeAll(java.awt.Graphics2D aGraphics)
Calls paintShape, paintShapeChildren and paintShapeOver.
|
void |
paintShapeChildren(java.awt.Graphics2D aGraphics)
Paints shape children.
|
void |
paintShapeOver(java.awt.Graphics2D aGraphics)
Paints after (on top) of children.
|
void |
propertyChange(java.beans.PropertyChangeEvent anEvent)
Property change listener implementation.
|
java.lang.Object |
put(java.lang.String aName,
java.lang.Object anObj)
Sets an Object to be associated with the given name for the shape.
|
void |
removeAction(RMAction anAction)
Removes an action.
|
javi.ui.Binding |
removeBinding(int anIndex)
Removes the binding at the given index from shape's bindings list.
|
boolean |
removeBinding(java.lang.String aPropertyName)
Removes the binding with given property name.
|
RMShape |
removeChild(int anIndex)
Remove's the child at the given index from this shape's children list.
|
int |
removeChild(RMShape aChild)
Removes the given child from this shape's children list.
|
void |
removeChildren()
Removes all children from this shape (in reverse order).
|
void |
removeDeepChangeListener(DeepChangeListener aLstnr)
Removes a deep change listener from shape.
|
void |
removeFromParent()
Removes this shape from it's parent.
|
void |
removeMouseListener(RMShapeMouseListener aLsnr)
Remove mouse listener.
|
void |
repaint()
Visual change notification - call before making changes that will require repaint.
|
void |
repaint(RMShape aShape)
Visual change notification - call before making changes that will require repaint.
|
void |
resolvePageReferences(ReportMill rm,
java.lang.Object userInfo)
Replaces all @Page@ style keys with their actual values for this shape and it's children.
|
void |
revalidate()
Sets shape layout to invalid.
|
void |
sendShapesToBack(java.util.List<RMShape> shapes)
Moves the subset of children in the given list to the back of the children list.
|
void |
setAction(RMAction anAction)
Sets the action for this shape.
|
void |
setAlignmentX(RMTypes.AlignX anAlignX)
Sets the horizontal alignment.
|
void |
setAlignmentY(RMTypes.AlignY anAlignX)
Sets the vertical alignment.
|
void |
setAutosizing(java.lang.String aValue)
Sets the autosizing settings as a string with hyphens for struts and tilde for sprints (horiz,vert).
|
void |
setBestHeight()
Sets the shape to its best height (which is just the current height for most shapes).
|
void |
setBestSize()
Sets the shape to its best size.
|
void |
setBestSize(float aMaxWidth,
float aMaxHeight)
Sets the shape to its best size, with parameters to specify a max width/height.
|
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 |
setCausesWrap(boolean aValue)
Sets whether this shape causes text wrap.
|
void |
setCausesWrapType(byte aType)
Sets how this shape causes text wrap.
|
void |
setColor(RMColor aColor)
Sets the color of the shape.
|
void |
setEffect(RMEffect anEffect)
Sets the effect for this shape.
|
void |
setEnabled(javi.ui.UITypes.UIEventType aType,
boolean aValue)
Sets whether given event is enabled.
|
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(float aValue)
Sets the height of the shape.
|
void |
setHover(java.lang.String aString)
Returns the URL for the shape.
|
void |
setLayout(RMShapeLayout aLayout)
Sets the layout for this shape.
|
void |
setLayoutInfo(java.lang.Object theLayoutInfo)
Sets an object describing layout parameters of this shape in its parent's layout.
|
void |
setLineWidth(float aValue)
Deprecated.
|
void |
setLocked(boolean aValue)
Sets the locked state of the shape (really just to prevent location/size changes in the editor).
|
void |
setMaximumSize(RMSize aSize)
Sets the shape maximum size.
|
void |
setMinimumSize(RMSize aSize)
Sets the shape minimum size.
|
void |
setName(java.lang.String aName)
Sets the name for the shape.
|
void |
setOpacity(float aValue)
Sets the opacity 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 |
setPreferredSize(RMSize aSize)
Sets the shape preferred size.
|
void |
setReportMill(ReportMill aReportMill)
Report generation.
|
void |
setReportMillBindings(ReportMill aReportMill)
Report generation for URL and bindings.
|
void |
setReportMillDeep(ReportMill aReportMill)
Sets reportmill deep.
|
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 |
setShowing(boolean aValue)
Sets whether shape is showing.
|
void |
setSize(double width,
double height)
Sets the size of the shape.
|
void |
setSize(RMSize aSize)
Sets the size of the shape.
|
void |
setSizeP(double w,
double h)
Sets the size of the shape to the given width and height in parent's coords.
|
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 |
setStrokeWidth(float aValue)
Sets the stroke width of the shape's stroke in printer points.
|
void |
setTextColor(RMColor aColor)
Sets the text color for the shape.
|
void |
setTime(int aTime)
Tells the shape's timeline to update the shape to the given time in milliseconds.
|
void |
setUnderlined(boolean aFlag)
Sets the shape to underline.
|
void |
setURL(java.lang.String aURL)
Returns the URL for the shape.
|
void |
setVisible(boolean aValue)
Sets whether this shape is visible.
|
void |
setWidth(float aValue)
Sets the width of the shape.
|
void |
setX(float aValue)
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(float aValue)
Sets the Y location of the shape.
|
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).
|
com.reportmill.archiver.RXElement |
toXML(com.reportmill.archiver.RXArchiver anArchiver,
java.lang.Object anOwner)
XML Archival generic - break toXML into toXMLShape and toXMLShapeChildren.
|
com.reportmill.archiver.RXElement |
toXMLShape(com.reportmill.archiver.RXArchiver anArchiver,
java.lang.Object anOwner)
XML Archival.
|
void |
toXMLShapeChildren(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML archival of children.
|
void |
toXMLShapeLayout(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML archival of layout manager.
|
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.
|
void |
validate()
Does immediate layout if invalid.
|
float |
width()
Returns raw width of shape.
|
float |
x()
Returns raw x location of shape.
|
float |
y()
Returns raw y location of shape.
|
addPropertyChangeListener, removePropertyChangeListener
getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
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(float aValue)
public float getY()
public void setY(float aValue)
public float getWidth()
public void setWidth(float aValue)
public float getHeight()
public void setHeight(float aValue)
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 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 RMRect getBoundsInside()
public RMRect getBoundsMarked()
public RMRect getBoundsMarkedDeep()
public RMRect getBoundsOfChildren()
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 isRSS()
public boolean notRSS()
public RMStroke getStroke()
public void setStroke(RMStroke aStroke)
public RMFill getFill()
public void setFill(RMFill aFill)
public RMEffect getEffect()
public void setEffect(RMEffect anEffect)
public RMImageFill getImageFill()
public RMColor getColor()
public void setColor(RMColor aColor)
public RMColor getStrokeColor()
public void setStrokeColor(RMColor aColor)
public float getStrokeWidth()
public void setStrokeWidth(float aValue)
@Deprecated public float getLineWidth()
@Deprecated public void setLineWidth(float aValue)
public float getOpacity()
public void setOpacity(float aValue)
public float getOpacityDeep()
public boolean isVisible()
public void setVisible(boolean aValue)
public boolean isVisibleChild(RMShape aChild)
public boolean isHittable()
public boolean isHittableChild(RMShape aChild)
public boolean isShowing()
public void setShowing(boolean aValue)
public boolean isViewing()
public boolean isEditing()
public RMAction getAction()
public void setAction(RMAction anAction)
public void addAction(RMAction anAction)
public void addActions(RMAction... theActions)
public void removeAction(RMAction anAction)
public RMColor getTextColor()
public void setTextColor(RMColor aColor)
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 RMTypes.AlignX getAlignmentX()
public void setAlignmentX(RMTypes.AlignX anAlignX)
public RMTypes.AlignY getAlignmentY()
public void setAlignmentY(RMTypes.AlignY anAlignX)
public RMFormat getFormat()
public void setFormat(RMFormat aFormat)
public boolean getCausesWrap()
public void setCausesWrap(boolean aValue)
public byte getCausesWrapType()
public void setCausesWrapType(byte aType)
public <T> void addListener(java.lang.Class<T> aClass, T aListener)
addListener
in class RMListenerList
public void addDeepChangeListener(DeepChangeListener aListener)
public void removeDeepChangeListener(DeepChangeListener aLstnr)
public void propertyChange(java.beans.PropertyChangeEvent anEvent)
propertyChange
in interface java.beans.PropertyChangeListener
public void deepChange(java.beans.PropertyChangeListener aListener, java.beans.PropertyChangeEvent anEvent)
deepChange
in interface DeepChangeListener
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 java.lang.String getHover()
public void setHover(java.lang.String aString)
public boolean isLocked()
public void setLocked(boolean aValue)
public RMTimeline getTimeline()
public RMTimeline getTimeline(boolean create)
public void setTime(int aTime)
public java.lang.Object get(java.lang.String aName)
public java.lang.Object put(java.lang.String aName, java.lang.Object anObj)
public java.lang.Object get(java.lang.String aName, java.lang.Object aDefault)
public RMPath getPath()
public RMPath getPathInBounds()
public RMPath getMaskPath()
public RMShape getParent()
public void setParent(RMShape aShape)
public int getChildCount()
public RMShape getChild(int anIndex)
public java.util.List<RMShape> getChildren()
public final void addChild(RMShape aChild)
public void addChild(RMShape aChild, int anIndex)
public final void addChild(RMShape aChild, java.lang.Object theConstr)
public final void addChild(RMShape aChild, int anIndex, java.lang.Object theLayoutInfo)
public RMShape removeChild(int anIndex)
public int removeChild(RMShape aChild)
public int indexOf()
public int indexOfChild(RMShape aChild)
public RMShape getChildLast()
public RMShape[] getChildArray()
public void removeChildren()
public void removeFromParent()
public <T extends RMShape> T getParentWithClass(java.lang.Class<T> aClass)
public RMShape getChildWithName(java.lang.String aName)
public <T extends RMShape> T getChildWithClass(java.lang.Class<T> aClass)
public <T extends RMShape> java.util.List<T> getChildrenWithClass(java.lang.Class<T> aClass)
public <T extends RMShape> java.util.List<T> getChildrenWithClass(java.util.List aList, java.lang.Class<T> aClass)
public void offsetChildrenXY(float dx, float dy)
public RMShape getOriginal()
public RMShapeLayout getLayout()
public RMShapeLayout getLayout(boolean doCreate)
public void setLayout(RMShapeLayout aLayout)
public void revalidate()
public void validate()
public void doLayout()
public void layoutReset()
public java.lang.Object getLayoutInfo()
public void setLayoutInfo(java.lang.Object theLayoutInfo)
public java.lang.String getAutosizing()
public void setAutosizing(java.lang.String aValue)
public java.lang.String getAutosizingDefault()
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 boolean isRoot()
public int getAncestorCount()
public RMShape getAncestor(int anIndex)
public boolean isAncestor(RMShape aShape)
public boolean isDescendant(RMShape aShape)
public RMShape getAncestorInCommon(RMShape aShape)
public java.util.List<RMShape> getShapesToAncestor(RMShape aShape)
public java.util.List<RMShape> getShapesToDescendant(RMShape aShape)
public java.util.List<RMShape> 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 boolean isMinimumSizeSet()
public RMSize getMinimumSize()
public void setMinimumSize(RMSize aSize)
public RMSize getMinimumSizeProperty()
public boolean isMaximumSizeSet()
public RMSize getMaximumSize()
public void setMaximumSize(RMSize aSize)
public RMSize getMaximumSizeProperty()
public RMSize getPreferredSize()
public RMSize getPreferredSize(float aMaxWidth, float aMaxHeight)
public void setPreferredSize(RMSize aSize)
public RMSize getPreferredSizeProperty()
public float getBestWidth()
public float getBestHeight()
public RMSize getBestSize()
public RMSize getBestSize(float aMaxWidth, float aMaxHeight)
public void setBestSize()
public void setBestSize(float aMaxWidth, float aMaxHeight)
public void setBestHeight()
public RMShape divideShapeFromTop(float anAmount)
public RMShape divideShapeFromEdge(float amount, byte edge, RMShape newShape)
public RMShape createDivideShapeRemainder(byte anEdge)
public RMAnimator getAnimator()
public RMAnimator getAnimator(boolean create)
public RMAnimator getChildAnimator()
public RMAnimator getChildAnimator(boolean create)
public void addMouseListener(RMShapeMouseListener aListener)
public void removeMouseListener(RMShapeMouseListener aLsnr)
public boolean acceptsMouse()
public void mousePressed(RMShapeMouseEvent anEvent)
public void mouseDragged(RMShapeMouseEvent anEvent)
public void mouseReleased(RMShapeMouseEvent anEvent)
public void mouseClicked(RMShapeMouseEvent anEvent)
public void mouseEntered(RMShapeMouseEvent anEvent)
public void mouseMoved(RMShapeMouseEvent anEvent)
public void mouseExited(RMShapeMouseEvent anEvent)
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<RMShape> shapes)
public void sendShapesToBack(java.util.List<RMShape> shapes)
public java.util.List getChildrenWhoCauseWrap(RMShape aPeer)
public java.lang.String getDatasetKey()
public javi.data.Entity getDatasetEntity()
public java.util.List<java.lang.String> getPropertyNames()
public java.lang.String getPropertyNameMapped(java.lang.String aName)
public int getBindingCount()
public javi.ui.Binding getBinding(int anIndex)
public void addBinding(javi.ui.Binding aBinding)
public javi.ui.Binding removeBinding(int anIndex)
public javi.ui.Binding getBinding(java.lang.String aPropertyName)
public boolean removeBinding(java.lang.String aPropertyName)
public boolean isEnabled(javi.ui.UITypes.UIEventType aType)
public void setEnabled(javi.ui.UITypes.UIEventType aType, boolean aValue)
public RMShapeEventAdapter getEventAdapter(boolean doCreate)
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public RMShape clone()
clone
in class RMListenerList
public RMShape cloneDeep()
public void copyShape(RMShape aShape)
public ReportMill getReportMill()
public void setReportMill(ReportMill aReportMill)
public void setReportMillDeep(ReportMill aReportMill)
public void setReportMillBindings(ReportMill aReportMill)
public int getPartCount()
public RMShape getPart(int anIndex)
public int getPartDeepCount()
public RMShape getPartDeep(int anIndex, ReportMill aReportMill)
public RMShape createPartClone()
public void resolvePageReferences(ReportMill rm, java.lang.Object userInfo)
public void repaint()
public void repaint(RMShape aShape)
public boolean superSelectable()
public boolean acceptsChildren()
public boolean childrenSuperSelectImmediately()
public int page()
public int pageMax()
public int getPageBreak()
public int getPageBreakMax()
public int getPageBreakPage()
public int getPageBreakPageMax()
public void paint(java.awt.Graphics2D aGraphics)
public void paintShapeAll(java.awt.Graphics2D aGraphics)
public void paintShape(java.awt.Graphics2D aGraphics)
public void paintShapeChildren(java.awt.Graphics2D aGraphics)
public void paintShapeOver(java.awt.Graphics2D aGraphics)
public java.awt.Shape getClipShape()
public java.awt.Shape getChildClipShape()
public java.awt.Shape getVisbileBounds()
public java.awt.Shape getVisibleBounds(RMRect aRect)
public java.awt.Shape getVisibleBounds(RMShape anAncestor)
public java.awt.Shape getVisibleBounds(RMRect aRect, RMShape anAncestor)
public void animUpdate(java.beans.PropertyChangeEvent anEvent)
animUpdate
in class RMObject
public boolean isAnimProperty(java.lang.String aPropertyName)
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
public com.reportmill.archiver.RXElement toXMLShape(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
public void toXMLShapeLayout(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
public void toXMLShapeChildren(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
public java.lang.Object fromXMLShape(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
public void fromXMLShapeLayout(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
public void fromXMLShapeChildren(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)