Class CoordAxes
java.lang.Object
org.opensourcephysics.display.OSPRuntime.Supported
org.opensourcephysics.cabrillo.tracker.TTrack
org.opensourcephysics.cabrillo.tracker.CoordAxes
- All Implemented Interfaces:
PropertyChangeListener,EventListener,Drawable,Interactive,Measurable,Trackable
A CoordAxes displays and controls the image coordinate system of a specified
tracker panel.
- Author:
- Douglas Brown
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classA TPoint used by autotracker to check for manually marked angles.protected classA TPoint used by autotracker to check for manually marked origins.Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack
TTrack.NameDialog, TTrack.StepArray, TTrack.TextLineLabel, TTrack.TrackDecimalField, TTrack.TrackNumberField -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String[]protected static final String[]protected WorldGridprotected TButtonprotected JCheckBoxprotected static final Iconprotected Componentprotected booleanprotected booleanprotected JLabelFields inherited from class org.opensourcephysics.cabrillo.tracker.TTrack
angleField, angleLabel, angleSeparator, attachmentNames, attachments, autoAdvance, autoAdvanceItem, autoTrackerMarking, circleFootprintListener, clearStepsItem, closeButton, colorItem, constantsLoadedFromXML, customNumberFormats, dataBuilderItem, dataDescriptions, dataFrames, dataProp, datasetManager, dataValid, defaultColors, defaultFootprint, deleteStepItem, deleteTrackItem, description, descriptionItem, enabled, fieldBorder, fixedItem, footprint, footprintListener, footprintMenu, footprints, formatAngleMouseListener, formatMouseListener, hint, HINT_STEP_ADDED_OR_REMOVED, HINT_STEPS_SELECTED, initialized, isMarking, keyFrames, labelFont, locked, lockedItem, magField, magLabel, magSeparator, markByDefault, markByDefaultItem, name, nameDialog, nameItem, nextID, NOMAP, NOMAPS, NOVARA, NOVARS, numberFields, partName, points, positionFields, preferredColumnOrder, properties, PROPERTY_TTRACK_COLOR, PROPERTY_TTRACK_DATA, PROPERTY_TTRACK_FOOTPRINT, PROPERTY_TTRACK_FORMAT, PROPERTY_TTRACK_LOCKED, PROPERTY_TTRACK_MASS, PROPERTY_TTRACK_MODELEND, PROPERTY_TTRACK_MODELSTART, PROPERTY_TTRACK_NAME, PROPERTY_TTRACK_STEP, PROPERTY_TTRACK_STEPS, PROPERTY_TTRACK_TEXTCOLUMN, PROPERTY_TTRACK_VISIBLE, refreshDataLater, skippedStepWarningCheckbox, skippedStepWarningDialog, skippedStepWarningOn, skippedStepWarningTextpane, stepLabel, steps, stepSeparator, stepSizeWhenFirstMarked, stepValueLabel, targetIndex, textColumnEntries, textColumnNames, tField, tframe, tLabel, toolbarPointComponents, toolbarTrackComponents, tp, trailLength, trailVisible, trailVisibleItem, tSeparator, ttype, tValueLabel, TYPE_CALIBRATION, TYPE_CIRCLEFITTER, TYPE_COORDAXES, TYPE_LINEPROFILE, TYPE_OFFSETORIGIN, TYPE_PERSPECTIVE, TYPE_POINTMASS, TYPE_PROTRACTOR, TYPE_RGBREGION, TYPE_TAPEMEASURE, TYPE_UNKNOWN, TYPE_VECTOR, viewable, visible, visibleItem, xField, xLabel, xSeparator, xSpinner, yField, yLabel, ySeparator, ySpinnerFields inherited from interface org.opensourcephysics.media.core.Trackable
PROPERTY_ADJUSTING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoMarkAt(int n, double x, double y) Used by autoTracker to mark a step at a match target position.createStep(int n, double x, double y) Mimics step creation by setting the origin position.deleteStep(int n) Overrides TTrack deleteStep method to prevent deletion.findInteractive(DrawingPanel panel, int xpix, int ypix) Implements findInteractive method.intGets the length of the footprints required by this track.String[]static XML.ObjectLoaderReturns an ObjectLoader to save and load data for this class.getMarkedPoint(int n, int index) Used by autoTracker to get the marked point for a given frame and index.getMenu(TrackerPanel trackerPanel, JMenu menu0) Overrides TTrack getMenu method.Map<String,NumberField[]> Gets a map of number fields by name.Gets the origin.getStep(int n) Overrides TTrack getStep method.intGets the length of the steps created by this track.protected StringgetTargetDescription(int pointIndex) Returns a description of the point at a given index.getToolbarTrackComponents(TrackerPanel trackerPanel) Overrides TTrack getToolbarTrackComponents method.getVarDimsImpl(String variable) protected booleanDetermines if at least one point in this track is autotrackable.protected booleanisAutoTrackable(int pointIndex) Determines if the given point index is autotrackable.booleanisLocked()Overrides TTrack isLocked method.voidResponds to property change events.voidsetFontLevel(int level) Sets the font level.voidsetGridVisible(boolean visible) Sets the grid visibility.voidsetTrailVisible(boolean visible) Overrides TTrack setTrailVisible method to keep trails hidden.voidsetVisible(boolean visible) Overrides TTrack setVisible method to change notyetShown flag.Methods inherited from class org.opensourcephysics.cabrillo.tracker.TTrack
addFixedItem, addFootprint, addListener, addListenerNCF, addPanelEvents, addStepListener, addTextColumn, assembleMenu, clearColumns, convertTextToDataColumn, createAllVariables, createWarningDialog, delete, delete, dispose, draw, erase, erase, finalize, fireStepsChanged, getAllVariables, getAttachmentDescription, getAttachmentLength, getAttachments, getBaseTrackName, getBaseTypeInt, getColor, getCustomFormatPatterns, getData, getData, getDataDescription, getDataName, getDefaultFormatPatterns, getDefaultFormatPatterns, getDescription, getFootprint, getFootprint, getFootprintName, getFootprints, getFootprints, getFormatPatterns, getFrameForData, getIcon, getID, getMarkingCursor, getMenuItems, getMessage, getName, getName, getNameDialog, getNextVisibleStep, getNumberFieldsForStep, getPlotViews, getPreferredDataOrder, getPreviousVisibleStep, getProperty, getPropertyNames, getSkippedStepWarningDialog, getStep, getSteps, getStepSizeWarningDialog, getTableViews, getTargetIndex, getTextColumnEntry, getTextColumnNames, getToolbarPointComponents, getTrack, getTrailLength, getValues, getVarFormatPattern, getVariableDimensions, getVariablesFromFormatterDisplayName, getX, getXMax, getXMin, getY, getYMax, getYMin, initialize, invalidateData, isAttached, isAutoAdvance, isDataValid, isDependent, isEmpty, isEnabled, isFullyAttached, isMarkByDefault, isMarking, isMeasured, isStepComplete, isStepVisible, isTrailVisible, isViewable, isVisible, loadAttachmentsFromNames, refreshAttachments, refreshAttachmentsLater, refreshData, refreshData, refreshDecimalSeparators, remark, remark, removeActiveTrack, removeDeleteTrackItem, removeListener, removeListenerNCF, removePanelEvents, removeStepListener, removeTextColumn, renameTextColumn, repaint, repaint, repaintAll, repaintStep, restorePatterns, savePatterns, setActive, setAnglesInRadians, setAutoAdvance, setColor, setColorToDefault, setDefaultNameAndColor, setDescription, setEnabled, setFixedPosition, setFootprint, setFootprint, setFootprints, setFootprints, setFormatPattern, setInitialFormatPatterns, setLocked, setMarkByDefault, setMarking, setName, setProperty, setTargetIndex, setTargetIndex, setTargetIndex, setTextColumnEntry, setTrackerPanel, setTrailLength, setViewable, setX, setXY, setY, showAnglePopup, showFormatPopup, toString, updateListenerVisibleMethods inherited from class org.opensourcephysics.display.OSPRuntime.Supported
addListeners, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListenerSafely, dispose, firePropertyChange, firePropertyChange, removeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.Interactive
isInteractive
-
Field Details
-
gridOptionsIcon
-
dataVariables
-
formatVariables
-
formatMap
-
formatDescriptionMap
-
allVariables
-
notyetShown
protected boolean notyetShown -
originLabel
-
grid
-
gridCheckbox
-
gridButton
-
gridSeparator
-
gridVisible
protected boolean gridVisible
-
-
Constructor Details
-
CoordAxes
public CoordAxes()Constructs a CoordAxes.
-
-
Method Details
-
getFormatVariables
- Specified by:
getFormatVariablesin classTTrack
-
getFormatMap
- Specified by:
getFormatMapin classTTrack
-
getFormatDescMap
- Specified by:
getFormatDescMapin classTTrack
-
getBaseType
- Specified by:
getBaseTypein classTTrack
-
getVarDimsImpl
- Specified by:
getVarDimsImplin classTTrack
-
getOrigin
Gets the origin.- Returns:
- the current origin
-
isLocked
public boolean isLocked()Overrides TTrack isLocked method. -
setVisible
public void setVisible(boolean visible) Overrides TTrack setVisible method to change notyetShown flag.- Overrides:
setVisiblein classTTrack- Parameters:
visible-trueto show this track
-
setGridVisible
public void setGridVisible(boolean visible) Sets the grid visibility.- Parameters:
visible-trueto show the grid
-
setTrailVisible
public void setTrailVisible(boolean visible) Overrides TTrack setTrailVisible method to keep trails hidden.- Overrides:
setTrailVisiblein classTTrack- Parameters:
visible- ignored
-
createStep
Mimics step creation by setting the origin position.- Specified by:
createStepin classTTrack- Parameters:
n- the frame numberx- the x coordinate in image spacey- the y coordinate in image space- Returns:
- the step
-
deleteStep
Overrides TTrack deleteStep method to prevent deletion.- Overrides:
deleteStepin classTTrack- Parameters:
n- the frame number- Returns:
- the deleted step
-
getStep
Overrides TTrack getStep method. Always return step 0. -
getStepLength
public int getStepLength()Gets the length of the steps created by this track.- Specified by:
getStepLengthin classTTrack- Returns:
- the footprint length
-
isAutoTrackable
protected boolean isAutoTrackable()Determines if at least one point in this track is autotrackable.- Overrides:
isAutoTrackablein classTTrack- Returns:
- true if autotrackable
-
isAutoTrackable
protected boolean isAutoTrackable(int pointIndex) Determines if the given point index is autotrackable.- Overrides:
isAutoTrackablein classTTrack- Parameters:
pointIndex- the points[] index- Returns:
- true if autotrackable
-
getTargetDescription
Returns a description of the point at a given index. Used by AutoTracker.- Overrides:
getTargetDescriptionin classTTrack- Parameters:
pointIndex- the points[] index- Returns:
- the description
-
autoMarkAt
Used by autoTracker to mark a step at a match target position.- Overrides:
autoMarkAtin classTTrack- Parameters:
n- the frame numberx- the x target coordinate in image spacey- the y target coordinate in image space- Returns:
- the TPoint that was automarked
-
getMarkedPoint
Used by autoTracker to get the marked point for a given frame and index. Overrides TTrack method.- Overrides:
getMarkedPointin classTTrack- Parameters:
n- the frame numberindex- the index- Returns:
- a TPoint
-
getFootprintLength
public int getFootprintLength()Gets the length of the footprints required by this track.- Specified by:
getFootprintLengthin classTTrack- Returns:
- the footprint length
-
findInteractive
Implements findInteractive method.- Specified by:
findInteractivein interfaceInteractive- Overrides:
findInteractivein classTTrack- Parameters:
panel- the drawing panelxpix- the x pixel position on the panelypix- the y pixel position on the panel- Returns:
- the first step that is hit
-
getMenu
Overrides TTrack getMenu method. -
getToolbarTrackComponents
Overrides TTrack getToolbarTrackComponents method.- Overrides:
getToolbarTrackComponentsin classTTrack- Parameters:
trackerPanel- the tracker panel- Returns:
- a list of components
-
propertyChange
Responds to property change events. This listens for the following events: "stepnumber" & "image" from TrackerPanel.- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classTTrack- Parameters:
e- the property change event
-
setFontLevel
public void setFontLevel(int level) Description copied from class:TTrackSets the font level.- Overrides:
setFontLevelin classTTrack- Parameters:
level- the desired font level
-
getNumberFields
Description copied from class:TTrackGets a map of number fields by name.- Overrides:
getNumberFieldsin classTTrack- Returns:
- a map of name to NumberField.
-
getLoader
Returns an ObjectLoader to save and load data for this class.- Returns:
- the object loader
-