|
|||||||||
| 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.Vector
public class Vector
A Vector draws a series of VectorSteps that represent a generic time-dependent vector.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
TTrack.StepArray |
| Field Summary | |
|---|---|
protected java.lang.String[] |
dataDescriptions
|
protected javax.swing.JCheckBoxMenuItem |
labelsVisibleItem
|
protected javax.swing.JMenuItem |
tailsToOriginItem
|
protected java.util.Map<TrackerPanel,java.lang.Boolean> |
visMap
|
| Constructor Summary | |
|---|---|
Vector()
Constructs a Vector. |
|
| Method Summary | |
|---|---|
Step |
createStep(int n,
double x,
double y)
Implements createStep. |
Step |
createStep(int n,
double x,
double y,
double xc,
double yc)
Creates a vector step with specified tail position and vector components. |
void |
draw(DrawingPanel panel,
java.awt.Graphics _g)
Overrides TTrack draw method. |
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Finds the interactive drawable object located at the specified pixel position. |
java.lang.String |
getDataDescription(int index)
Gets the description of a data variable. |
int |
getDefaultAutoTrackerIndex()
Gets the default step point index. |
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. |
int |
getStepLength()
Gets the length of the steps created by this track. |
java.util.ArrayList<java.awt.Component> |
getToolbarPointComponents(TrackerPanel trackerPanel,
TPoint point)
Overrides TTrack getToolbarPointComponents method. |
java.util.ArrayList<java.awt.Component> |
getToolbarTrackComponents(TrackerPanel trackerPanel)
Overrides TTrack getToolbarTrackComponents method. |
boolean |
isLabelsVisible()
Gets the labels visibility. |
boolean |
isStepComplete(int n)
Returns true if the step at the specified frame number is complete. |
boolean |
isVectorsVisible(TrackerPanel trackerPanel)
Gets whether the vectors are visible on the specified panel. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Responds to property change events. |
protected void |
refreshData(DatasetManager data,
TrackerPanel trackerPanel)
Refreshes the data. |
void |
setLabelsVisible(boolean visible)
Sets the visibility of force vector labels. |
void |
setLocked(boolean locked)
Overrides TTrack setLocked method. |
void |
setVectorsVisible(TrackerPanel panel,
boolean visible)
Sets the visibility of the vectors on the specified tracker panel. |
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 javax.swing.JMenuItem tailsToOriginItem
protected javax.swing.JCheckBoxMenuItem labelsVisibleItem
protected java.util.Map<TrackerPanel,java.lang.Boolean> visMap
protected java.lang.String[] dataDescriptions
| Constructor Detail |
|---|
public Vector()
| Method Detail |
|---|
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 x,
double y,
double xc,
double yc)
n - the frame numberx - the tail x coordinate in image spacey - the tail y coordinate in image spacexc - the x component in image spaceyc - the y component in image space
public int getStepLength()
getStepLength in class TTrackpublic int getDefaultAutoTrackerIndex()
getDefaultAutoTrackerIndex in class TTrackpublic int getFootprintLength()
getFootprintLength in class TTrackpublic java.lang.String getDataDescription(int index)
getDataDescription in class TTrackindex - the dataset index
public void draw(DrawingPanel panel,
java.awt.Graphics _g)
draw in interface Drawabledraw in class TTrackpanel - the drawing panel requesting the drawing_g - the graphics context on which to drawpublic boolean isStepComplete(int n)
isStepComplete in class TTrackn - the frame number
true if the step is completepublic void setLocked(boolean locked)
setLocked in class TTracklocked - true to lock thispublic void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class TTracke - the property change event
protected void refreshData(DatasetManager data,
TrackerPanel trackerPanel)
refreshData in class TTrackdata - the DatasetManagertrackerPanel - the tracker panel
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 void setLabelsVisible(boolean visible)
visible - true to show all labelspublic boolean isLabelsVisible()
true if labels are visible
public void setVectorsVisible(TrackerPanel panel,
boolean visible)
panel - the tracker panelvisible - true to show vectorspublic boolean isVectorsVisible(TrackerPanel trackerPanel)
trackerPanel - the tracker panel
true if positions are visiblepublic javax.swing.JMenu getMenu(TrackerPanel trackerPanel)
getMenu in class TTracktrackerPanel - the tracker panel
public java.util.ArrayList<java.awt.Component> getToolbarTrackComponents(TrackerPanel trackerPanel)
getToolbarTrackComponents in class TTracktrackerPanel - the tracker panel
public java.util.ArrayList<java.awt.Component> getToolbarPointComponents(TrackerPanel trackerPanel,
TPoint point)
getToolbarPointComponents in class TTracktrackerPanel - the tracker panelpoint - the TPoint
public java.lang.String toString()
toString in class TTrackpublic static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||