Package com.inductiveautomation.rm.shape
Class RMAnimPathShape
- All Implemented Interfaces:
Archivable,DeepChangeListener,RMPropertyChanger,RMTypes,PropertyChangeListener,Cloneable,EventListener
A shape that can orient its children along a bezier path.
By being an RMPolygon subclass, this class inherits all the path editing behavior of the polygon. Unlike the base polygon, however, this shape always has 1 or more children. The children shapes will be positioned and oriented at _distance along the path.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA shape subclass that adds the ability to be rotated about an arbitrary point.Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypes
RMTypes.Align, RMTypes.AlignX, RMTypes.AlignY -
Field Summary
Fields inherited from class com.inductiveautomation.rm.shape.RMShape
BINDING_PROP_NAME, STROKE_BORDER, STROKE_DOUBLE, STROKE_HIDDEN, STROKE_SHAPE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new RMAnimPathShape.RMAnimPathShape(RMShape aShape) Creates an animpath shape from another shape. -
Method Summary
Modifier and TypeMethodDescriptionvoidOverride add child to handle animated child shape specialclone()Standard clone implementation.booleanOverridden to just reflect bounds of anim child.protected voidfromXMLShape(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns the animated child shape.Overridden to just reflect bounds of anim child.Overridden to just reflect bounds of anim child.intReturns the child origin.floatReturns distance along the path where children are positioned.booleanReturns whether the children will have their rotation adjusted as they move along the path.RMLine[]Builds the segment list and caches itfloatReturns the actual total arclength of the curve.voidpaintShape(RMShapePainter aPntr) Overridden to skip painting at preview time and to paint stroke (anim path) under child.voidpaintShapeOver(RMShapePainter aPntr) Overridden to skip painting stroke on top.voidCalled by the tool when the path has been changed.voidPositionChildrenvoidsetAnimChild(RMShape aChild) Sets the shape which will be positioned along the pathvoidsetChildOrigin(int aValue) Sets child origin.voidsetDistance(float aValue) Sets distance along path to position children.voidsetHeight(double aValue) Overridden to mark the path dirty.voidOverridden to mark the path dirtyvoidsetPreservesOrientation(boolean aValue) Sets whether the children's rotation should get adjusted as they move along the path.voidsetWidth(double aValue) Overridden to mark the path dirty.protected RXElementtoXMLShape(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.shape.RMPolygonShape
getPath, getPathTransform, resetPath, superSelectableMethods inherited from class com.inductiveautomation.rm.shape.RMParentShape
addChild, addChild, addChild, addLayoutChild, bringShapesToFront, cloneDeep, computePrefHeight, computePrefWidth, divideShapeFromTop, fromXML, fromXMLChildren, getBoundsOfChildren, getChild, getChildArray, getChildContaining, getChildCount, getChildLast, getChildren, getChildrenIntersecting, getChildrenWithClass, getChildrenWithClass, getChildWithClass, getChildWithName, getLayout, getNeedsLayout, getSourceURL, indexOfChild, isHittable, isShowing, isSourceURLSet, layout, layoutChildren, relayout, removeChild, removeChild, removeChildren, removeLayoutChild, rpgAll, rpgChildren, sendShapesToBack, setLayout, setNeedsLayout, setSourceURL, toXML, toXMLChildrenMethods inherited from class com.inductiveautomation.rm.shape.RMShape
acceptsChildren, acceptsMouse, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, childrenSuperSelectImmediately, convertedPointFromShape, convertedPointToShape, convertedRectFromShape, convertedRectToShape, convertedVectorFromShape, convertedVectorToShape, convertFromShape, convertPathFromShape, convertPathToShape, convertPointFromShape, convertPointToShape, convertRectFromShape, convertRectToShape, convertToShape, convertVectorFromShape, convertVectorToShape, copyShape, createDivideShapeRemainder, deepChange, divideShapeFromEdge, get, get, getAlignment, getAlignmentX, getAlignmentY, getAncestor, getAncestorCount, getAncestorInCommon, getAnimator, getAnimator, getAutosizing, getAutosizingDefault, getBestHeight, getBestHeight, getBestWidth, getBestWidth, getBinding, getBinding, getBindingCount, getBindings, getBounds, getBoundsInside, getChildAnimator, getChildAnimator, getChildClipShape, getClipShape, getColor, getDashArrayString, getDashPhase, getDatasetEntity, getDatasetKey, getDisplayedFill, getDisplayedStroke, getDocument, getEffect, getEventAdapter, getFill, getFont, getFormat, getFrame, getFrameHeight, getFrameMaxX, getFrameMaxY, getFrameWidth, getFrameX, getFrameXY, getFrameY, getHeight, getHover, getLayoutInfo, getMaskPath, getMaxX, getMaxY, getMinHeight, getMinHeight, getMinWidth, getMinWidth, getName, getOpacity, getOpacityDeep, getOutline, getPageBreak, getPageBreakMax, getPageBreakPage, getPageBreakPageMax, getPageShape, getParent, getParent, getPathInBounds, getPrefHeight, getPrefHeight, getPrefWidth, getPrefWidth, getPropertyNameMapped, getPropertyNames, getPropertyNames, getRoll, getRootShape, getRSS, getScaleX, getScaleY, getShapesToAncestor, getShapesToDescendant, getShapesToShape, getSize, getSkewX, getSkewY, getStroke, getStrokeColor, getStrokeOnTop, getStrokeStyle, getStrokeWidth, getTextColor, getTimeline, getTimeline, getTransform, getTransformFromShape, getTransformInverse, getTransformToShape, getUndoer, getURL, getVisbileBounds, getVisibleBounds, getVisibleBounds, getVisibleBounds, getWidth, getX, getXY, getXYP, getY, height, indexOf, intersects, isAncestor, isAnimProperty, isDeletable, isDescendant, isEditing, isEnabled, isFontSet, isHittable, isLocked, isMinHeightSet, isMinWidthSet, isPrefHeightSet, isPrefWidthSet, isRoot, isRSS, isShowing, isUnderlined, isUseFill, isUseStroke, isViewing, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, offsetXY, page, pageMax, paint, paintShapeAll, paintShapeChildren, propertyChange, put, removeBinding, removeBinding, removeDeepChangeListener, removeFromParent, removeMouseListener, repaint, repaint, resolvePageReferences, rpgBindings, rpgShape, setAlignment, setAlignmentX, setAlignmentY, setAutosizing, setBestHeight, setBestSize, setBounds, setBounds, setColor, setDashArrayString, setDashPhase, setEffect, setEnabled, setFill, setFont, setFormat, setFrame, setFrame, setFrameSize, setFrameX, setFrameXY, setFrameXY, setFrameY, setHover, setLayoutInfo, setLocked, setMinHeight, setMinSize, setMinWidth, setName, setOpacity, setOutline, setParent, setPrefHeight, setPrefWidth, setRoll, setScaleX, setScaleXY, setScaleY, setShowing, setSize, setSize, setSkewX, setSkewXY, setSkewY, setStroke, setStrokeColor, setStrokeStyle, setStrokeWidth, setTextColor, setTime, setTimeline, setUnderlined, setURL, setUseFill, setUseStroke, setVisible, setX, setXY, setXY, setXYP, setY, shapeHidden, shapeShown, toString, undoerDisable, undoerEnable, undoerSetUndoTitle, width, x, yMethods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChangeMethods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Constructor Details
-
RMAnimPathShape
public RMAnimPathShape()Creates a new RMAnimPathShape. -
RMAnimPathShape
Creates an animpath shape from another shape.
-
-
Method Details
-
getAnimChild
Returns the animated child shape. -
setAnimChild
Sets the shape which will be positioned along the path -
addChild
Override add child to handle animated child shape special- Overrides:
addChildin classRMParentShape
-
getBoundsMarked
Overridden to just reflect bounds of anim child.- Overrides:
getBoundsMarkedin classRMShape
-
getBoundsMarkedDeep
Overridden to just reflect bounds of anim child.- Overrides:
getBoundsMarkedDeepin classRMShape
-
contains
Overridden to just reflect bounds of anim child. -
clone
Standard clone implementation.- Overrides:
clonein classRMPolygonShape
-
paintShape
Overridden to skip painting at preview time and to paint stroke (anim path) under child.- Overrides:
paintShapein classRMPolygonShape
-
paintShapeOver
Overridden to skip painting stroke on top.- Overrides:
paintShapeOverin classRMShape
-
getDistance
public float getDistance()Returns distance along the path where children are positioned.- See Also:
-
setDistance
public void setDistance(float aValue) Sets distance along path to position children. Distance is in the range of [0-1] with 0 representing the start of the path and 1 the end. -
getTotalLength
public float getTotalLength()Returns the actual total arclength of the curve. Used internally by the AnimPath to convert a distance of 0 through 1 to an actual point on the path. -
getPreservesOrientation
public boolean getPreservesOrientation()Returns whether the children will have their rotation adjusted as they move along the path.- See Also:
-
setPreservesOrientation
public void setPreservesOrientation(boolean aValue) Sets whether the children's rotation should get adjusted as they move along the path. If flag is true, the original rotation of the shape is 'preserved' relative to the tangent to the path at the current point. -
getChildOrigin
public int getChildOrigin()Returns the child origin. -
setChildOrigin
public void setChildOrigin(int aValue) Sets child origin. -
pathChanged
public void pathChanged()Called by the tool when the path has been changed. -
setWidth
public void setWidth(double aValue) Overridden to mark the path dirty.- Overrides:
setWidthin classRMParentShape
-
setHeight
public void setHeight(double aValue) Overridden to mark the path dirty.- Overrides:
setHeightin classRMParentShape
-
setPath
Overridden to mark the path dirty- Overrides:
setPathin classRMPolygonShape
-
getSegments
Builds the segment list and caches it -
positionChildren
public void positionChildren()PositionChildren -
toXMLShape
XML archival.- Overrides:
toXMLShapein classRMPolygonShape
-
fromXMLShape
XML unarchival.- Overrides:
fromXMLShapein classRMPolygonShape
-