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, visible
coordinateStrBuilder, 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, setVisible
addPropertyChangeListener, 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, translate
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation
finalize, getClass, notify, notifyAll, wait, wait, wait
getX, getY
protected 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 Interactive
setXY
in class TPoint
x
- 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 Interactive
findInteractive
in class TShape
panel
- 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)