Class ArrowShape
java.lang.Object
com.inductiveautomation.vision.api.client.components.shapes.ShapeDelegate
com.inductiveautomation.factorypmi.application.components.shapes.ArrowShape
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionArrowShape(Point2D origin, float length, float angle, float shaftWidth, float headLength, float headWidth) ArrowShape(Point2D origin, float length, float angle, float shaftWidth, float headLength, float headWidth, boolean doubleSided) -
Method Summary
Modifier and TypeMethodDescriptionbooleanalterShape(Rectangle2D newRect) Directly modify the shape's frame so that it fits tightly within the new framing rectangle.Convert this shape to a GeneralPathfloatgetAngle()floatfloatfloatfloatgetShape()The AWT shape this delegate producesbooleanbooleanSome shape delegates prefer to handle rotation themselves, instead of having the PathBasedVisionShape parent rotate their shape after the fact.booleanvoidvoidsetAngle(float angle) voidsetDoubleSided(boolean doubleSided) voidsetHeadLength(float headLength) voidsetHeadWidth(float headWidth) voidsetLength(float length) voidvoidsetShaftWidth(float shaftWidth) voidtranslateShape(double dX, double dY) Move the shape using the provided offsets.voidMethods inherited from class com.inductiveautomation.vision.api.client.components.shapes.ShapeDelegate
createArea, getBounds2D, getCenterpoint
-
Field Details
-
TOOL_KEY
- See Also:
-
-
Constructor Details
-
ArrowShape
public ArrowShape() -
ArrowShape
public ArrowShape(Point2D origin, float length, float angle, float shaftWidth, float headLength, float headWidth) -
ArrowShape
public ArrowShape(Point2D origin, float length, float angle, float shaftWidth, float headLength, float headWidth, boolean doubleSided)
-
-
Method Details
-
getToolKey
- Specified by:
getToolKeyin classShapeDelegate
-
getShape
Description copied from class:ShapeDelegateThe AWT shape this delegate produces- Specified by:
getShapein classShapeDelegate
-
isSymmetric
public boolean isSymmetric()- Specified by:
isSymmetricin 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
- Overrides:
rotatein classShapeDelegate
-
getTipPoint
-
updateShape
public void updateShape() -
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
-
alterShape
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.
-
convertToPath
Description copied from class:ShapeDelegateConvert this shape to a GeneralPath- Overrides:
convertToPathin classShapeDelegate
-
getOrigin
-
setOrigin
-
getLength
public float getLength() -
setLength
public void setLength(float length) -
getAngle
public float getAngle() -
setAngle
public void setAngle(float angle) -
getShaftWidth
public float getShaftWidth() -
setShaftWidth
public void setShaftWidth(float shaftWidth) -
getHeadLength
public float getHeadLength() -
setHeadLength
public void setHeadLength(float headLength) -
getHeadWidth
public float getHeadWidth() -
setHeadWidth
public void setHeadWidth(float headWidth) -
isDoubleSided
public boolean isDoubleSided() -
setDoubleSided
public void setDoubleSided(boolean doubleSided)
-