java.lang.Object
- All Implemented Interfaces:
Cloneable
Factory for creating a graph view.
This factory provides the same parameters and object-initialization
methods as AbstrGraphViewFactory. The parameters are:
- "initialX" - the initial X coordinate of a GraphView in graph coordinate space.
- "initialY" - the initial Y coordinate of a GraphView in graph coordinate space.
- "xFrameFraction" - the fractional distance from the graph's left offset to its right offset at which the point specifying the X coordinate of a GraphView's location appears. This point's graph coordinate space coordinates are (initialX, initialY).
- "yFrameFraction" - the fractional distance from the graph's lower offset to its upper offset at which the point specifying the Y coordinate of the graph's location appears. This point's graph coordinate space coordinates are (initialX, initialY).
- "scaleX" - the scale factor for the X direction (the amount by which to multiple a distance in graph coordinate space along the X axis to get the corresponding distance in user space).
- "scaleY" - the scale factor for the X direction (the amount by which to multiple a distance in graph coordinate space along the Y axis to get the corresponding distance in user space).
- "zoom" - the zoom level, which must be a positive real number.
- "rotation" - the angle in degrees by which the graph view is rotated about its location. Positive values indicate that the view rotates counterclockwise, corresponding to objects in the view appearing to rotate clockwise.
- "timeline" - an integer-keyed set of values that define
changes in an object as it traverses a path
- "timeline.time" - the time at which timeline parameters are to change (typically measured in seconds, not simulation ticks).
- "timeline.x" - the X coordinate of the reference point at the specified time, provided in graph coordinate space units. If this parameter is not defined for the key, the previous value is not changed.
- "timeline.y" - the Y coordinate of the reference point at the specified time, provided in graph coordinate space units. If this parameter is not defined for the key, the previous value is not changed.
- "timeline.path" - the path that the object should follow.
If 'animation' is the current Animation2D,
animation.nullPath()
will provide a constant path that indicates that the path should no longer be used. If no value is given, the value is not changed. - "timeline.t0" - the initial time interval from the time at which the path is set to the time at which the path traversal starts
- "timeline.u0" - the initial value of the path's parameter (the default is 0.0).
- "timeline.velocity" - the velocity along the path.
- "timeline.acceleration" - the acceleration along the path.
- "timeline.distanceFunction" - a SimFunction object
associated with this animation giving the
distance along the path as a function of time. If
'animation' is the current Animation2D,
animation.nullFunction()
will provide a function that indicates that the current function should no longer be used. If no value is given, the function is not changed. - "timeline.angleFunction" - a SimFunction object
associated with this animation giving the angle
of the object as it moves along the path as a
function of time. If 'animation' is the current
Animation2D,
animation.nullFunction()
will provide a function that indicates that the current function should no longer be used. If no value is given, the function is not changed. The value returned is in radians, not degrees. If a path is currently defined, the time argument treats an argument of zero as the time indicated by the path's "timeline.t0" parameter. Otherwise the argument refers to simulation time. The argument uses double-precision time. - "timeline.zoomMode" - a selector of type
GraphView.ZoomMode indicating which of the following
4 parameters are valid. The values are
SET_VALUE
(indicating the "timeline.zoom" is valid),SET_RATE
(indicating that "timeline.zoomRate is valid), orSET_TARGET
(indicating that "timeline.zoomTarget" and "timeline.zoomInterval" are valid). The default value,KEEP
, indicates that nothing will be changed. - "timeline.zoom" - the zoom level, which must be a
positive real number, to be set at a specified time (see
DirectedObject2DFactory
). This parameter is valid if "timeline.zoomMode" is set toSET_VALUE
; - "timeline.zoomRate" - the zoom rate, to be set at a
specified time. The value of zoom will vary as
exp(timeline.zoomRate * (t - time) where t > time and
where time is value specified by "timeline.time" (see
DirectedObject2DFactory
). This parameter is valid if "timeline.zoomMode" is set toSET_RATE
; - "timeline.zoomTarget" - the desired zoom level, which
must be a positive real number. This parameter is
valid if "timeline.zoomMode" is set to
SET_TARGET
; - "timeline.zoomInterval" - the interval, starting at a
time specified by "timeline.time" (see
DirectedObject2DFactory
) over which the zoom level should change from its value at the the time specified by "timeline.time" to the value specified by "timeline.zoomTarget. This parameter is valid if "timeline.zoomMode" is set toSET_TARGET
; - "timeline.rotation" - the angle in degrees by which the graph view is rotated about its location. Positive values indicate that the view rotates counterclockwise, corresponding to objects in the view appearing to rotate clockwise. If missing, the current value is not changed.
- "timeline.rotationRate" - the rate in degrees per second by which a graph view's rotation angle changes. If missing, the current value is not changed.
- "timeline.traceSetMode" - indicates how the parameter
"timeline.traceSets" is interpretted. the values are
enumeration constants of type
TraceSetMode
and are used as follows:-
KEEP
- keep the existing trace sets, adding additional ones specified by the parameter "timeline.traceSets". -
REMOVE
- remove the trace sets specified by the parameter "timeline.traceSets". -
REPLACE
- remove all existing trace sets and repalce those with the ones specified by the timeline.traceSets parameter.
-
- "timeline.traceSets" - a parameter representing a set of TraceSet objects (the three-argument 'add' method is used to add entries).
- "traceSets" - a set of TraceSets a SimObject will use for tracing. One should use the add and remove factory methods as this parameter refers to a set of values.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bzdev.anim2d.PlacedObject2DFactory
PlacedObject2DFactory.RefPointMode
Nested classes/interfaces inherited from class org.bzdev.obnaming.NamedObjectFactory
NamedObjectFactory.ConfigException, NamedObjectFactory.IndexedSetter, NamedObjectFactory.ParmNameIterator
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for service provider.Constructor. -
Method Summary
Methods inherited from class org.bzdev.anim2d.AbstrGraphViewFactory
addToTimelineRequest, clear, initObject
Methods inherited from class org.bzdev.anim2d.DirectedObject2DFactory
setDefaultAngleRelative
Methods inherited from class org.bzdev.anim2d.PlacedObject2DFactory
mayIgnoreTimelineAngle
Methods inherited from class org.bzdev.anim2d.AnimationObject2DFactory
getAnimation, getVisibility, getZorder, setAnimationObjectDefaults
Methods inherited from class org.bzdev.devqsim.SimObjectFactory
addToTimelineResponse, getSimulation
Methods inherited from class org.bzdev.obnaming.NamedObjectFactory
add, add, add, add, add, add, add, add, addDocResourceBundle, addDocResourceBundle, addJDoc, addJDoc, addLabelResourceBundle, addLabelResourceBundle, addTipResourceBundle, addTipResourceBundle, arrayInit, canAdd3, clear, configure, configureSupported, containsParm, createObject, createObject, createObject, createObject, createObjects, createObjects, createObjects, createObjects, createObjects, createObjects, doAfterInits, endObjectCreation, getDoc, getFactoryClass, getGLB, getLabel, getLayoutResource, getListedFactories, getLUB, getNextName, getNextNameIndex, getObjectNamer, getParmKeyType, getParmPrefix, getRVMode, getTemplateKeyMap, getTemplateKeyMapForFactories, getTemplateKeyMapForFactories, getTemplateKeyMapForFactories, getTip, getType, glbInRange, initParm, initParms, initParms, isClearOnly, isNamedObject, isRandomVariable, keyType, lubInRange, mustAdd, newConfigExceptionInstance, newConfigExceptionInstance, newConfigExceptionInstance, newConfigExceptionInstance, newConfigExceptionInstance, newConfigExceptionInstance, newConfigExceptionInstance, newInstance, newInstance, parmNames, parmNameSet, parmPrefixes, remove, remove, remove, remove, remove, remove, remove, remove, removeParm, removeParms, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setDocAPIBase, setInterned, setLayoutResource, setLayoutResource, setNameRoot, setTarget, startObjectCreation, unset, unset, unset, unset, unset, unset, willIntern
-
Constructor Details
-
GraphViewFactory
Constructor.- Parameters:
a2d
- the animation
-
GraphViewFactory
public GraphViewFactory()Constructor for service provider. This constructor should not be used directly. It is necessary because of the introduction of modules in Java 9, and is used by a service provider that allows factories to be listed, possibly with documentation regarding their parameters. It jst calls the default constructor with a null argument.
-
-
Method Details
-
newObject
Description copied from class:NamedObjectFactory
Construct a new object. The object will not be initialized. This method is called bycreateObject()
andcreateObjects
unless these methods are overridden. Subclasses should callwillIntern()
to determine if the object will interned or not, andgetObjectNamer()
to find the object namer. Some subclasses (e.g., org.devqsim.SimObjectFactory) provide a method that will return the object namer cast to the type needed by constructors. In the case of SimObjectFactory, this method is named getSimulation(). For a subclass of SimObjectFactory to create a new object of typeFoo
,newObject
will execute the expression
or an equivalent expression, wherenew Foo(getSimulation(), name, willIntern())
name
is the argument passed tonewObject
.- Specified by:
newObject
in classNamedObjectFactory<AnimationObject2DFactory<GraphView>,
Simulation, SimObject, GraphView> - Parameters:
name
- the name of the object to be created- Returns:
- the new object
- See Also:
-