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 Type
    Method
    Description
    javafx.scene.Node
    createInstance(S aIdentifier, FxCheckerboardViewer<?,S> aContext)
    Some words when using the FxCheckerboardViewer 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 FxCheckerboardViewer (preventing fading out / fading in when updating the Node).

    Methods inherited from interface org.refcodes.factory.ContextLookupFactory

    createInstance
  • Method Details

    • createInstance

      javafx.scene.Node createInstance(S aIdentifier, FxCheckerboardViewer<?,S> aContext)
      Some words when using the FxCheckerboardViewer 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 FxCheckerboardViewer (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 FxCheckerboardViewer. 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.
      Specified by:
      createInstance in interface org.refcodes.factory.ContextLookupFactory<javafx.scene.Node,S,FxCheckerboardViewer<?,S>>