Class AbstrAnimLayer2DFactory<Obj extends AnimationLayer2D>
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
AnimationLayer2DFactory
In addition to controlling the stacking order (z-order) and visibility, this factory can configure an animation layer by providing the ability to add standard graphic objects to it, including the following:
- Arcs.
- Cubic curves.
- Ellipses.
- Images. (The actual image is specified via a URL, and may be scaled, translated, and rotated as desired).
- Lines.
- Quadratic paths.
- Rectangles.
- Round Rectangles.
- Spline paths. (A subclass of
Path2D.Double
that can use splines to provide smooth curves through a specified set of points.) - Text.
While there are a few factory parameters that apply to an animation
layer as a whole, most of the parameters are subparameters of the
object
parameter. These parameters have integer keys,
with the parameter object.type
indicating the type of
object. For each type, a specific set of subparameters is used.
With the exception of spline paths, each object is
represented by a set of parameters with a common integer-valued
key. For spline paths, the keys are also integer-valued, but multiple
keys are needed to describe a path. Each path is
delimited by entries with a PATH_START
and
PATH_END
object type. In between are a series of path
segments separated by entries with a SEG_END
,
SEG_END_PREV
, SEG_END_NEXT
or
SEG_CLOSE
object type.
Each segment can optionally contain one or two control points (the
object type is CONTROL_POINT
, corresponding to
quadratic or cubic Bézier curves. Alternatively, a path
segment can contain a series of entries whose object type is
SPLINE_POINT
or SPLINE_FUNCTION
.
The allowed sequences of object.type values for these paths are shown
in the following diagram:

The factory parameters this factory provides are the same as the parameters
provided by its subclass AnimationLayer2DFactory
(the documentation for
object.type
describes which "object" parameters are used for a given type):
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bzdev.obnaming.NamedObjectFactory
NamedObjectFactory.ConfigException, NamedObjectFactory.IndexedSetter, NamedObjectFactory.ParmNameIterator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear all entries and restore to default values.protected void
initObject
(Obj object) Initialize an object.Methods inherited from class org.bzdev.anim2d.AnimationObject2DFactory
addToTimelineRequest, 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, newObject, 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
-
AbstrAnimLayer2DFactory
Constructor.- Parameters:
a2d
- the animation
-
-
Method Details
-
clear
public void clear()Description copied from class:NamedObjectFactory
Clear all entries and restore to default values. Note: each subclass that implements this method should callsuper.clear()
. Any subclass that defines parameters should call this method in order to restore the parameters to their default values. When an annotation processor is used for some parameters, those parameters can be restored to their default value by calling the parm manager's setDefaults method with the factory as its argument.- Overrides:
clear
in classAnimationObject2DFactory<Obj extends AnimationLayer2D>
-
initObject
Description copied from class:NamedObjectFactory
Initialize an object. This method will call the methods for the object necessary to initialize it based on how the factory was configured, and is called bycreateObject()
andcreateObjects
unless these methods are overridden. The default method does nothing. Subclasses that override this method to provide subclass-specific initializations must start with the statement "super.initObject(object);
".- Overrides:
initObject
in classAnimationObject2DFactory<Obj extends AnimationLayer2D>
- Parameters:
object
- the object to initialize
-