Package com.inductiveautomation.rm.shape
Class RMShapeUtils
java.lang.Object
com.inductiveautomation.rm.shape.RMShapeUtils
Some shape utility methods.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RMRect
getBoundsOfChildren
(RMShape aShape, List<? extends RMShape> aList) Returns the bounds of a given subset of this shape's children.static RMPath
getCombinedPath
(List<RMShape> theShapes) Returns the combined path from given shapes.static RMPolygonShape
getCombinedPathsShape
(List<RMShape> theShapes) Returns a polygon shape by combining paths of given shapes.static RMShape
Returns the hover shape.static RMShapeUtils.HoverTimer
Returns the shared hover timer.static RMShapeUtils.HoverTimer
getHoverTimer
(RMShapeMouseEvent anEvent) Returns the hover timer, creating it if missing.static RMPath
getSubtractedPath
(List<RMShape> theShapes, int anInset) Returns the combined path from given shapes.static RMPolygonShape
getSubtractedPathsShape
(List<RMShape> theShapes, int anInset) Returns a polygon shape by combining paths of given shapes.static RMParentShape
groupShapes
(List<? extends RMShape> theShapes, RMParentShape groupShape) Adds the subset of children in given list into a given group shape, which is then added back to receiver.static void
Convenience to mark a whole list of shapes for repaint.static void
resizeToFit
(RMShape boundingShape, RMShape targetShape) For a givenboundingShape
andtargetShape
, resize thetargetShape
to fit within theboundingShape
.static void
setHoverTimer
(RMShapeUtils.HoverTimer aTimer) Sets the hover timer.static void
setRelativeLocation
(RMShape boundingShape, RMPoint point, RMShape targetShape) For a giveboundingShape
,point
, andtargetShape
, set the location of the shape to be centered around the point, or centered on the page if the image covers 75% of the page or more.
-
Constructor Details
-
RMShapeUtils
public RMShapeUtils()
-
-
Method Details
-
repaint
Convenience to mark a whole list of shapes for repaint. -
getBoundsOfChildren
Returns the bounds of a given subset of this shape's children. -
groupShapes
public static RMParentShape groupShapes(List<? extends RMShape> theShapes, RMParentShape groupShape) Adds the subset of children in given list into a given group shape, which is then added back to receiver. -
getCombinedPathsShape
Returns a polygon shape by combining paths of given shapes. -
getCombinedPath
Returns the combined path from given shapes. -
getSubtractedPathsShape
Returns a polygon shape by combining paths of given shapes. -
getSubtractedPath
Returns the combined path from given shapes. -
getHoverTimer
Returns the shared hover timer. -
setHoverTimer
Sets the hover timer. -
getHoverTimer
Returns the hover timer, creating it if missing. -
getHoverShape
Returns the hover shape. -
resizeToFit
For a givenboundingShape
andtargetShape
, resize thetargetShape
to fit within theboundingShape
. -
setRelativeLocation
For a giveboundingShape
,point
, andtargetShape
, set the location of the shape to be centered around the point, or centered on the page if the image covers 75% of the page or more.
-