|
|||||||||
| 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.Protractor
public class Protractor
A Protractor measures and displays an angular arc.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
TTrack.StepArray |
| Field Summary | |
|---|---|
protected boolean |
editing
|
protected java.awt.event.MouseListener |
editListener
|
protected javax.swing.JCheckBoxMenuItem |
fixedItem
|
protected boolean |
fixedPosition
|
protected java.text.NumberFormat |
format
|
protected javax.swing.JPanel |
glassPanel
|
protected DecimalField |
inputField
|
protected javax.swing.JPanel |
inputPanel
|
| Constructor Summary | |
|---|---|
Protractor()
Constructs a Protractor. |
|
| Method Summary | |
|---|---|
Step |
createStep(int n,
double x,
double y)
Implements createStep but only mimics step creation since steps are created automatically by the autofill StepArray. |
Step |
createStep(int n,
double x1,
double y1,
double x2,
double y2)
Mimics step creation by setting end positions of an existing step. |
Step |
deleteStep(int n)
Overrides TTrack deleteStep method to prevent deletion. |
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Implements findInteractive method. |
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)
Returns a menu with items that control this track. |
Step |
getStep(int n)
Overrides TTrack getStep method to provide fixed behavior. |
int |
getStepLength()
Gets the length of the steps created by this track. |
java.util.ArrayList<java.awt.Component> |
getToolbarTrackComponents(TrackerPanel trackerPanel)
Returns a list of point-related toolbar components. |
boolean |
isFixed()
Gets the fixed property. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Responds to property change events. |
protected void |
refreshStep(ProtractorStep step)
Refreshes a step by setting it equal to a keyframe step. |
protected void |
setAnglesInRadians(boolean radians)
Overrides TTrack method. |
void |
setFixed(boolean fixed)
Sets the fixed property. |
protected void |
setTrackerPanel(TrackerPanel panel)
Overrides TTrack setTrackerPanel method. |
void |
setTrailVisible(boolean visible)
Overrides TTrack setTrailVisible method to keep trails hidden. |
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 boolean fixedPosition
protected javax.swing.JCheckBoxMenuItem fixedItem
protected boolean editing
protected final DecimalField inputField
protected javax.swing.JPanel inputPanel
protected javax.swing.JPanel glassPanel
protected java.text.NumberFormat format
protected java.awt.event.MouseListener editListener
| Constructor Detail |
|---|
public Protractor()
| Method Detail |
|---|
public void setFixed(boolean fixed)
fixed - true to fixpublic boolean isFixed()
true if fixedpublic void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class TTracke - the property change eventpublic void setTrailVisible(boolean visible)
setTrailVisible in class TTrackvisible - ignored
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 end1 in image spacey1 - the y coordinate of end1 in image spacex2 - the x coordinate of end2 in image spacey2 - the y coordinate of end2 in image space
public Step deleteStep(int n)
deleteStep in class TTrackn - the frame number
public Step getStep(int n)
getStep in class TTrackn - the frame number
public int getStepLength()
getStepLength in class TTrackpublic int getDefaultAutoTrackerIndex()
getDefaultAutoTrackerIndex in class TTrackpublic int getFootprintLength()
getFootprintLength in class TTrackpublic 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 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 java.lang.String toString()
toString in class TTrackprotected void setTrackerPanel(TrackerPanel panel)
setTrackerPanel in class TTrackpanel - the TrackerPanelprotected void setAnglesInRadians(boolean radians)
setAnglesInRadians in class TTrackradians - true for radians, false for degreesprotected void refreshStep(ProtractorStep step)
step - the step to refreshpublic static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||