public static class JFXTemplateBuilder.JFXAnimationObjectMapBuilder<N> extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ANIMATION_OBJECT_NAME |
public static final String DEFAULT_ANIMATION_OBJECT_NAME
public static <N> JFXTemplateBuilder.JFXAnimationObjectMapBuilder<N> builder()
@SafeVarargs public final JFXTemplateBuilder.JFXAnimationObjectMapBuilder<N> defaultObject(N animationObject, N... animationObjects)
Node, which is created when the
JFXAnimationTemplate is created:
JFXAnimationTemplate.create()
To set another type use the JFXAnimationTemplate.create(Class) method:
JFXAnimationTemplate.create(MyType.class)
The default objects can be used in every action(...) method:
.action(b -> b.target(defaultNode -> defaultNode.scaleXProperty(), Node::scaleYProperty).endValue(1))
If this method is called multiple times, all animation objects will be added to the animationObjects.animationObject - the first animation object.animationObjects - rest of animation objects.JFXTemplateBuilder.JFXAnimationObjectMapBuilder instance.public JFXTemplateBuilder.JFXAnimationObjectMapBuilder<N> defaultObjectsOf(Collection<N> animationObjects)
defaultObject(Object, Object[]) but with a Collection of
animation objects.animationObjects - the animation objects.JFXTemplateBuilder.JFXAnimationObjectMapBuilder instance.defaultObject(Object, Object[])public JFXTemplateBuilder.JFXAnimationObjectMapBuilder<N> namedObject(String name, Object animationObject, Object... animationObjects)
defaultObject(Object,
Object[]).Define a named animation object like (in this case e.g. also with a default animation object):
.build(b -> b.defaultObject(button).namedObject("label", label)))
In our JFXAnimationTemplate we have e.g. two action(...) methods where the first uses
the default animation object.
.action(b -> b.target(defaultObject -> defaultObject.translateYProperty()).endValue(0))
.action(b -> b.withAnimationObject(Label.class, "label").target(label -> label.translateYProperty()).endValue(5))
If this method is called multiple times with the same name, all animation objects will be
added to the animationObjects.name - the unique name of the named animation objects.animationObject - the first animation object.animationObjects - rest of animation objects.JFXTemplateBuilder.JFXAnimationObjectMapBuilder instance.public JFXTemplateBuilder.JFXAnimationObjectMapBuilder<N> namedObjectsOf(String name, Collection<Object> animationObjects)
namedObject(String, Object, Object...) but with a Collection
of animation objects.name - the unique name of the named animation objects.animationObjects - the animation objects.JFXTemplateBuilder.JFXAnimationObjectMapBuilder instance.namedObject(String, Object, Object...)public JFXTemplateBuilder.JFXAnimationObjectMapBuilder<N> namedObjectsOf(Map<String,Collection<Object>> animationObjects)
namedObjectsOf(String, Collection) but with a Map of
animation objects.animationObjects - the animation objects.JFXTemplateBuilder.JFXAnimationObjectMapBuilder instance.namedObjectsOf(String, Collection)public Map<String,Collection<Object>> getAnimationObjects()
animationObjects.animationObjects.