S - the generic type of the identifier for which the sprite is to be
created.org.refcodes.factory.ContextLookupFactory<IMG,S,CBV>, org.refcodes.checkerboard.SpriteFactory<Node,S,FxCheckerboardViewer<?,S>>AbstractFxSpriteFactorypublic interface FxSpriteFactory<S> extends org.refcodes.checkerboard.SpriteFactory<Node,S,FxCheckerboardViewer<?,S>>
FxCheckerboardViewer.| Modifier and Type | Method | Description |
|---|---|---|
Node |
createInstance(S aIdentifier,
FxCheckerboardViewer<?,S> aContext) |
Some words when using the
FxCheckerboardViewerImpl implementation
of the FxCheckerboardViewer: In case you return a Node
for the provided identifier being the same instance as a previously
created Node for the same previously provided identifier, then
the Node is just redrawn by the FxCheckerboardViewerImpl
(preventing fading out / fading in when updating the Node). |
Node createInstance(S aIdentifier, FxCheckerboardViewer<?,S> aContext)
FxCheckerboardViewerImpl implementation
of the FxCheckerboardViewer: In case you return a Node
for the provided identifier being the same instance as a previously
created Node for the same previously provided identifier, then
the Node is just redrawn by the FxCheckerboardViewerImpl
(preventing fading out / fading in when updating the Node). If
another instance is returned, then the previously set Node is
removed (fade out) before the newly created Node is added (fade
in) by the FxCheckerboardViewerImpl. You may use a Map
(WeakHashMap) for relating the identifier to the according
Node in order to identify whether to create a new Node or
update an existing one. Copyright © 2021. All rights reserved.