|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.geom.Point2D java.awt.geom.Point2D.Double org.opensourcephysics.media.core.TPoint org.opensourcephysics.media.core.TShape org.opensourcephysics.media.core.TCoordAxes
public class TCoordAxes
This draws the worldspace origin and axes of an image coordinate system.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.geom.Point2D |
---|
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
Field Summary | |
---|---|
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
|
Fields inherited from class org.opensourcephysics.media.core.TShape |
---|
color, fillShape, hitRect, stroke, visible |
Fields inherited from class org.opensourcephysics.media.core.TPoint |
---|
coordinateStrBuilder, coordsEditTrigger, coordsVisibleInMouseBox, enabled, screenPt, stepEditTrigger, support, trackEditTrigger, worldPt |
Fields inherited from class java.awt.geom.Point2D.Double |
---|
x, y |
Constructor Summary | |
---|---|
TCoordAxes(VideoPanel panel)
Constructs a TCoordAxes object for the specified video panel. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.opensourcephysics.media.core.TShape |
---|
getBounds, getColor, getStroke, isVisible, setColor, setHitRectCenter, setVisible |
Methods inherited from class org.opensourcephysics.media.core.TPoint |
---|
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 |
Methods inherited from class java.awt.geom.Point2D.Double |
---|
getX, getY |
Methods inherited from class java.awt.geom.Point2D |
---|
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocation |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display.Interactive |
---|
getX, getY |
Field Detail |
---|
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
Constructor Detail |
---|
public TCoordAxes(VideoPanel panel)
panel
- the video panelMethod Detail |
---|
public TPoint getOrigin()
public void draw(DrawingPanel panel, java.awt.Graphics g)
draw
in interface Drawable
draw
in class TShape
panel
- the drawing panel requesting the drawingg
- the graphics context on which to drawpublic 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)
setStroke
in class TShape
stroke
- the desired strokepublic 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 panel
public java.lang.String toString()
toString
in class TShape
protected java.awt.Shape getShape(VideoPanel vidPanel)
getShape
in class TShape
vidPanel
- the video panel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |