public abstract class Probe extends ModelAgentBase
Modifier and Type | Class and Description |
---|---|
static interface |
Probe.ExportProps |
static class |
Probe.ImportExportFileInfo
Contains information about the types of files this probe
can be exported or imported to.
|
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static PropertyList |
myProps |
static boolean |
useOldSaveMethod |
static boolean |
writeStartStopTimeInSeconds |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
Constructor and Description |
---|
Probe() |
Modifier and Type | Method and Description |
---|---|
abstract void |
apply(double t)
Called at time
t to apply this probe |
ComponentState |
createState(ComponentState prevState)
Factory routine to create a state object for this component, which can
then be used as an argument for
HasState.setState(artisynth.core.modelbase.ComponentState) and HasState.getState(artisynth.core.modelbase.ComponentState) . |
void |
export(java.io.File file,
Probe.ExportProps props) |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by
this object.
|
java.io.File |
getAttachedFile() |
java.lang.String |
getAttachedFileName() |
java.util.Iterator<? extends HierarchyNode> |
getChildren() |
double |
getClippedVirtualTime(double sec) |
static double |
getDefaultScale() |
static double |
getDefaultStartTime() |
static double |
getDefaultStopTime() |
static double |
getDefaultUpdateInterval() |
double |
getDuration() |
java.io.File |
getExportFile() |
Probe.ImportExportFileInfo[] |
getExportFileInfo() |
java.lang.String |
getExportFileName() |
Probe.ExportProps |
getExportProps(java.lang.String ext) |
static java.io.File |
getFileFromPath(java.lang.String fileName) |
java.io.File |
getImportFile() |
Probe.ImportExportFileInfo[] |
getImportFileInfo() |
java.lang.String |
getImportFileName() |
void |
getInitialState(ComponentState newstate,
ComponentState oldstate)
Gets an initial state for this component and returns the value in
state . |
static java.lang.String |
getPathFromFile(java.io.File file)
Returns the path for a file.
|
Property |
getProperty(java.lang.String name)
Returns a property associated with a specified path name.
|
double |
getScale() |
double |
getStartTime() |
void |
getState(ComponentState state)
Get the current state of this component.
|
double |
getStopTime() |
double |
getTimelineTime(double t) |
java.lang.Integer |
getTrack()
Returns the Timeline track number associated with this probe.
|
double |
getUpdateInterval() |
double |
getVirtualTime(double sec) |
boolean |
hasAttachedFile() |
boolean |
hasChildren() |
boolean |
hasState()
Queries if this component has state.
|
void |
importData(java.io.File file,
boolean explicitTime,
boolean overlay)
Still being implemented
|
boolean |
isAttachedFileRelative() |
boolean |
isCloneable() |
boolean |
isEventTime(double t)
Queries whether time
t is an event time for this probe. |
boolean |
isInput()
Returns true if this probe is an input probe, and false otherwise.
|
boolean |
isPrintable() |
boolean |
isScalable() |
boolean |
isSettable() |
void |
load() |
double |
nextEventTime(double t)
Returns the time of the next probe event after time
t . |
void |
print(double sec) |
void |
save() |
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer.
|
void |
setAttachedFileName(java.lang.String fileName) |
void |
setData(double sec) |
void |
setExportFileName(java.lang.String fileName) |
void |
setImportFileName(java.lang.String fileName) |
void |
setInterval(double startTime,
double stopTime) |
void |
setName(java.lang.String name)
Sets the name of this component.
|
void |
setScalable(boolean enable) |
void |
setScale(double s) |
void |
setStartStopTimes(double startTime,
double stopTime) |
void |
setStartTime(double t) |
void |
setState(ComponentState state)
Set the state of this component.
|
void |
setStopTime(double t) |
void |
setTrack(int num)
Sets the Timeline track number associated with this probe.
|
void |
setUpdateInterval(double t) |
dispose, finalize, getModel, initialize, isActive, setActive, setModel, setModelFromComponent, write
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, copy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, setFixed, setMarked, setNumber, setParent, setSelected, setWritable, updateReferences
postscan
isWritable
public static boolean useOldSaveMethod
public static boolean writeStartStopTimeInSeconds
public static PropertyList myProps
public java.lang.String getExportFileName()
public java.io.File getExportFile()
public void setExportFileName(java.lang.String fileName)
public java.lang.String getImportFileName()
public java.io.File getImportFile()
public void setImportFileName(java.lang.String fileName)
public Probe.ExportProps getExportProps(java.lang.String ext)
public Probe.ImportExportFileInfo[] getExportFileInfo()
public Probe.ImportExportFileInfo[] getImportFileInfo()
public void export(java.io.File file, Probe.ExportProps props) throws java.io.IOException
java.io.IOException
public void importData(java.io.File file, boolean explicitTime, boolean overlay) throws java.io.IOException
java.io.IOException
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class ModelAgentBase
public static double getDefaultStartTime()
public static double getDefaultStopTime()
public static double getDefaultScale()
public static double getDefaultUpdateInterval()
public Property getProperty(java.lang.String name)
ModelComponentBase
.
' characters. A sub-property
exists if the value of a property is itself an object which exports
properties. It is only possible to obtain a sub-property handle if each of
its ancestor properties exports their values by reference.getProperty
in interface HasProperties
getProperty
in class ModelComponentBase
name
- name of the desired property or sub-propertypublic double getStartTime()
public void setStartTime(double t)
public double getStopTime()
public void setStopTime(double t)
public double getDuration()
public void setInterval(double startTime, double stopTime)
public void setStartStopTimes(double startTime, double stopTime)
public double getScale()
public void setScale(double s)
public void setScalable(boolean enable)
public boolean isScalable()
public double getUpdateInterval()
public void setUpdateInterval(double t)
public void setName(java.lang.String name)
notifyParentOfChange
with a NameChangeEvent
so that it's
parent can update the name map entry and other ancestors can adjust for
the new name.
Component names can be specified as null. However, if not null, they
should have non-zero length and should not begin with a digit or contain
the characters '.' or '/'. Implementations can use ModelComponentBase.checkName()
to determine if a proposed name is valid.
setName
in interface ModelComponent
setName
in class ModelComponentBase
name
- new component namepublic boolean hasChildren()
hasChildren
in interface HierarchyNode
hasChildren
in class ModelComponentBase
public java.util.Iterator<? extends HierarchyNode> getChildren()
getChildren
in interface HierarchyNode
getChildren
in class ModelComponentBase
public boolean isEventTime(double t)
t
is an event time for this probe.t
- time to querytrue
if t
is an event timepublic double nextEventTime(double t)
t
.t
- reference time for the next eventpublic abstract void apply(double t)
t
to apply this probet
- time at which probe is being appliedpublic boolean isCloneable()
public void save() throws java.io.IOException
java.io.IOException
public void load() throws java.io.IOException
java.io.IOException
public double getVirtualTime(double sec)
public double getClippedVirtualTime(double sec)
public double getTimelineTime(double t)
public void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
ModelComponentBase
write
.scan
in interface ModelComponent
scan
in interface Scannable
scan
in class ModelComponentBase
rtok
- Tokenizer from which to scan the elementref
- optional reference object which can be used for resolving references to
other objectsjava.io.IOException
- if an I/O or formatting error occuredpublic boolean isAttachedFileRelative()
public static java.io.File getFileFromPath(java.lang.String fileName)
public static java.lang.String getPathFromFile(java.io.File file)
public java.io.File getAttachedFile()
public void setAttachedFileName(java.lang.String fileName)
public java.lang.String getAttachedFileName()
public boolean hasAttachedFile()
public void setTrack(int num)
num
- new track numberpublic java.lang.Integer getTrack()
public boolean isInput()
public boolean isSettable()
public void setData(double sec)
public boolean isPrintable()
public void print(double sec)
public boolean hasState()
ModelComponent
hasState
in interface ModelComponent
hasState
in class ModelComponentBase
true
if this component has statepublic ComponentState createState(ComponentState prevState)
HasState
HasState.setState(artisynth.core.modelbase.ComponentState)
and HasState.getState(artisynth.core.modelbase.ComponentState)
. The state object does not have to be set to the component's
current state. If the component does not have any state information,
this method should return an instance of
EmptyState
.prevState
- If non-null, supplies a previous state that
was created by this component and which can be used to provide
pre-sizing hints.public void getState(ComponentState state)
HasState
state
- receives the state informationpublic void setState(ComponentState state)
HasState
state
- state to be copiedpublic void getInitialState(ComponentState newstate, ComponentState oldstate)
HasState
state
. If prevstate
is non-null, then it is
assumed to contain a previous initial state value returned by this
method, and state
should be set to be as consistent with
this previous state as possible. For example, suppose that this component
currently contains subcomponents A, B, and C, while the
prevstate
contains the state from a previous time when it
had components B, C, and D. Then state
should contain
substate values for B and C that are taken from
prevstate
. To facilitate this, the information returned in
state
should contain additional information such as the
identities of all the (current) subcomponents.newstate
- receives the state informationoldstate
- previous state information; may be null
.