|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display.AbstractInteractive org.opensourcephysics.display.InteractiveShape org.opensourcephysics.display.BoundedShape org.opensourcephysics.display.InteractiveArrow
public class InteractiveArrow
Nested Class Summary | |
---|---|
protected static class |
InteractiveArrow.InteractiveArrowLoader
A class to save and load InteractiveArrow in an XMLControl. |
Nested classes/interfaces inherited from class org.opensourcephysics.display.BoundedShape |
---|
BoundedShape.BoundedShapeLoader |
Nested classes/interfaces inherited from class org.opensourcephysics.display.InteractiveShape |
---|
InteractiveShape.InteractiveShapeLoader |
Field Summary |
---|
Fields inherited from class org.opensourcephysics.display.InteractiveShape |
---|
edgeColor, height, pixelSized, shape, shapeClass, theta, width, xoff, yoff |
Fields inherited from class org.opensourcephysics.display.AbstractInteractive |
---|
color, x, y |
Constructor Summary | |
---|---|
InteractiveArrow(double x,
double y,
double w,
double h)
Constructor InteractiveArrow |
Method Summary | |
---|---|
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 |
setOffset(double xoffset,
double yoffset)
Drawing offset not supported. |
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. |
Methods inherited from class org.opensourcephysics.display.BoundedShape |
---|
createBoundedArrow, createBoundedCenteredArrow, createBoundedCircle, createBoundedEllipse, createBoundedImage, createBoundedRectangle, createBoundedTriangle, findInteractive, isHeightDrag, isRotateDrag, isSelected, isWidthDrag, isXYDrag, setHeightDrag, setRotateDrag, setSelected, setWidthDrag, setXYDrag, toggleSelected, toString |
Methods inherited from class org.opensourcephysics.display.InteractiveShape |
---|
contains, createArrow, createCenteredArrow, createCircle, createEllipse, createImage, createRectangle, createSquare, createTextLine, createTriangle, getHeight, getShape, getWidth, getXMax, getXMin, getYMax, getYMin, isMeasured, setHeight, setMarkerColor, setMeasured, setPixelSized, setWidth, setX, setXY, setY, tranform, transform |
Methods inherited from class org.opensourcephysics.display.AbstractInteractive |
---|
getX, getY, isEnabled, setEnabled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display.Interactive |
---|
getX, getY, isEnabled, setEnabled, setX, setXY, setY |
Methods inherited from interface org.opensourcephysics.display.Measurable |
---|
getXMax, getXMin, getYMax, getYMin, isMeasured |
Constructor Detail |
---|
public InteractiveArrow(double x, double y, double w, double h)
x
- y
- w
- h
- Method Detail |
---|
public void setStrokeWidth(double width)
width
- doublepublic void setOffset(double xoffset, double yoffset)
setOffset
in class InteractiveShape
xoffset
- doubleyoffset
- doublepublic boolean isInside(DrawingPanel panel, int xpix, int ypix)
isInside
in class BoundedShape
panel
- DrawingPanelxpix
- intypix
- int
public 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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |