Package com.inductiveautomation.rm.shape
Class RMShapeUtils
- java.lang.Object
-
- com.inductiveautomation.rm.shape.RMShapeUtils
-
public class RMShapeUtils extends java.lang.Object
Some shape utility methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RMShapeUtils.HoverTimer
A Timer subclass.
-
Constructor Summary
Constructors Constructor Description RMShapeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RMRect
getBoundsOfChildren(RMShape aShape, java.util.List<? extends RMShape> aList)
Returns the bounds of a given subset of this shape's children.static RMPath
getCombinedPath(java.util.List<RMShape> theShapes)
Returns the combined path from given shapes.static RMPolygonShape
getCombinedPathsShape(java.util.List<RMShape> theShapes)
Returns a polygon shape by combining paths of given shapes.static RMShape
getHoverShape()
Returns the hover shape.static RMShapeUtils.HoverTimer
getHoverTimer()
Returns the shared hover timer.static RMShapeUtils.HoverTimer
getHoverTimer(RMShapeMouseEvent anEvent)
Returns the hover timer, creating it if missing.static RMPath
getSubtractedPath(java.util.List<RMShape> theShapes, int anInset)
Returns the combined path from given shapes.static RMPolygonShape
getSubtractedPathsShape(java.util.List<RMShape> theShapes, int anInset)
Returns a polygon shape by combining paths of given shapes.static RMParentShape
groupShapes(java.util.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
repaint(java.util.List<? extends RMShape> theShapes)
Convenience to mark a whole list of shapes for repaint.static void
setHoverTimer(RMShapeUtils.HoverTimer aTimer)
Sets the hover timer.
-
-
-
Method Detail
-
repaint
public static void repaint(java.util.List<? extends RMShape> theShapes)
Convenience to mark a whole list of shapes for repaint.
-
getBoundsOfChildren
public static RMRect getBoundsOfChildren(RMShape aShape, java.util.List<? extends RMShape> aList)
Returns the bounds of a given subset of this shape's children.
-
groupShapes
public static RMParentShape groupShapes(java.util.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
public static RMPolygonShape getCombinedPathsShape(java.util.List<RMShape> theShapes)
Returns a polygon shape by combining paths of given shapes.
-
getCombinedPath
public static RMPath getCombinedPath(java.util.List<RMShape> theShapes)
Returns the combined path from given shapes.
-
getSubtractedPathsShape
public static RMPolygonShape getSubtractedPathsShape(java.util.List<RMShape> theShapes, int anInset)
Returns a polygon shape by combining paths of given shapes.
-
getSubtractedPath
public static RMPath getSubtractedPath(java.util.List<RMShape> theShapes, int anInset)
Returns the combined path from given shapes.
-
getHoverTimer
public static RMShapeUtils.HoverTimer getHoverTimer()
Returns the shared hover timer.
-
setHoverTimer
public static void setHoverTimer(RMShapeUtils.HoverTimer aTimer)
Sets the hover timer.
-
getHoverTimer
public static RMShapeUtils.HoverTimer getHoverTimer(RMShapeMouseEvent anEvent)
Returns the hover timer, creating it if missing.
-
getHoverShape
public static RMShape getHoverShape()
Returns the hover shape.
-
-