Interface FxSpriteFactory<S>
- Type Parameters:
S
- the generic type of the identifier for which the sprite is to be created.
- All Superinterfaces:
org.refcodes.factory.ContextLookupFactory<javafx.scene.Node,
,S, FxCheckerboardViewer<?, S>> org.refcodes.checkerboard.SpriteFactory<javafx.scene.Node,
S, FxCheckerboardViewer<?, S>>
- All Known Implementing Classes:
AbstractFxSpriteFactory
public interface FxSpriteFactory<S>
extends org.refcodes.checkerboard.SpriteFactory<javafx.scene.Node,S,FxCheckerboardViewer<?,S>>
A factory for creating sprites for the
FxCheckerboardViewer
.-
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.Node
create
(S aIdentifier, FxCheckerboardViewer<?, S> aContext) Some words when using theFxCheckerboardViewer
implementation of theFxCheckerboardViewer
: In case you return aNode
for the provided identifier being the same instance as a previously createdNode
for the same previously provided identifier, then theNode
is just redrawn by theFxCheckerboardViewer
(preventing fading out / fading in when updating theNode
).Methods inherited from interface org.refcodes.factory.ContextLookupFactory
create
-
Method Details
-
create
Some words when using theFxCheckerboardViewer
implementation of theFxCheckerboardViewer
: In case you return aNode
for the provided identifier being the same instance as a previously createdNode
for the same previously provided identifier, then theNode
is just redrawn by theFxCheckerboardViewer
(preventing fading out / fading in when updating theNode
). If another instance is returned, then the previously setNode
is removed (fade out) before the newly createdNode
is added (fade in) by theFxCheckerboardViewer
. You may use aMap
(WeakHashMap
) for relating the identifier to the accordingNode
in order to identify whether to create a newNode
or update an existing one.- Specified by:
create
in interfaceorg.refcodes.factory.ContextLookupFactory<javafx.scene.Node,
S, FxCheckerboardViewer<?, S>>
-