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 theFxCheckerboardViewer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javafx.scene.NodecreateInstance(S aIdentifier, FxCheckerboardViewer<?,S> aContext)Some words when using theFxCheckerboardViewerImplimplementation 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 theFxCheckerboardViewerImpl(preventing fading out / fading in when updating theNode).
-
-
-
Method Detail
-
createInstance
javafx.scene.Node createInstance(S aIdentifier, FxCheckerboardViewer<?,S> aContext)
Some words when using theFxCheckerboardViewerImplimplementation 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 theFxCheckerboardViewerImpl(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 theFxCheckerboardViewerImpl. 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>>
-
-