|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.cabrillo.tracker.Step
public abstract class Step
A Step is associated with a single frame of a TTrack. It contains an array of TPoints that define its image data and a Footprint that determines its screen appearance. This is an abstract class and cannot be instantiated directly.
| Field Summary | |
|---|---|
protected boolean |
dataVisible
|
protected int |
defaultIndex
|
protected Footprint |
footprint
|
protected static java.text.NumberFormat |
format
|
protected static java.awt.Rectangle |
hitRect
|
protected java.util.Map<TrackerPanel,Mark> |
marks
|
protected int |
n
|
protected TPoint[] |
points
|
protected java.awt.Point[] |
screenPoints
|
protected static java.awt.Shape |
selectionShape
|
protected TTrack |
track
|
protected static java.awt.geom.AffineTransform |
transform
|
| Constructor Summary | |
|---|---|
protected |
Step(TTrack track,
int n)
Constructs a Step with the specified frame number. |
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clones this Step. |
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws this step. |
void |
erase()
Erases this on all tracker panels. |
void |
erase(TrackerPanel trackerPanel)
Erases this on the specified tracker panel. |
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Finds the Interactive located at the specified pixel position. |
java.awt.Rectangle |
getBounds(TrackerPanel trackerPanel)
Gets the screen bounds of this step on the specified tracker panel. |
TPoint |
getDefaultPoint()
Gets the default point. |
int |
getFrameNumber()
Gets the frame number. |
protected Mark |
getMark(TrackerPanel trackerPanel)
Gets the mark for the specified panel. |
TPoint[] |
getPoints()
Gets the array of TPoints contained in this step. |
TTrack |
getTrack()
Gets the track. |
void |
remark()
Remarks this on all tracker panels. |
void |
remark(TrackerPanel trackerPanel)
Erases and remarks this on the specified tracker panel. |
void |
repaint()
Repaints this on all tracker panels. |
void |
repaint(TrackerPanel trackerPanel)
Repaints this on the specified tracker panel. |
void |
setDefaultPointIndex(int index)
Sets the default point index. |
void |
setFootprint(Footprint footprint)
Sets the footprint. |
protected void |
setHitRectCenter(int xpix,
int ypix)
Centers the hit testing rectangle on the specified screen point. |
java.lang.String |
toString()
Returns a String describing this step. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static java.awt.Rectangle hitRect
protected static java.awt.Shape selectionShape
protected static java.awt.geom.AffineTransform transform
protected static java.text.NumberFormat format
protected TTrack track
protected int n
protected Footprint footprint
protected TPoint[] points
protected int defaultIndex
protected java.awt.Point[] screenPoints
protected java.util.Map<TrackerPanel,Mark> marks
protected boolean dataVisible
| Constructor Detail |
|---|
protected Step(TTrack track,
int n)
track - the trackn - the frame number| Method Detail |
|---|
public int getFrameNumber()
public void setFootprint(Footprint footprint)
footprint - the footprintpublic TTrack getTrack()
public TPoint[] getPoints()
public TPoint getDefaultPoint()
public void setDefaultPointIndex(int index)
index - the indexpublic void erase(TrackerPanel trackerPanel)
trackerPanel - the tracker panelpublic void remark(TrackerPanel trackerPanel)
trackerPanel - the tracker panelpublic void repaint(TrackerPanel trackerPanel)
trackerPanel - the tracker panelpublic void erase()
public void remark()
public void repaint()
public void draw(DrawingPanel panel,
java.awt.Graphics g)
panel - the drawing panel requesting the drawingg - the graphics context on which to draw
public Interactive findInteractive(DrawingPanel panel,
int xpix,
int ypix)
panel - the drawing panelxpix - the x pixel positionypix - the y pixel position
public java.awt.Rectangle getBounds(TrackerPanel trackerPanel)
trackerPanel - the tracker panel drawing the step
protected Mark getMark(TrackerPanel trackerPanel)
trackerPanel - the tracker panel
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Object
protected void setHitRectCenter(int xpix,
int ypix)
xpix - the x pixel positionypix - the y pixel position
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||