Drawable, Interactive, Measurable, Trackablepublic class TCoordAxes extends TShape
| Modifier and Type | Field | Description |
|---|---|---|
protected java.awt.geom.GeneralPath |
axes |
|
protected org.opensourcephysics.media.core.TCoordAxes.Origin |
origin |
|
protected boolean |
originEnabled |
|
protected java.awt.geom.GeneralPath |
originShape |
|
protected VideoPanel |
vidPanel |
|
protected java.awt.geom.GeneralPath |
xaxis |
|
protected boolean |
xaxisEnabled |
attachedTo, coordsEditTrigger, coordsVisibleInMouseBox, enabled, isAdjusting, screenPt, stepEditTrigger, support, trackEditTrigger, worldPt, xyStringBuilder| Constructor | Description |
|---|---|
TCoordAxes(VideoPanel panel) |
Constructs a TCoordAxes object for the specified video panel.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g) |
Overrides TShape draw method.
|
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix) |
Overrides TShape findInteractive method.
|
TPoint |
getOrigin() |
Gets the origin.
|
protected java.awt.Shape |
getShape(VideoPanel vidPanel) |
Overrides TShape getShape method.
|
boolean |
isOriginEnabled() |
Gets whether the origin responds to mouse hits.
|
boolean |
isXAxisEnabled() |
Gets whether the x-axis responds to mouse hits.
|
void |
setOriginEnabled(boolean enabled) |
Sets whether the origin responds to mouse hits.
|
void |
setStroke(java.awt.BasicStroke stroke) |
Overrides TShape setStroke method.
|
void |
setXAxisEnabled(boolean enabled) |
Sets whether the x-axis responds to mouse hits.
|
void |
setXY(double x,
double y) |
Overrides TPoint setXY method.
|
java.lang.String |
toString() |
Returns a String describing this object.
|
getX, getYfinalize, getClass, notify, notifyAll, wait, wait, waitclone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocationaddPropertyChangeListener, addPropertyChangeListener, angle, angle, attachTo, center, cos, cos, detach, equals, getFrameNumber, getScreenPosition, getWorldPosition, getXMax, getXMin, getYMax, getYMin, isAdjusting, isAttached, isCoordsEditTrigger, isEnabled, isMeasured, isStepEditTrigger, isTrackEditTrigger, removePropertyChangeListener, removePropertyChangeListener, setAdjusting, setCoordsEditTrigger, setEnabled, setLocation, setPositionOnLine, setScreenPosition, setScreenPosition, setStepEditTrigger, setTrackEditTrigger, setWorldPosition, setX, setY, showCoordinates, sin, sin, translategetBounds, getColor, getStroke, isVisible, setColor, setHitRectCenter, setVisibleprotected VideoPanel vidPanel
protected java.awt.geom.GeneralPath axes
protected org.opensourcephysics.media.core.TCoordAxes.Origin origin
protected boolean originEnabled
protected boolean xaxisEnabled
protected java.awt.geom.GeneralPath originShape
protected java.awt.geom.GeneralPath xaxis
public TCoordAxes(VideoPanel panel)
panel - the video panelpublic TPoint getOrigin()
public void draw(DrawingPanel panel, java.awt.Graphics g)
public void setXY(double x,
double y)
setXY in interface InteractivesetXY in class TPointx - the x positiony - the y positionpublic void setStroke(java.awt.BasicStroke stroke)
public void setOriginEnabled(boolean enabled)
enabled - true if origin responds to mouse hits.public boolean isOriginEnabled()
true if the origin responds to mouse hits.public void setXAxisEnabled(boolean enabled)
enabled - true if x-axis responds to mouse hits.public boolean isXAxisEnabled()
true if the x-axis responds to mouse hits.public Interactive findInteractive(DrawingPanel panel, int xpix, int ypix)
findInteractive in interface InteractivefindInteractive in class TShapepanel - the drawing panelxpix - the x pixel position on the panelypix - the y pixel position on the panelpublic java.lang.String toString()
protected java.awt.Shape getShape(VideoPanel vidPanel)