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.NodecreateInstance(S aIdentifier, FxCheckerboardViewer<?, S> aContext) Some words when using theFxCheckerboardViewerimplementation of theFxCheckerboardViewer: In case you return aNodefor the provided identifier being the same instance as a previously createdNodefor the same previously provided identifier, then theNodeis just redrawn by theFxCheckerboardViewer(preventing fading out / fading in when updating theNode).Methods inherited from interface org.refcodes.factory.ContextLookupFactory
createInstance
-
Method Details
-
createInstance
Some words when using theFxCheckerboardViewerimplementation of theFxCheckerboardViewer: In case you return aNodefor the provided identifier being the same instance as a previously createdNodefor the same previously provided identifier, then theNodeis just redrawn by theFxCheckerboardViewer(preventing fading out / fading in when updating theNode). If another instance is returned, then the previously setNodeis removed (fade out) before the newly createdNodeis added (fade in) by theFxCheckerboardViewer. You may use aMap(WeakHashMap) for relating the identifier to the accordingNodein order to identify whether to create a newNodeor update an existing one.- Specified by:
createInstancein interfaceorg.refcodes.factory.ContextLookupFactory<javafx.scene.Node,S, FxCheckerboardViewer<?, S>>
-