public class InteractiveCenteredArrow extends BoundedShape
Modifier and Type | Class and Description |
---|---|
protected static class |
InteractiveCenteredArrow.InteractiveCenteredArrowLoader
A class to save and load InteractiveArrow in an XMLControl.
|
BoundedShape.BoundedShapeLoader
InteractiveShape.InteractiveShapeLoader
edgeColor, height, pixelSized, shape, shapeClass, theta, width, xoff, yoff
color, x, y
Constructor and Description |
---|
InteractiveCenteredArrow(double x,
double y,
double w,
double h) |
Modifier and Type | Method and Description |
---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the arrow.
|
static XML.ObjectLoader |
getLoader()
Gets the XML object loader for this class.
|
java.awt.Cursor |
getPreferredCursor()
Gets the cursor depending on the current hot spot.
|
boolean |
isInside(DrawingPanel panel,
int xpix,
int ypix)
Determines if the shape is enabled and if the given pixel coordinates are within the shape.
|
void |
setStrokeWidth(double width)
Sets the stroke for rendering fat arrows.
|
void |
setTheta(double theta)
Rotates the arrow without changing its length.
|
void |
setWidthHeight(double width,
double height)
Sets the origin, width (horizontal) and height (vertical) components of this arrow.
|
createBoundedArrow, createBoundedCenteredArrow, createBoundedCircle, createBoundedEllipse, createBoundedImage, createBoundedRectangle, createBoundedTriangle, findInteractive, isHeightDrag, isRotateDrag, isSelected, isWidthDrag, isXYDrag, setHeightDrag, setRotateDrag, setSelected, setWidthDrag, setXYDrag, toggleSelected, toString
contains, createArrow, createCenteredArrow, createCircle, createEllipse, createImage, createRectangle, createSquare, createTextLine, createTriangle, getHeight, getShape, getWidth, getXMax, getXMin, getYMax, getYMin, isMeasured, setHeight, setMarkerColor, setMeasured, setOffset, setPixelSized, setWidth, setX, setXY, setY, tranform, transform
getX, getY, isEnabled, setEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getX, getY, isEnabled, setEnabled, setX, setXY, setY
getXMax, getXMin, getYMax, getYMin, isMeasured
public InteractiveCenteredArrow(double x, double y, double w, double h)
public void setStrokeWidth(double width)
width
- doublepublic boolean isInside(DrawingPanel panel, int xpix, int ypix)
isInside
in class BoundedShape
panel
- DrawingPanelxpix
- intypix
- intpublic void setTheta(double theta)
setTheta
in class InteractiveShape
theta
- public void setWidthHeight(double width, double height)
width
- doubleheight
- doublepublic void draw(DrawingPanel panel, java.awt.Graphics g)
draw
in interface Drawable
draw
in class BoundedShape
panel
- the world in which the arrow is viewedg
- the graphics context upon which to drawpublic java.awt.Cursor getPreferredCursor()
getPreferredCursor
in interface Selectable
getPreferredCursor
in class BoundedShape
public static XML.ObjectLoader getLoader()