Class PathShape
- java.lang.Object
-
- com.inductiveautomation.vision.api.client.components.shapes.ShapeDelegate
-
- com.inductiveautomation.factorypmi.application.components.shapes.PathShape
-
public class PathShape extends ShapeDelegate
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTOOL_KEY
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanalterShape(java.awt.geom.Rectangle2D newRect)Directly modify the shape's frame so that it fits tightly within the new framing rectangle.java.awt.geom.GeneralPathconvertToPath()Convert this shape to a GeneralPathjava.awt.geom.GeneralPathgetPath()java.awt.ShapegetShape()The AWT shape this delegate producesjava.lang.StringgetToolKey()booleanisRotatable()Some shape delegates prefer to handle rotation themselves, instead of having the PathBasedVisionShape parent rotate their shape after the fact.booleanisSymmetric()voidrotate(double angle, java.awt.geom.Point2D anchor)voidsetPath(java.awt.geom.GeneralPath path)voidtransform(java.awt.geom.AffineTransform transform)voidtranslateShape(double dX, double dY)Move the shape using the provided offsets.-
Methods inherited from class com.inductiveautomation.vision.api.client.components.shapes.ShapeDelegate
createArea, getBounds2D, getCenterpoint
-
-
-
-
Field Detail
-
TOOL_KEY
public static final java.lang.String TOOL_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getToolKey
public java.lang.String getToolKey()
- Specified by:
getToolKeyin classShapeDelegate
-
getShape
public java.awt.Shape getShape()
Description copied from class:ShapeDelegateThe AWT shape this delegate produces- Specified by:
getShapein classShapeDelegate
-
getPath
public java.awt.geom.GeneralPath getPath()
-
setPath
public void setPath(java.awt.geom.GeneralPath path)
-
transform
public void transform(java.awt.geom.AffineTransform transform)
-
isSymmetric
public boolean isSymmetric()
- Specified by:
isSymmetricin classShapeDelegate
-
alterShape
public boolean alterShape(java.awt.geom.Rectangle2D newRect)
Description copied from class:ShapeDelegateDirectly modify the shape's frame so that it fits tightly within the new framing rectangle.- Specified by:
alterShapein classShapeDelegate- Parameters:
newRect- The new bounding rectangle for the shape.- Returns:
- false if the shape was unable to alter itself into the given rectangle.
-
translateShape
public void translateShape(double dX, double dY)Description copied from class:ShapeDelegateMove the shape using the provided offsets. Default implementation calls alterShape.- Overrides:
translateShapein classShapeDelegate
-
isRotatable
public boolean isRotatable()
Description copied from class:ShapeDelegateSome shape delegates prefer to handle rotation themselves, instead of having the PathBasedVisionShape parent rotate their shape after the fact. Delegates that do this should return true from this method, and then handle the rotate method appropriately. Note that all rotations must go through the PathBasedVisionShape so that it can update the angle property.- Overrides:
isRotatablein classShapeDelegate
-
rotate
public void rotate(double angle, java.awt.geom.Point2D anchor)- Overrides:
rotatein classShapeDelegate
-
convertToPath
public java.awt.geom.GeneralPath convertToPath()
Description copied from class:ShapeDelegateConvert this shape to a GeneralPath- Overrides:
convertToPathin classShapeDelegate
-
-