|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.cabrillo.tracker.TTrack
org.opensourcephysics.cabrillo.tracker.Calibration
public class Calibration
A Calibration controls the image coordinate system of a specified tracker panel.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
TTrack.StepArray |
| Field Summary | |
|---|---|
protected int |
axes
|
protected javax.swing.JLabel |
axisLabel
|
protected java.util.ArrayList |
axisList
|
protected javax.swing.event.ChangeListener |
axisListener
|
protected javax.swing.JSpinner |
axisSpinner
|
protected boolean[] |
isWorldDataValid
|
protected static java.lang.String |
names
|
protected static int |
namesIndex
|
protected boolean[] |
pointsVisible
|
protected double |
worldX0
|
protected double |
worldX1
|
protected NumberField |
worldXField
|
protected double |
worldY0
|
protected double |
worldY1
|
protected NumberField |
worldYField
|
protected static int |
X_AXIS
|
protected static int |
XY_AXES
|
protected static int |
Y_AXIS
|
| Fields inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
angleField, angleLabel, angleSeparator, autoAdvance, autoAdvanceItem, colorItem, data, dataColumnsItem, dataProp, dataValid, defaultColor, defaultFootprint, deleteItem, description, descriptionItem, enabled, footprint, footprintListener, footprintMenu, footprints, labelFont, locked, lockedItem, magField, magLabel, magSeparator, markByDefault, markByDefaultItem, menu, name, nameAction, nameDialog, nameField, nameItem, panels, point, properties, stepField, stepLabel, steps, stepSeparator, support, tField, tLabel, toolbarPointComponents, toolbarTrackComponents, trackerPanel, trailLength, trailVisible, trailVisibleItem, tSeparator, viewable, visible, visibleItem, worldBounds, xField, xLabel, xSeparator, xSpinner, yField, yLabel, ySeparator, ySpinner |
| Constructor Summary | |
|---|---|
Calibration()
Constructs a Calibration. |
|
| Method Summary | |
|---|---|
Step |
createStep(int n,
double x,
double y)
Creates a new calibration step with a single calibration point. |
Step |
createStep(int n,
double x1,
double y1,
double x2,
double y2)
Creates a new calibration step with two calibration points. |
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Implements findInteractive method. |
int |
getFootprintLength()
Gets the length of the footprints required by this track. |
static XML.ObjectLoader |
getLoader()
Returns an ObjectLoader to save and load data for this class. |
javax.swing.JMenu |
getMenu(TrackerPanel trackerPanel)
Overrides TTrack getMenu method. |
Step |
getStep(int n)
Overrides TTrack getStep method. |
java.util.ArrayList |
getToolbarPointComponents(TrackerPanel trackerPanel,
TPoint point)
Overrides TTrack getToolbarPointComponents method. |
java.util.ArrayList |
getToolbarTrackComponents(TrackerPanel trackerPanel)
Overrides TTrack getToolbarTrackComponents method. |
boolean |
isLocked()
Overrides TTrack isLocked method. |
boolean |
isPointVisible(int index)
Gets the visibility of a point specified by index in the points array. |
boolean |
isStepComplete(int n)
Returns true if the step at the specified frame number is complete. |
void |
setAxes(int axis)
|
void |
setFootprint(java.lang.String name)
Overrides TTrack setFootprint to handle PointAxesFootprints. |
void |
setPointVisible(int index,
boolean visible)
Sets the visibility of the calibration points by index. |
void |
setTrailVisible(boolean visible)
Overrides TTrack setTrailVisible method. |
void |
setWorldXY(double wx0,
double wy0,
double wx1,
double wy1)
Sets the world coordinates of this calibration. |
java.lang.String |
toString()
Overrides Object toString method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int X_AXIS
protected static final int XY_AXES
protected static final int Y_AXIS
protected static java.lang.String names
protected static int namesIndex
protected boolean[] pointsVisible
protected NumberField worldXField
protected NumberField worldYField
protected double worldX0
protected double worldY0
protected double worldX1
protected double worldY1
protected boolean[] isWorldDataValid
protected java.util.ArrayList axisList
protected javax.swing.JSpinner axisSpinner
protected javax.swing.event.ChangeListener axisListener
protected javax.swing.JLabel axisLabel
protected int axes
| Constructor Detail |
|---|
public Calibration()
| Method Detail |
|---|
public void setAxes(int axis)
public void setWorldXY(double wx0,
double wy0,
double wx1,
double wy1)
wx0 - the x coordinate of point 0 in world spacewy0 - the y coordinate of point 0 in world spacewx1 - the x coordinate of point 1 in world spacewy1 - the y coordinate of point 1 in world space
public void setPointVisible(int index,
boolean visible)
index - the index of the point in the points arrayvisible - true to make the point visiblepublic boolean isPointVisible(int index)
index - the index of the point in the points array
true if the point is visible
public Step createStep(int n,
double x,
double y)
createStep in class TTrackn - the frame numberx - the x coordinate in image spacey - the y coordinate in image space
public Step createStep(int n,
double x1,
double y1,
double x2,
double y2)
n - the frame numberx1 - the x coordinate of point 1 in image spacey1 - the y coordinate of point 1 in image spacex2 - the x coordinate of point 2 in image spacey2 - the y coordinate of point 2 in image space
public Step getStep(int n)
getStep in class TTrackn - the frame number
public boolean isLocked()
isLocked in class TTracktrue if this is lockedpublic void setTrailVisible(boolean visible)
setTrailVisible in class TTrackvisible - ignoredpublic boolean isStepComplete(int n)
isStepComplete in class TTrackn - the frame number
true only if the step is completepublic int getFootprintLength()
getFootprintLength in class TTrackpublic void setFootprint(java.lang.String name)
setFootprint in class TTrackname - the name of the desired footprint
public Interactive findInteractive(DrawingPanel panel,
int xpix,
int ypix)
findInteractive in interface InteractivefindInteractive in class TTrackpanel - the drawing panelxpix - the x pixel position on the panelypix - the y pixel position on the panel
public javax.swing.JMenu getMenu(TrackerPanel trackerPanel)
getMenu in class TTracktrackerPanel - the tracker panel
public java.util.ArrayList getToolbarTrackComponents(TrackerPanel trackerPanel)
getToolbarTrackComponents in class TTracktrackerPanel - the tracker panel
public java.util.ArrayList getToolbarPointComponents(TrackerPanel trackerPanel,
TPoint point)
getToolbarPointComponents in class TTracktrackerPanel - the tracker panelpoint - the TPoint
public java.lang.String toString()
toString in class java.lang.Objectpublic static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||