|
|||||||||
| 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.LineProfile
public class LineProfile
A LineProfile measures pixel brightness along a line on a video image.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
TTrack.StepArray |
| Field Summary | |
|---|---|
protected java.lang.String[] |
dataDescriptions
|
protected boolean |
fixedLine
|
protected javax.swing.JCheckBoxMenuItem |
fixedLineItem
|
protected javax.swing.JMenuItem |
horizOrientationItem
|
protected boolean |
isHorizontal
|
protected boolean |
loading
|
static int |
MAX_SPREAD
The maximum allowed spread |
protected javax.swing.JMenu |
orientationMenu
|
protected int |
spread
|
protected IntegerField |
spreadField
|
protected javax.swing.JLabel |
spreadLabel
|
protected javax.swing.JMenuItem |
xaxisOrientationItem
|
| Constructor Summary | |
|---|---|
LineProfile()
Constructs a LineProfile. |
|
| Method Summary | |
|---|---|
Step |
createStep(int n,
double x,
double y)
Creates a new step. |
Step |
createStep(int n,
double x1,
double y1,
double x2,
double y2)
Creates a new step or sets end positions of an existing step. |
Step |
deleteStep(int n)
Overrides TTrack deleteStep method to prevent deletion. |
void |
draw(DrawingPanel panel,
java.awt.Graphics _g)
Overrides TTrack draw method. |
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Implements findInteractive method. |
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 |
getSpread()
Gets the spread. |
Step |
getStep(int n)
Overrides TTrack getStep method to provide fixedLine behavior. |
int |
getStepLength()
Gets the length of the steps created by this track. |
java.util.ArrayList<java.awt.Component> |
getToolbarTrackComponents(TrackerPanel trackerPanel)
Overrides TTrack getToolbarTrackComponents method. |
boolean |
isFixed()
Gets the fixed property. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Responds to property change events. |
protected void |
refreshData(DatasetManager data,
TrackerPanel trackerPanel)
Refreshes the data. |
protected void |
refreshStep(LineProfileStep step)
Refreshes a step by setting it equal to a keyframe step. |
void |
setFixed(boolean fixed)
Sets the fixed property. |
void |
setSpread(int spread)
Sets the spread. |
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 |
|---|
public static final int MAX_SPREAD
protected boolean fixedLine
protected javax.swing.JCheckBoxMenuItem fixedLineItem
protected javax.swing.JMenu orientationMenu
protected javax.swing.JMenuItem horizOrientationItem
protected javax.swing.JMenuItem xaxisOrientationItem
protected int spread
protected javax.swing.JLabel spreadLabel
protected IntegerField spreadField
protected boolean isHorizontal
protected java.lang.String[] dataDescriptions
protected boolean loading
| Constructor Detail |
|---|
public LineProfile()
| Method Detail |
|---|
public void setFixed(boolean fixed)
fixed - true to fix the linepublic boolean isFixed()
true if line is fixedpublic void setSpread(int spread)
spread - the desired spreadpublic int getSpread()
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 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 TTrack
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 getDataDescription(int index)
getDataDescription in class TTrackindex - the dataset index
protected void refreshData(DatasetManager data,
TrackerPanel trackerPanel)
refreshData in class TTrackdata - the DatasetManagertrackerPanel - the tracker panelpublic 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 void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class TTracke - the property change eventpublic java.lang.String toString()
toString in class TTrackprotected void refreshStep(LineProfileStep 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 | ||||||||