Package com.inductiveautomation.rm.shape
Class RMParentShape
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.shape.RMShape
com.inductiveautomation.rm.shape.RMParentShape
- All Implemented Interfaces:
Archivable
,DeepChangeListener
,RMPropertyChanger
,RMTypes
,PropertyChangeListener
,Cloneable
,EventListener
- Direct Known Subclasses:
JComponentShape
,ReportOwner.ShapeList
,RMAnimPathShape.RMAnimPathGroup
,RMCrossTab
,RMCrossTabFrame
,RMDocument
,RMFlowShape
,RMGraph
,RMGraphRPGBar.BarGraphShape2D
,RMLabel
,RMLabels
,RMLineShape
,RMNestedDoc
,RMPage
,RMPolygonShape
,RMScene3D
,RMSpringShape
,RMSwitchShape
,RMTable
,RMTableGroup
,RMTableRowRPG
,RMTableRPG
,RMViewerShape
A shape implementation that can have children.
-
Nested Class Summary
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Adds the given child to the end of this shape's children list.void
Adds the given child to this shape's children list at the given index.final void
Adds the given child to this shape's children list at the given index.final void
Adds the given child with the given constraints.protected void
addLayoutChild
(RMShape aShape) Adds a child to layout manager.void
bringShapesToFront
(List<RMShape> shapes) Moves the subset of children in the given list to the front of the children list.clone()
Standard implementation of Object clone.Clones all attributes of this shape with complete clones of its children as well.protected double
computePrefHeight
(double aWidth) Returns the shape preferred height.protected double
computePrefWidth
(double aHeight) Returns the shape preferred width.divideShapeFromTop
(double anAmount) Divides the shape by a given amount from the top.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival generic - break fromXML into fromXMLShape and fromXMLShapeChildren.protected void
fromXMLChildren
(RXArchiver anArchiver, RXElement anElement) XML unarchival for shape children.protected void
fromXMLShape
(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns bounds of all children of this shape, which can sometimes differ from this shapes bounds.getChild
(int anIndex) Returns the child at the given index.RMShape[]
Returns a copy of the children as an array.getChildContaining
(RMPoint aPoint) Returns the first (top) shape hit by the point given in this shape's coords.int
Returns the number of children associated with this shape.Returns the last child of this shape.Returns the list of children associated with this shape.getChildrenIntersecting
(RMPath aPath) Returns the child shapes hit by the path given in this shape's coords.getChildrenWithClass
(Class<T> aClass) Returns all the shapes in the shape hierarchy of a particular class.getChildrenWithClass
(List aList, Class<T> aClass) Adds all the shapes in the shape hierarchy of a particular class to the list.<T> T
getChildWithClass
(Class<T> aClass) Returns first child found with the given class (called recursively on children if not found at current level).getChildWithName
(String aName) Returns first child found with the given name (called recursively on children if not found at current level).Returns the layout for this shape.boolean
Returns whether children need to be laid out.Returns the Source URL.int
indexOfChild
(RMShape aChild) Returns the index of the given child in this shape's children list.protected boolean
isHittable
(RMShape aChild) Returns whether given child shape is hittable.protected boolean
Returns whether given child shape is showing in this parent.boolean
Returns whether Source URL is set.void
layout()
Does immediate layout of this shape and children (if invalid).protected void
Called to reposition/resize children.void
relayout()
Sets shape layout to invalid and requests deferred layout.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
Removes all children from this shape (in reverse order).protected void
removeLayoutChild
(RMShape aShape) Removes a child from layout manager.rpgAll
(ReportOwner anRptOwner, RMShape aParent) Generate report with report owner.protected RMShape
rpgChildren
(ReportOwner anRptOwner, RMParentShape aParent) Generate report with report owner.void
sendShapesToBack
(List<RMShape> shapes) Moves the subset of children in the given list to the back of the children list.void
setHeight
(double aValue) Override to trigger layout.void
setLayout
(RMShapeLayout aLayout) Sets the layout for this shape.void
setNeedsLayout
(boolean aValue) Sets whether children need to be laid out.void
setSourceURL
(WebURL aURL) Sets the Source URL.void
setWidth
(double aValue) Override to trigger layout.toXML
(RXArchiver anArchiver) XML Archival generic - break toXML into toXMLShape and toXMLShapeChildren.protected void
toXMLChildren
(RXArchiver anArchiver, RXElement anElement) XML archival of children.protected RXElement
toXMLShape
(RXArchiver anArchiver) XML Archival of basic shape.Methods inherited from class com.inductiveautomation.rm.shape.RMShape
acceptsChildren, acceptsMouse, addBinding, addBinding, addDeepChangeListener, addMouseListener, animUpdate, bounds, childrenSuperSelectImmediately, contains, 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, getBoundsMarked, getBoundsMarkedDeep, 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, getPath, 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, paintShape, paintShapeAll, paintShapeChildren, paintShapeOver, 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, superSelectable, toString, undoerDisable, undoerEnable, undoerSetUndoTitle, width, x, y
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Constructor Details
-
RMParentShape
public RMParentShape()
-
-
Method Details
-
getChildCount
public int getChildCount()Returns the number of children associated with this shape.- Overrides:
getChildCount
in classRMShape
-
getChild
Returns the child at the given index. -
getChildren
Returns the list of children associated with this shape.- Overrides:
getChildren
in classRMShape
-
addChild
Adds the given child to the end of this shape's children list. -
addChild
Adds the given child to this shape's children list at the given index. -
addChild
Adds the given child with the given constraints. -
addChild
Adds the given child to this shape's children list at the given index. -
removeChild
Remove's the child at the given index from this shape's children list. -
removeChild
Removes the given child from this shape's children list. -
indexOfChild
Returns the index of the given child in this shape's children list. -
getChildLast
Returns the last child of this shape. -
getChildArray
Returns a copy of the children as an array. -
removeChildren
public void removeChildren()Removes all children from this shape (in reverse order). -
getBoundsOfChildren
Returns bounds of all children of this shape, which can sometimes differ from this shapes bounds. -
getChildWithName
Returns first child found with the given name (called recursively on children if not found at current level). -
getChildWithClass
Returns first child found with the given class (called recursively on children if not found at current level). -
getChildrenWithClass
Returns all the shapes in the shape hierarchy of a particular class. -
getChildrenWithClass
Adds all the shapes in the shape hierarchy of a particular class to the list. Returns the list as a convenience. -
getLayout
Returns the layout for this shape. -
setLayout
Sets the layout for this shape. -
isSourceURLSet
public boolean isSourceURLSet()Returns whether Source URL is set. -
getSourceURL
Returns the Source URL. -
setSourceURL
Sets the Source URL. -
getNeedsLayout
public boolean getNeedsLayout()Returns whether children need to be laid out. -
setNeedsLayout
public void setNeedsLayout(boolean aValue) Sets whether children need to be laid out. -
relayout
public void relayout()Sets shape layout to invalid and requests deferred layout. -
layout
public void layout()Does immediate layout of this shape and children (if invalid). -
layoutChildren
protected void layoutChildren()Called to reposition/resize children. -
addLayoutChild
Adds a child to layout manager. -
removeLayoutChild
Removes a child from layout manager. -
computePrefWidth
protected double computePrefWidth(double aHeight) Returns the shape preferred width.- Overrides:
computePrefWidth
in classRMShape
-
computePrefHeight
protected double computePrefHeight(double aWidth) Returns the shape preferred height.- Overrides:
computePrefHeight
in classRMShape
-
isShowing
Returns whether given child shape is showing in this parent. -
isHittable
Returns whether given child shape is hittable. -
setWidth
public void setWidth(double aValue) Override to trigger layout. -
setHeight
public void setHeight(double aValue) Override to trigger layout. -
getChildContaining
Returns the first (top) shape hit by the point given in this shape's coords. -
getChildrenIntersecting
Returns the child shapes hit by the path given in this shape's coords. -
divideShapeFromTop
Divides the shape by a given amount from the top. Returns a clone of the given shape with bounds set to the remainder. Divides children among the two shapes (recursively calling divide shape for those straddling).- Overrides:
divideShapeFromTop
in classRMShape
-
bringShapesToFront
Moves the subset of children in the given list to the front of the children list. -
sendShapesToBack
Moves the subset of children in the given list to the back of the children list. -
rpgAll
Generate report with report owner. -
rpgChildren
Generate report with report owner. -
clone
Standard implementation of Object clone. Null's out shape's parent and children. -
cloneDeep
Clones all attributes of this shape with complete clones of its children as well. -
toXML
XML Archival generic - break toXML into toXMLShape and toXMLShapeChildren.- Specified by:
toXML
in interfaceArchivable
- Overrides:
toXML
in classRMShape
-
toXMLShape
XML Archival of basic shape. -
toXMLChildren
XML archival of children. -
fromXML
XML unarchival generic - break fromXML into fromXMLShape and fromXMLShapeChildren.- Specified by:
fromXML
in interfaceArchivable
- Overrides:
fromXML
in classRMShape
-
fromXMLShape
XML unarchival. -
fromXMLChildren
XML unarchival for shape children.
-