java.lang.Object
org.refcodes.checkerboard.alt.javafx.FxChessboardFactory
All Implemented Interfaces:
FxBackgroundFactory, org.refcodes.checkerboard.BackgroundFactory<javafx.scene.Node>, org.refcodes.factory.ContextTypeFactory<javafx.scene.Node,org.refcodes.graphical.Raster>

public class FxChessboardFactory extends Object implements FxBackgroundFactory
A FxBackgroundFactory creating checkerboard Node backgrounds.
  • Constructor Details

    • FxChessboardFactory

      public FxChessboardFactory()
  • Method Details

    • withEvenFieldColor

      public FxChessboardFactory withEvenFieldColor(javafx.scene.paint.Color aEvenFieldColor)
      Builder method for the even field color.
      Parameters:
      aEvenFieldColor - the a even field color
      Returns:
      the FxChessboardFactory as of the builder pattern.
    • withOddFieldColor

      public FxChessboardFactory withOddFieldColor(javafx.scene.paint.Color aOddFieldColor)
      Builder method for the odd field color.
      Parameters:
      aOddFieldColor - the a odd field color
      Returns:
      the FxChessboardFactory as of the builder pattern.
    • withFieldGapColor

      public FxChessboardFactory withFieldGapColor(javafx.scene.paint.Color aFieldGapColor)
      Builder method for the field gap color.
      Parameters:
      aFieldGapColor - the a field gap color
      Returns:
      the FxChessboardFactory as of the builder pattern.
    • getEvenFieldColor

      public javafx.scene.paint.Color getEvenFieldColor()
      Gets the even field color.
      Returns:
      the even field color
    • setEvenFieldColor

      public void setEvenFieldColor(javafx.scene.paint.Color eEvenFieldColor)
      Sets the even field color.
      Parameters:
      eEvenFieldColor - the new even field color
    • getOddFieldColor

      public javafx.scene.paint.Color getOddFieldColor()
      Gets the odd field color.
      Returns:
      the odd field color
    • setOddFieldColor

      public void setOddFieldColor(javafx.scene.paint.Color aOddFieldColor)
      Sets the odd field color.
      Parameters:
      aOddFieldColor - the new odd field color
    • setFieldGapColor

      public void setFieldGapColor(javafx.scene.paint.Color aFieldGapColor)
      Sets the field gap color.
      Parameters:
      aFieldGapColor - the new field gap color
    • getFieldGapColor

      public javafx.scene.paint.Color getFieldGapColor()
      Gets the field gap color.
      Returns:
      the field gap color
    • createInstance

      public javafx.scene.Node createInstance(org.refcodes.graphical.Raster aContext)
      Specified by:
      createInstance in interface org.refcodes.factory.ContextTypeFactory<javafx.scene.Node,org.refcodes.graphical.Raster>