public class ArrowShape extends ShapeDelegate
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TOOL_KEY |
| Constructor and Description |
|---|
ArrowShape() |
ArrowShape(java.awt.geom.Point2D origin,
float length,
float angle,
float shaftWidth,
float headLength,
float headWidth) |
ArrowShape(java.awt.geom.Point2D origin,
float length,
float angle,
float shaftWidth,
float headLength,
float headWidth,
boolean doubleSided) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
alterShape(java.awt.geom.Rectangle2D newRect)
Directly modify the shape's frame so that it fits tightly within the new framing rectangle.
|
java.awt.geom.GeneralPath |
convertToPath()
Convert this shape to a GeneralPath
|
float |
getAngle() |
float |
getHeadLength() |
float |
getHeadWidth() |
float |
getLength() |
java.awt.geom.Point2D |
getOrigin() |
float |
getShaftWidth() |
java.awt.Shape |
getShape()
The AWT shape this delegate produces
|
java.awt.geom.Point2D |
getTipPoint() |
java.lang.String |
getToolKey() |
boolean |
isDoubleSided() |
boolean |
isRotatable()
Some shape delegates prefer to handle rotation themselves, instead of having the PathBasedVisionShape parent
rotate their shape after the fact.
|
boolean |
isSymmetric() |
void |
rotate(double angle,
java.awt.geom.Point2D anchor) |
void |
setAngle(float angle) |
void |
setDoubleSided(boolean doubleSided) |
void |
setHeadLength(float headLength) |
void |
setHeadWidth(float headWidth) |
void |
setLength(float length) |
void |
setOrigin(java.awt.geom.Point2D origin) |
void |
setShaftWidth(float shaftWidth) |
void |
translateShape(double dX,
double dY)
Move the shape using the provided offsets.
|
void |
updateShape() |
createArea, getBounds2D, getCenterpointpublic static final java.lang.String TOOL_KEY
public ArrowShape()
public ArrowShape(java.awt.geom.Point2D origin,
float length,
float angle,
float shaftWidth,
float headLength,
float headWidth)
public ArrowShape(java.awt.geom.Point2D origin,
float length,
float angle,
float shaftWidth,
float headLength,
float headWidth,
boolean doubleSided)
public java.lang.String getToolKey()
getToolKey in class ShapeDelegatepublic java.awt.Shape getShape()
ShapeDelegategetShape in class ShapeDelegatepublic boolean isSymmetric()
isSymmetric in class ShapeDelegatepublic boolean isRotatable()
ShapeDelegateisRotatable in class ShapeDelegatepublic void rotate(double angle,
java.awt.geom.Point2D anchor)
rotate in class ShapeDelegatepublic java.awt.geom.Point2D getTipPoint()
public void updateShape()
public void translateShape(double dX,
double dY)
ShapeDelegatetranslateShape in class ShapeDelegatepublic boolean alterShape(java.awt.geom.Rectangle2D newRect)
ShapeDelegatealterShape in class ShapeDelegatenewRect - The new bounding rectangle for the shape.public java.awt.geom.GeneralPath convertToPath()
ShapeDelegateconvertToPath in class ShapeDelegatepublic java.awt.geom.Point2D getOrigin()
public void setOrigin(java.awt.geom.Point2D origin)
public float getLength()
public void setLength(float length)
public float getAngle()
public void setAngle(float angle)
public float getShaftWidth()
public void setShaftWidth(float shaftWidth)
public float getHeadLength()
public void setHeadLength(float headLength)
public float getHeadWidth()
public void setHeadWidth(float headWidth)
public boolean isDoubleSided()
public void setDoubleSided(boolean doubleSided)