Class AbstractFxSpriteFactory<S,NF extends AbstractFxSpriteFactory<S,NF>>
- java.lang.Object
-
- org.refcodes.checkerboard.alt.javafx.AbstractFxSpriteFactory<S,NF>
-
- Type Parameters:
S- the generic typeNF- the generic type
- All Implemented Interfaces:
FxSpriteFactory<S>,org.refcodes.checkerboard.SpriteFactory<javafx.scene.Node,S,FxCheckerboardViewer<?,S>>,org.refcodes.factory.ContextLookupFactory<javafx.scene.Node,S,FxCheckerboardViewer<?,S>>
public abstract class AbstractFxSpriteFactory<S,NF extends AbstractFxSpriteFactory<S,NF>> extends java.lang.Object implements FxSpriteFactory<S>
A factory for creating AbstractFxSprite objects.
-
-
Constructor Summary
Constructors Constructor Description AbstractFxSpriteFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetOpacity()Gets the opacity.doublegetScaleFactor()Gets the scale factor.protected static doublegetScaleX(javafx.scene.Node aSprite, FxCheckerboardViewer<?,?> aCheckerboard)Gets the scale X.protected static doublegetScaleY(javafx.scene.Node aSprite, FxCheckerboardViewer<?,?> aCheckerboard)Gets the scale Y.protected javafx.scene.NodeinitSprite(javafx.scene.Node aSprite, FxCheckerboardViewer<?,?> aCheckerboard)Inits the sprite.voidsetOpacity(double aOpacity)Sets the opacity.voidsetScaleFactor(double aScaleFactor)Sets the scale factor.NFwithOpacity(double aOpacity)With opacity.NFwithScaleFactor(double aScaleFactor)With scale factor.
-
-
-
Method Detail
-
getScaleFactor
public double getScaleFactor()
Gets the scale factor.- Returns:
- the scale factor
-
setScaleFactor
public void setScaleFactor(double aScaleFactor)
Sets the scale factor.- Parameters:
aScaleFactor- the new scale factor
-
withScaleFactor
public NF withScaleFactor(double aScaleFactor)
With scale factor.- Parameters:
aScaleFactor- the scale factor- Returns:
- the nf
-
getOpacity
public double getOpacity()
Gets the opacity.- Returns:
- the opacity
-
setOpacity
public void setOpacity(double aOpacity)
Sets the opacity.- Parameters:
aOpacity- the new opacity
-
withOpacity
public NF withOpacity(double aOpacity)
With opacity.- Parameters:
aOpacity- the opacity- Returns:
- the nf
-
getScaleX
protected static double getScaleX(javafx.scene.Node aSprite, FxCheckerboardViewer<?,?> aCheckerboard)Gets the scale X.- Parameters:
aSprite- the spriteaCheckerboard- the checkerboard- Returns:
- the scale X
-
getScaleY
protected static double getScaleY(javafx.scene.Node aSprite, FxCheckerboardViewer<?,?> aCheckerboard)Gets the scale Y.- Parameters:
aSprite- the spriteaCheckerboard- the checkerboard- Returns:
- the scale Y
-
initSprite
protected javafx.scene.Node initSprite(javafx.scene.Node aSprite, FxCheckerboardViewer<?,?> aCheckerboard)Inits the sprite.- Parameters:
aSprite- the spriteaCheckerboard- the checkerboard- Returns:
- the node
-
-