public class TCoordAxes extends TShape
| Modifier and Type | Field and 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 |
color, fillShape, hitRect, stroke, visiblecoordinateStrBuilder, coordsEditTrigger, coordsVisibleInMouseBox, enabled, screenPt, stepEditTrigger, support, trackEditTrigger, worldPt| Constructor and Description |
|---|
TCoordAxes(VideoPanel panel)
Constructs a TCoordAxes object for the specified video panel.
|
| Modifier and Type | Method and 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.
|
getBounds, getColor, getStroke, isVisible, setColor, setHitRectCenter, setVisibleaddPropertyChangeListener, addPropertyChangeListener, angle, angle, center, cos, cos, equals, getFrameNumber, getScreenPosition, getWorldPosition, getXMax, getXMin, getYMax, getYMin, isCoordsEditTrigger, isEnabled, isMeasured, isStepEditTrigger, isTrackEditTrigger, removePropertyChangeListener, removePropertyChangeListener, setCoordsEditTrigger, setEnabled, setLocation, setPositionOnLine, setScreenPosition, setScreenPosition, setStepEditTrigger, setTrackEditTrigger, setX, setY, showCoordinates, sin, sin, translateclone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocationfinalize, getClass, notify, notifyAll, wait, wait, waitgetX, getYprotected 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)