|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.cabrillo.tracker.Step
org.opensourcephysics.cabrillo.tracker.PositionStep
public class PositionStep
This is a Step that represents a position. It is used by PointMass tracks.
| Nested Class Summary | |
|---|---|
protected class |
PositionStep.Position
|
| Field Summary | |
|---|---|
protected java.awt.Font |
font
|
protected boolean |
labelVisible
|
protected java.util.Map<TrackerPanel,java.awt.Rectangle> |
layoutBounds
|
protected PositionStep.Position |
p
|
protected boolean |
rolloverVisible
|
protected java.util.Map<TrackerPanel,java.awt.font.TextLayout> |
textLayouts
|
| Fields inherited from class org.opensourcephysics.cabrillo.tracker.Step |
|---|
dataVisible, defaultIndex, footprint, format, frc, hitRect, marks, n, points, screenPoints, selectionShape, track, transform, valid |
| Constructor Summary | |
|---|---|
PositionStep(PointMass track,
int n,
double x,
double y)
Constructs a PositionStep with specified image coordinates. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clones this Step. |
void |
draw(DrawingPanel panel,
java.awt.Graphics _g)
Overrides Step draw method. |
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Overrides Step findInteractive method. |
java.awt.Rectangle |
getBounds(TrackerPanel trackerPanel)
Overrides Step getBounds method. |
protected java.awt.Point |
getLayoutPosition(TrackerPanel trackerPanel)
Gets TextLayout screen position. |
static XML.ObjectLoader |
getLoader()
Returns an ObjectLoader to save and load data for this class. |
protected Mark |
getMark(TrackerPanel trackerPanel)
Overrides Step getMark method. |
PositionStep.Position |
getPosition()
Gets the position TPoint. |
boolean |
isLabelVisible()
Gets the label visibility. |
boolean |
isRolloverVisible()
Gets the rollover visibility. |
void |
setLabelVisible(boolean visible)
Sets the label visibility. |
void |
setRolloverVisible(boolean visible)
Sets the rollover visibility. |
java.lang.String |
toString()
Returns a String describing this. |
| Methods inherited from class org.opensourcephysics.cabrillo.tracker.Step |
|---|
erase, erase, getDefaultAutotrackIndex, getDefaultPoint, getFrameNumber, getLength, getPointIndex, getPoints, getTrack, remark, remark, repaint, repaint, setDefaultPointIndex, setFootprint, setHitRectCenter |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected PositionStep.Position p
protected boolean labelVisible
protected boolean rolloverVisible
protected java.util.Map<TrackerPanel,java.awt.font.TextLayout> textLayouts
protected java.util.Map<TrackerPanel,java.awt.Rectangle> layoutBounds
protected java.awt.Font font
| Constructor Detail |
|---|
public PositionStep(PointMass track,
int n,
double x,
double y)
track - the PointMass trackn - the frame numberx - the x coordinatey - the y coordinate| Method Detail |
|---|
public PositionStep.Position getPosition()
public boolean isLabelVisible()
true if label is visiblepublic void setLabelVisible(boolean visible)
visible - true to make label visiblepublic boolean isRolloverVisible()
true if labels are visible on rollover onlypublic void setRolloverVisible(boolean visible)
visible - true to make labels visible on rollover only
public void draw(DrawingPanel panel,
java.awt.Graphics _g)
draw in class Steppanel - the drawing panel requesting the drawing_g - the graphics context on which to draw
public Interactive findInteractive(DrawingPanel panel,
int xpix,
int ypix)
findInteractive in class Steppanel - the drawing panelxpix - the x pixel positionypix - the y pixel position
protected Mark getMark(TrackerPanel trackerPanel)
getMark in class SteptrackerPanel - the tracker panel
public java.awt.Rectangle getBounds(TrackerPanel trackerPanel)
getBounds in class SteptrackerPanel - the tracker panel drawing the step
public java.lang.Object clone()
clone in class Steppublic java.lang.String toString()
toString in class Stepprotected java.awt.Point getLayoutPosition(TrackerPanel trackerPanel)
trackerPanel - the tracker panel
public static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||