|
|||||||||
| 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.PointMass
org.opensourcephysics.cabrillo.tracker.ParticleModel
public abstract class ParticleModel
A ParticleModel is a point mass whose positions are determined by a model.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
TTrack.StepArray |
| Field Summary | |
|---|---|
protected double |
dt
|
protected UserFunctionEditor |
functionEditor
|
protected ModelFunctionPanel |
functionPanel
|
protected FunctionTool |
inspector
|
protected int |
inspectorH
|
protected int |
inspectorX
|
protected int |
inspectorY
|
protected boolean |
isInspectorVisible
|
protected int |
lastValidFrame
|
protected double[] |
prevX
|
protected double[] |
prevY
|
protected boolean |
refreshing
|
protected boolean |
showInspector
|
protected double |
t0
|
protected double |
time
|
protected java.awt.geom.GeneralPath |
trace
|
protected static int[] |
traceButtonChoices
|
protected static java.lang.String[] |
traceButtonText
|
protected TPoint |
tracePt
|
protected int |
tracePtsPerStep
|
protected java.awt.Stroke |
traceStroke
|
protected double[] |
traceX
|
protected double[] |
traceY
|
| Fields inherited from class org.opensourcephysics.cabrillo.tracker.PointMass |
|---|
aAtOrigin, accelerationMenu, aDeriv, aFootprint, aFootprints, aMap, aTailsToOriginItem, aTailsToPositionItem, aVisibleItem, aVisibleOnAll, aVisMap, colorIndex, colors, dataDescriptions, derivData, labelsVisibleItem, mass, massField, massLabel, mSeparator, names, namesIndex, params, validData, vAtOrigin, vDeriv, velocityMenu, vFootprint, vFootprints, vMap, vTailsToOriginItem, vTailsToPositionItem, vVisibleItem, vVisibleOnAll, vVisMap, xData, xVisibleOnAll, xVisMap, yData |
| Fields inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
angleField, angleLabel, angleSeparator, autoAdvance, autoAdvanceItem, colorItem, data, dataColumnsItem, dataFrames, dataProp, dataValid, defaultColor, defaultFootprint, deleteItem, description, descriptionItem, enabled, fieldBorder, footprint, footprintListener, footprintMenu, footprints, hint, labelFont, locked, lockedItem, magField, magLabel, magSeparator, markByDefault, markByDefaultItem, menu, name, nameAction, nameDialog, nameField, nameItem, panels, partName, 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 | |
|---|---|
ParticleModel()
Constructs a ParticleModel. |
|
| Method Summary | |
|---|---|
protected void |
cleanup()
Cleans up associated resources when this track is deleted or cleared. |
protected void |
createMassAndTimeParameters()
This adds the mass and initial time parameters to the function panel. |
void |
draw(DrawingPanel panel,
java.awt.Graphics _g)
Overrides PointMass draw method. |
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Overrides PointMass findInteractive method. |
UserFunctionEditor |
getFunctionEditor()
Gets the function editor. |
InitialValueEditor |
getInitEditor()
Gets the initial value editor. |
double[] |
getInitialValues()
Gets the initial values. |
FunctionTool |
getInspector()
Gets the particle inspector. |
static XML.ObjectLoader |
getLoader()
Returns an ObjectLoader to save and load data for this class. |
double |
getMass()
Gets the mass. |
javax.swing.JMenu |
getMenu(TrackerPanel trackerPanel)
Returns a menu with items that control this track. |
ParamEditor |
getParamEditor()
Gets the parameter editor. |
protected ParticleModel[] |
getParticles()
Gets the next trace positions. |
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. |
protected void |
initializeFunctionPanel()
Initializes the ModelFunctionPanel. |
boolean |
isDependent()
Overrides TTrack method to report that this is a dependent track. |
boolean |
isStepComplete(int n)
Overrides TTrack isStepComplete method. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Responds to property change events. |
protected void |
refreshSteps()
Refreshes step positions. |
void |
setLocked(boolean locked)
Overrides TTrack setLocked method. |
void |
setMass(double mass)
Sets the mass. |
void |
setName(java.lang.String name)
Sets the name. |
| Methods inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
addFootprint, addPropertyChangeListener, addPropertyChangeListener, delete, firePropertyChange, getColor, getData, getDataName, getDescription, getFootprint, getFootprints, getFrameForData, getMessage, getName, getProperty, getPropertyNames, getStep, getSteps, getTrailLength, getWorldBounds, getX, getXMax, getXMax, getXMin, getXMin, getY, getYMax, getYMax, getYMin, getYMin, isAutoAdvance, isEmpty, isEnabled, isLocked, isMarkByDefault, isMeasured, isTrailVisible, isViewable, isVisible, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, setAutoAdvance, setDescription, setEnabled, setFootprint, setFootprints, setFootprints, setMarkByDefault, setProperty, setTrackerPanel, setTrailLength, setTrailVisible, setViewable, setVisible, setX, setXY, setY |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static int[] traceButtonChoices
protected static java.lang.String[] traceButtonText
protected FunctionTool inspector
protected ModelFunctionPanel functionPanel
protected UserFunctionEditor functionEditor
protected int inspectorX
protected int inspectorY
protected int inspectorH
protected boolean showInspector
protected boolean isInspectorVisible
protected boolean refreshing
protected double[] traceX
protected double[] traceY
protected double[] prevX
protected double[] prevY
protected TPoint tracePt
protected java.awt.geom.GeneralPath trace
protected java.awt.Stroke traceStroke
protected int tracePtsPerStep
protected int lastValidFrame
protected double t0
protected double dt
protected double time
| Constructor Detail |
|---|
public ParticleModel()
| Method Detail |
|---|
public void draw(DrawingPanel panel,
java.awt.Graphics _g)
draw in interface Drawabledraw in class PointMasspanel - the drawing panel requesting the drawing_g - the graphics context on which to drawpublic void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class PointMasse - the property change eventpublic double getMass()
getMass in class PointMasspublic void setMass(double mass)
setMass in class PointMassmass - the masspublic void setName(java.lang.String name)
setName in class TTrackname - the name
public Interactive findInteractive(DrawingPanel panel,
int xpix,
int ypix)
findInteractive in interface InteractivefindInteractive in class PointMasspanel - the drawing panelxpix - the x pixel position on the panelypix - the y pixel position on the panel
public void setLocked(boolean locked)
setLocked in class TTracklocked - ignoredpublic boolean isDependent()
isDependent in class TTracktrue if this track is dependentpublic boolean isStepComplete(int n)
isStepComplete in class TTrackn - the frame number
true always since gets data from modelpublic javax.swing.JMenu getMenu(TrackerPanel trackerPanel)
getMenu in class PointMasstrackerPanel - the tracker panel
public java.util.ArrayList<java.awt.Component> getToolbarTrackComponents(TrackerPanel trackerPanel)
getToolbarTrackComponents in class PointMasstrackerPanel - the tracker panel
public java.util.ArrayList<java.awt.Component> getToolbarPointComponents(TrackerPanel trackerPanel,
TPoint point)
getToolbarPointComponents in class PointMasstrackerPanel - the tracker panelpoint - the TPoint
protected void cleanup()
cleanup in class TTrackprotected ParticleModel[] getParticles()
protected void refreshSteps()
public FunctionTool getInspector()
protected void initializeFunctionPanel()
protected void createMassAndTimeParameters()
public double[] getInitialValues()
public ParamEditor getParamEditor()
public InitialValueEditor getInitEditor()
public UserFunctionEditor getFunctionEditor()
public static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||