Module org.bzdev.anim2d
Package org.bzdev.anim2d
Class AbstrAnimShape2DFactory<Obj extends AnimationShape2D>
java.lang.Object
org.bzdev.obnaming.NamedObjectFactory<F,Simulation,SimObject,OBJ>
org.bzdev.devqsim.SimObjectFactory<AnimationObject2DFactory<Obj>,Animation2D,Obj>
org.bzdev.anim2d.AnimationObject2DFactory<Obj>
org.bzdev.anim2d.AbstrAnimShape2DFactory<Obj>
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
AnimationShape2DFactory
public abstract class AbstrAnimShape2DFactory<Obj extends AnimationShape2D>
extends AnimationObject2DFactory<Obj>
Abstract factory for animation shapes.
In addition to controlling the stacking order (z-order) and visibility,
this factory can configure an animation shape by adding animation paths
to. Each path provides part of a shape's outline. A winding rule is used
to determine which paths represent an interior or exterior boundary for
the shape. The Z-order and visibility will be ignored by animation layers.
When an animation shape is used as part of an animation layer, its
visibility should be set to
false
, which is the default for
this factory.
This factory provides a method
set(String,int,Object)
that will accept
instances of Shape
, PathIterator
,
String
, and AnimationPath2D
as its third argument. If a
string is provided, the string must be the name of an instance of
AnimationPath2D
associated with the factory's animation.
The factory parameters this factory provides are the same as the parameters
provided by its subclass AnimationShape2DFactory
(the documentation for
object.type
describes which "object" parameters are used for a given type):
- See Also:
-
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.void
Clear keys by removing all keys associated with a parameter name or restore a parameter to its default value.protected void
initObject
(Obj obj) Initialize an object.void
Remove an entry with an index from a set of integers.void
Set a value provided as a Shape, PathIterator, AnimationPath2D, or any of the other objects supported by factories, given an index.void
Unset an entry with an index and restore it to the default value.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, 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, 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, willIntern
-
Constructor Details
-
AbstrAnimShape2DFactory
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 AnimationShape2D>
-
clear
Description copied from class:NamedObjectFactory
Clear keys by removing all keys associated with a parameter name or restore a parameter to its default value.- Overrides:
clear
in classNamedObjectFactory<AnimationObject2DFactory<Obj extends AnimationShape2D>,
Simulation, SimObject, Obj extends AnimationShape2D> - Parameters:
name
- the name of the entry
-
remove
Description copied from class:NamedObjectFactory
Remove an entry with an index from a set of integers.- Overrides:
remove
in classNamedObjectFactory<AnimationObject2DFactory<Obj extends AnimationShape2D>,
Simulation, SimObject, Obj extends AnimationShape2D> - Parameters:
name
- the name of the entrykey
- the key
-
unset
Description copied from class:NamedObjectFactory
Unset an entry with an index and restore it to the default value.- Overrides:
unset
in classNamedObjectFactory<AnimationObject2DFactory<Obj extends AnimationShape2D>,
Simulation, SimObject, Obj extends AnimationShape2D> - Parameters:
name
- the name of the entryindex
- the index for the entry
-
set
Set a value provided as a Shape, PathIterator, AnimationPath2D, or any of the other objects supported by factories, given an index. When the name is "shape", the value can be a Shape, PathIterator, or AnimationPath2D. Otherwise it can be any type acceptable for the entry name.- Parameters:
name
- the name of the entrykey
- the indexvalue
- the object providing or specifying a value- Throws:
NamedObjectFactory.ConfigException
- an exception encapsulating an IllegalArgumentException if an argument is out of bounds or the name does not match a parameter; an UnsupportedOperationException if the factory does not allow this method to be used; an IllegalStateException if the factory is not in a state for which this value may be parsed and entered; IndexOutOfBoundsException if the index is not in a legal rangeIllegalArgumentException
- the value had the wrong type
-
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 AnimationShape2D>
- Parameters:
obj
- the object to initialize
-