Class FxGridDragSpriteEventHandler

java.lang.Object
org.refcodes.graphical.ext.javafx.FxGridDragSpriteEventHandler
All Implemented Interfaces:
org.refcodes.graphical.DragOpacityAccessor, org.refcodes.graphical.DragOpacityAccessor.DragOpacityBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.DragOpacityAccessor.DragOpacityMutator, org.refcodes.graphical.DragOpacityAccessor.DragOpacityProperty, org.refcodes.graphical.FieldDimension, org.refcodes.graphical.FieldDimension.FieldDimensionAccessor, org.refcodes.graphical.FieldDimension.FieldDimensionBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.FieldDimension.FieldDimensionMutator, org.refcodes.graphical.FieldDimension.FieldDimensionProperty, org.refcodes.graphical.FieldGapAccessor, org.refcodes.graphical.FieldGapAccessor.FieldGapBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.FieldGapAccessor.FieldGapMutator, org.refcodes.graphical.FieldGapAccessor.FieldGapProperty, org.refcodes.graphical.FieldHeightAccessor, org.refcodes.graphical.FieldHeightAccessor.FieldHeightBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.FieldHeightAccessor.FieldHeightMutator, org.refcodes.graphical.FieldHeightAccessor.FieldHeightProperty, org.refcodes.graphical.FieldWidthAccessor, org.refcodes.graphical.FieldWidthAccessor.FieldWidthBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.FieldWidthAccessor.FieldWidthMutator, org.refcodes.graphical.FieldWidthAccessor.FieldWidthProperty, org.refcodes.graphical.MoveModeAccessor, org.refcodes.graphical.MoveModeAccessor.MoveModeBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.MoveModeAccessor.MoveModeMutator, org.refcodes.graphical.MoveModeAccessor.MoveModeProperty, org.refcodes.graphical.Offset, org.refcodes.graphical.Offset.OffsetAccessor, org.refcodes.graphical.Offset.OffsetBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.Offset.OffsetMutator, org.refcodes.graphical.Offset.OffsetProperty, org.refcodes.graphical.OffsetXAccessor, org.refcodes.graphical.OffsetXAccessor.OffsetXBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.OffsetXAccessor.OffsetXMutator, org.refcodes.graphical.OffsetXAccessor.OffsetXProperty, org.refcodes.graphical.OffsetYAccessor, org.refcodes.graphical.OffsetYAccessor.OffsetYBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.OffsetYAccessor.OffsetYMutator, org.refcodes.graphical.OffsetYAccessor.OffsetYProperty, org.refcodes.graphical.SpriteAccessor<javafx.scene.Node>, org.refcodes.mixin.Disposable

public class FxGridDragSpriteEventHandler extends Object implements org.refcodes.graphical.FieldDimension.FieldDimensionProperty, org.refcodes.graphical.FieldDimension.FieldDimensionBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.DragOpacityAccessor.DragOpacityProperty, org.refcodes.graphical.DragOpacityAccessor.DragOpacityBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.SpriteAccessor<javafx.scene.Node>, org.refcodes.graphical.MoveModeAccessor.MoveModeProperty, org.refcodes.graphical.MoveModeAccessor.MoveModeBuilder<FxGridDragSpriteEventHandler>, org.refcodes.graphical.Offset.OffsetProperty, org.refcodes.graphical.Offset.OffsetBuilder<FxGridDragSpriteEventHandler>, org.refcodes.mixin.Disposable
The FxGridDragSpriteEventHandler manages dragging a Node inside a (virtual) grid represented by a Pane aligning that Node according to the grid's field settings. A field has a width, a height and a gap. The actual position of the Node on the Pane is aligned to the nearest grid's position.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.graphical.DragOpacityAccessor

    org.refcodes.graphical.DragOpacityAccessor.DragOpacityBuilder<B extends org.refcodes.graphical.DragOpacityAccessor.DragOpacityBuilder<B>>, org.refcodes.graphical.DragOpacityAccessor.DragOpacityMutator, org.refcodes.graphical.DragOpacityAccessor.DragOpacityProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.FieldDimension

    org.refcodes.graphical.FieldDimension.FieldDimensionAccessor, org.refcodes.graphical.FieldDimension.FieldDimensionBuilder<B extends org.refcodes.graphical.FieldDimension.FieldDimensionBuilder<B>>, org.refcodes.graphical.FieldDimension.FieldDimensionMutator, org.refcodes.graphical.FieldDimension.FieldDimensionProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.FieldGapAccessor

    org.refcodes.graphical.FieldGapAccessor.FieldGapBuilder<B extends org.refcodes.graphical.FieldGapAccessor.FieldGapBuilder<B>>, org.refcodes.graphical.FieldGapAccessor.FieldGapMutator, org.refcodes.graphical.FieldGapAccessor.FieldGapProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.FieldHeightAccessor

    org.refcodes.graphical.FieldHeightAccessor.FieldHeightBuilder<B extends org.refcodes.graphical.FieldHeightAccessor.FieldHeightBuilder<B>>, org.refcodes.graphical.FieldHeightAccessor.FieldHeightMutator, org.refcodes.graphical.FieldHeightAccessor.FieldHeightProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.FieldWidthAccessor

    org.refcodes.graphical.FieldWidthAccessor.FieldWidthBuilder<B extends org.refcodes.graphical.FieldWidthAccessor.FieldWidthBuilder<B>>, org.refcodes.graphical.FieldWidthAccessor.FieldWidthMutator, org.refcodes.graphical.FieldWidthAccessor.FieldWidthProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.MoveModeAccessor

    org.refcodes.graphical.MoveModeAccessor.MoveModeBuilder<B extends org.refcodes.graphical.MoveModeAccessor.MoveModeBuilder<B>>, org.refcodes.graphical.MoveModeAccessor.MoveModeMutator, org.refcodes.graphical.MoveModeAccessor.MoveModeProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.Offset

    org.refcodes.graphical.Offset.OffsetAccessor, org.refcodes.graphical.Offset.OffsetBuilder<B extends org.refcodes.graphical.Offset.OffsetBuilder<B>>, org.refcodes.graphical.Offset.OffsetMutator, org.refcodes.graphical.Offset.OffsetProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.OffsetXAccessor

    org.refcodes.graphical.OffsetXAccessor.OffsetXBuilder<B extends org.refcodes.graphical.OffsetXAccessor.OffsetXBuilder<B>>, org.refcodes.graphical.OffsetXAccessor.OffsetXMutator, org.refcodes.graphical.OffsetXAccessor.OffsetXProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.OffsetYAccessor

    org.refcodes.graphical.OffsetYAccessor.OffsetYBuilder<B extends org.refcodes.graphical.OffsetYAccessor.OffsetYBuilder<B>>, org.refcodes.graphical.OffsetYAccessor.OffsetYMutator, org.refcodes.graphical.OffsetYAccessor.OffsetYProperty

    Nested classes/interfaces inherited from interface org.refcodes.graphical.SpriteAccessor

    org.refcodes.graphical.SpriteAccessor.SpriteBuilder<T extends Object,B extends org.refcodes.graphical.SpriteAccessor.SpriteBuilder<T,B>>, org.refcodes.graphical.SpriteAccessor.SpriteMutator<T extends Object>, org.refcodes.graphical.SpriteAccessor.SpriteProperty<T extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    FxGridDragSpriteEventHandler(javafx.scene.Node aSprite, javafx.scene.layout.Pane aPane)
    Constructs the FxGridDragSpriteEventHandler with the according arguments.
    FxGridDragSpriteEventHandler(javafx.scene.Node aSprite, javafx.scene.layout.Pane aPane, int aOffsetX, int aOffsetY, int aFieldWidth, int aFieldHeight, int aFieldGap)
    Constructs the FxGridDragSpriteEventHandler with the according arguments.
    FxGridDragSpriteEventHandler(javafx.scene.Node aSprite, javafx.scene.layout.Pane aPane, int aOffsetX, int aOffsetY, int aFieldWidth, int aFieldHeight, int aFieldGap, BiConsumer<Integer,Integer> aOffsetChangedListener, BiConsumer<Integer,Integer> aMouseClickedListener)
    Constructs the FxGridDragSpriteEventHandler with the according arguments.
    FxGridDragSpriteEventHandler(javafx.scene.Node aSprite, javafx.scene.layout.Pane aPane, org.refcodes.graphical.Offset aOffset, org.refcodes.graphical.FieldDimension aFieldDimension)
    Constructs the FxGridDragSpriteEventHandler with the according arguments.
    FxGridDragSpriteEventHandler(javafx.scene.Node aSprite, javafx.scene.layout.Pane aPane, org.refcodes.graphical.Offset aOffset, org.refcodes.graphical.FieldDimension aFieldDimension, BiConsumer<Integer,Integer> aOffsetChangedListener, BiConsumer<Integer,Integer> aMouseClickedListener)
    Constructs the FxGridDragSpriteEventHandler with the according arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    double
    int
    Gets the move sprite duration in milliseconds.
    int
    int
    int
    org.refcodes.graphical.MoveMode
    int
    Gets the move sprite duration in milliseconds.
    int
    int
    javafx.scene.Node
    void
    onMouseClicked(BiConsumer<Integer,Integer> aMouseClickedListener)
    Sets the listener being notified upon mouse clicks (alongside the position in the grid of the click).
    void
    onOffsetChanged(BiConsumer<Integer,Integer> aOffsetChangedListener)
    Sets the listener being notified upon offset changes.
    void
    setDragOpacity(double aOpacity)
    void
    setDragSpriteDurationMillis(int aDragSpriteDurationMillis)
    Sets the drag sprite duration in milliseconds.
    void
    setFieldDimension(int aWidth, int aHeight)
    void
    setFieldDimension(int aWidth, int aHeight, int aGap)
    void
    setFieldDimension(org.refcodes.graphical.Dimension aDimension)
    void
    setFieldDimension(org.refcodes.graphical.FieldDimension aDimension)
    void
    setFieldGap(int aFieldGap)
    void
    setFieldHeight(int aHeight)
    void
    setFieldWidth(int aWidth)
    void
    setMoveMode(org.refcodes.graphical.MoveMode aMoveMode)
    void
    setMoveSpriteDurationMillis(int aMoveSpriteDurationMillis)
    Sets the move sprite duration in milliseconds.
    void
    setOffset(int aOffsetX, int aOffsetY)
    void
    setOffset(org.refcodes.graphical.Offset aOffset)
    void
    setOffset(org.refcodes.graphical.Position aOffset)
    void
    setOffsetX(int aOffsetX)
    void
    setOffsetY(int aOffsetY)
    withDragOpacity(double aOpacity)
    withDragSpriteDurationMillis(int aDragSpriteDurationMillis)
    With drag sprite duration in milliseconds.
    withFieldDimension(int aWidth, int aHeight)
    withFieldDimension(int aWidth, int aHeight, int aGap)
    withFieldDimension(org.refcodes.graphical.Dimension aDimension)
    withFieldDimension(org.refcodes.graphical.FieldDimension aDimension)
    withFieldGap(int aFieldGap)
    withFieldHeight(int aHeight)
    withFieldWidth(int aWidth)
    withMoveMode(org.refcodes.graphical.MoveMode aMoveMode)
    withMoveSpriteDurationMillis(int aMoveSpriteDurationMillis)
    With move sprite duration in milliseconds.
    withOffset(int aOffsetX, int aOffsetY)
    withOffset(org.refcodes.graphical.Offset aOffset)
    withOffset(org.refcodes.graphical.Position aOffset)
    withOffsetX(int aOffsetX)
    withOffsetY(int aOffsetY)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.refcodes.graphical.DragOpacityAccessor.DragOpacityProperty

    letDragOpacity

    Methods inherited from interface org.refcodes.graphical.FieldDimension.FieldDimensionProperty

    letFieldDimension, letFieldDimension, letFieldDimension, letFieldDimension

    Methods inherited from interface org.refcodes.graphical.FieldGapAccessor.FieldGapProperty

    letFieldGap

    Methods inherited from interface org.refcodes.graphical.FieldHeightAccessor.FieldHeightProperty

    letFieldHeight

    Methods inherited from interface org.refcodes.graphical.FieldWidthAccessor.FieldWidthProperty

    letFieldWidth

    Methods inherited from interface org.refcodes.graphical.MoveModeAccessor.MoveModeProperty

    letMoveMode

    Methods inherited from interface org.refcodes.graphical.Offset.OffsetProperty

    letOffset, letOffset, letOffset

    Methods inherited from interface org.refcodes.graphical.OffsetXAccessor.OffsetXProperty

    letOffsetX

    Methods inherited from interface org.refcodes.graphical.OffsetYAccessor.OffsetYProperty

    letOffsetY
  • Field Details

    • _posX

      public double _posX
  • Constructor Details

    • FxGridDragSpriteEventHandler

      public FxGridDragSpriteEventHandler(javafx.scene.Node aSprite, javafx.scene.layout.Pane aPane)
      Constructs the FxGridDragSpriteEventHandler with the according arguments.
      Parameters:
      aSprite - The Node to be observed for drag operations and to be aligned as of the grid's field settings.
      aPane - The Pane on which the Node is to be dragged around and onto which a (virtual) grid is projected .
    • FxGridDragSpriteEventHandler

      public FxGridDragSpriteEventHandler(javafx.scene.Node aSprite, javafx.scene.layout.Pane aPane, org.refcodes.graphical.Offset aOffset, org.refcodes.graphical.FieldDimension aFieldDimension)
      Constructs the FxGridDragSpriteEventHandler with the according arguments.
      Parameters:
      aSprite - The Node to be observed for drag operations and to be aligned as of the grid's field settings.
      aPane - The Pane on which the Node is to be dragged around and onto which a (virtual) grid is projected .
      aOffset - The initial grid Offset of the Node as of the grid's field dimensions.
      aFieldDimension - The grid's field FieldDimension.
    • FxGridDragSpriteEventHandler

      public FxGridDragSpriteEventHandler(javafx.scene.Node aSprite, javafx.scene.layout.Pane aPane, org.refcodes.graphical.Offset aOffset, org.refcodes.graphical.FieldDimension aFieldDimension, BiConsumer<Integer,Integer> aOffsetChangedListener, BiConsumer<Integer,Integer> aMouseClickedListener)
      Constructs the FxGridDragSpriteEventHandler with the according arguments.
      Parameters:
      aSprite - The Node to be observed for drag operations and to be aligned as of the grid's field settings.
      aPane - The Pane on which the Node is to be dragged around and onto which a (virtual) grid is projected .
      aOffset - The initial grid Offset of the Node as of the grid's field dimensions.
      aFieldDimension - The grid's field FieldDimension.
      aOffsetChangedListener - The offset changed listener being provided with any offset changes applied (as of dragging the scene).
      aMouseClickedListener - The listener being provided with the grid positions of where the mouse was clicked.
    • FxGridDragSpriteEventHandler

      public FxGridDragSpriteEventHandler(javafx.scene.Node aSprite, javafx.scene.layout.Pane aPane, int aOffsetX, int aOffsetY, int aFieldWidth, int aFieldHeight, int aFieldGap)
      Constructs the FxGridDragSpriteEventHandler with the according arguments.
      Parameters:
      aSprite - The Node to be observed for drag operations and to be aligned as of the grid's field settings.
      aPane - The Pane on which the Node is to be dragged around and onto which a (virtual) grid is projected .
      aOffsetX - The initial grid X offset of the Node as of the grid's field dimensions.
      aOffsetY - The initial grid Y offset of the Node as of the grid's field dimensions.
      aFieldWidth - The grid's field width.
      aFieldHeight - The grid's field height.
      aFieldGap - The grid's field gap.
    • FxGridDragSpriteEventHandler

      public FxGridDragSpriteEventHandler(javafx.scene.Node aSprite, javafx.scene.layout.Pane aPane, int aOffsetX, int aOffsetY, int aFieldWidth, int aFieldHeight, int aFieldGap, BiConsumer<Integer,Integer> aOffsetChangedListener, BiConsumer<Integer,Integer> aMouseClickedListener)
      Constructs the FxGridDragSpriteEventHandler with the according arguments.
      Parameters:
      aSprite - The Node to be observed for drag operations and to be aligned as of the grid's field settings.
      aPane - The Pane on which the Node is to be dragged around and onto which a (virtual) grid is projected .
      aOffsetX - The initial grid X offset of the Node as of the grid's field dimensions.
      aOffsetY - The initial grid Y offset of the Node as of the grid's field dimensions.
      aFieldWidth - The grid's field width.
      aFieldHeight - The grid's field height.
      aFieldGap - The grid's field gap.
      aOffsetChangedListener - The offset changed listener being provided with any offset changes applied (as of dragging the scene).
      aMouseClickedListener - The listener being provided with the grid positions of where the mouse was clicked.
  • Method Details

    • getFieldWidth

      public int getFieldWidth()
      Specified by:
      getFieldWidth in interface org.refcodes.graphical.FieldWidthAccessor
    • getFieldHeight

      public int getFieldHeight()
      Specified by:
      getFieldHeight in interface org.refcodes.graphical.FieldHeightAccessor
    • getFieldGap

      public int getFieldGap()
      Specified by:
      getFieldGap in interface org.refcodes.graphical.FieldGapAccessor
    • setFieldWidth

      public void setFieldWidth(int aWidth)
      Specified by:
      setFieldWidth in interface org.refcodes.graphical.FieldWidthAccessor.FieldWidthMutator
    • withFieldWidth

      public FxGridDragSpriteEventHandler withFieldWidth(int aWidth)
      Specified by:
      withFieldWidth in interface org.refcodes.graphical.FieldWidthAccessor.FieldWidthBuilder<FxGridDragSpriteEventHandler>
    • setFieldHeight

      public void setFieldHeight(int aHeight)
      Specified by:
      setFieldHeight in interface org.refcodes.graphical.FieldHeightAccessor.FieldHeightMutator
    • getOffsetX

      public int getOffsetX()
      Specified by:
      getOffsetX in interface org.refcodes.graphical.OffsetXAccessor
    • getOffsetY

      public int getOffsetY()
      Specified by:
      getOffsetY in interface org.refcodes.graphical.OffsetYAccessor
    • setOffset

      public void setOffset(int aOffsetX, int aOffsetY)
      Specified by:
      setOffset in interface org.refcodes.graphical.Offset.OffsetMutator
    • setOffset

      public void setOffset(org.refcodes.graphical.Offset aOffset)
      Specified by:
      setOffset in interface org.refcodes.graphical.Offset.OffsetMutator
    • setOffset

      public void setOffset(org.refcodes.graphical.Position aOffset)
      Specified by:
      setOffset in interface org.refcodes.graphical.Offset.OffsetMutator
    • setOffsetX

      public void setOffsetX(int aOffsetX)
      Specified by:
      setOffsetX in interface org.refcodes.graphical.OffsetXAccessor.OffsetXMutator
    • setOffsetY

      public void setOffsetY(int aOffsetY)
      Specified by:
      setOffsetY in interface org.refcodes.graphical.OffsetYAccessor.OffsetYMutator
    • withOffsetX

      public FxGridDragSpriteEventHandler withOffsetX(int aOffsetX)
      Specified by:
      withOffsetX in interface org.refcodes.graphical.OffsetXAccessor.OffsetXBuilder<FxGridDragSpriteEventHandler>
    • withOffsetY

      public FxGridDragSpriteEventHandler withOffsetY(int aOffsetY)
      Specified by:
      withOffsetY in interface org.refcodes.graphical.OffsetYAccessor.OffsetYBuilder<FxGridDragSpriteEventHandler>
    • withOffset

      public FxGridDragSpriteEventHandler withOffset(int aOffsetX, int aOffsetY)
      Specified by:
      withOffset in interface org.refcodes.graphical.Offset.OffsetBuilder<FxGridDragSpriteEventHandler>
    • withOffset

      public FxGridDragSpriteEventHandler withOffset(org.refcodes.graphical.Offset aOffset)
      Specified by:
      withOffset in interface org.refcodes.graphical.Offset.OffsetBuilder<FxGridDragSpriteEventHandler>
    • withOffset

      public FxGridDragSpriteEventHandler withOffset(org.refcodes.graphical.Position aOffset)
      Specified by:
      withOffset in interface org.refcodes.graphical.Offset.OffsetBuilder<FxGridDragSpriteEventHandler>
    • withFieldHeight

      public FxGridDragSpriteEventHandler withFieldHeight(int aHeight)
      Specified by:
      withFieldHeight in interface org.refcodes.graphical.FieldHeightAccessor.FieldHeightBuilder<FxGridDragSpriteEventHandler>
    • withFieldDimension

      public FxGridDragSpriteEventHandler withFieldDimension(int aWidth, int aHeight)
      Specified by:
      withFieldDimension in interface org.refcodes.graphical.FieldDimension.FieldDimensionBuilder<FxGridDragSpriteEventHandler>
    • withFieldDimension

      public FxGridDragSpriteEventHandler withFieldDimension(int aWidth, int aHeight, int aGap)
      Specified by:
      withFieldDimension in interface org.refcodes.graphical.FieldDimension.FieldDimensionBuilder<FxGridDragSpriteEventHandler>
    • withFieldDimension

      public FxGridDragSpriteEventHandler withFieldDimension(org.refcodes.graphical.FieldDimension aDimension)
      Specified by:
      withFieldDimension in interface org.refcodes.graphical.FieldDimension.FieldDimensionBuilder<FxGridDragSpriteEventHandler>
    • setFieldDimension

      public void setFieldDimension(int aWidth, int aHeight)
      Specified by:
      setFieldDimension in interface org.refcodes.graphical.FieldDimension.FieldDimensionMutator
    • setFieldDimension

      public void setFieldDimension(int aWidth, int aHeight, int aGap)
      Specified by:
      setFieldDimension in interface org.refcodes.graphical.FieldDimension.FieldDimensionMutator
    • setFieldDimension

      public void setFieldDimension(org.refcodes.graphical.FieldDimension aDimension)
      Specified by:
      setFieldDimension in interface org.refcodes.graphical.FieldDimension.FieldDimensionMutator
    • withFieldDimension

      public FxGridDragSpriteEventHandler withFieldDimension(org.refcodes.graphical.Dimension aDimension)
      Specified by:
      withFieldDimension in interface org.refcodes.graphical.FieldDimension.FieldDimensionBuilder<FxGridDragSpriteEventHandler>
    • setFieldDimension

      public void setFieldDimension(org.refcodes.graphical.Dimension aDimension)
      Specified by:
      setFieldDimension in interface org.refcodes.graphical.FieldDimension.FieldDimensionMutator
    • setFieldGap

      public void setFieldGap(int aFieldGap)
      Specified by:
      setFieldGap in interface org.refcodes.graphical.FieldGapAccessor.FieldGapMutator
    • withFieldGap

      public FxGridDragSpriteEventHandler withFieldGap(int aFieldGap)
      Specified by:
      withFieldGap in interface org.refcodes.graphical.FieldGapAccessor.FieldGapBuilder<FxGridDragSpriteEventHandler>
    • getDragOpacity

      public double getDragOpacity()
      Specified by:
      getDragOpacity in interface org.refcodes.graphical.DragOpacityAccessor
    • setDragOpacity

      public void setDragOpacity(double aOpacity)
      Specified by:
      setDragOpacity in interface org.refcodes.graphical.DragOpacityAccessor.DragOpacityMutator
    • withDragOpacity

      public FxGridDragSpriteEventHandler withDragOpacity(double aOpacity)
      Specified by:
      withDragOpacity in interface org.refcodes.graphical.DragOpacityAccessor.DragOpacityBuilder<FxGridDragSpriteEventHandler>
    • getSprite

      public javafx.scene.Node getSprite()
      Specified by:
      getSprite in interface org.refcodes.graphical.SpriteAccessor<javafx.scene.Node>
    • getMoveMode

      public org.refcodes.graphical.MoveMode getMoveMode()
      Specified by:
      getMoveMode in interface org.refcodes.graphical.MoveModeAccessor
    • setMoveMode

      public void setMoveMode(org.refcodes.graphical.MoveMode aMoveMode)
      Specified by:
      setMoveMode in interface org.refcodes.graphical.MoveModeAccessor.MoveModeMutator
    • withMoveMode

      public FxGridDragSpriteEventHandler withMoveMode(org.refcodes.graphical.MoveMode aMoveMode)
      Specified by:
      withMoveMode in interface org.refcodes.graphical.MoveModeAccessor.MoveModeBuilder<FxGridDragSpriteEventHandler>
    • getDragSpriteDurationMillis

      public int getDragSpriteDurationMillis()
      Gets the move sprite duration in milliseconds.
      Returns:
      the drag sprite duration in milliseconds
    • setDragSpriteDurationMillis

      public void setDragSpriteDurationMillis(int aDragSpriteDurationMillis)
      Sets the drag sprite duration in milliseconds.
      Parameters:
      aDragSpriteDurationMillis - the new drag sprite duration in milliseconds
    • withDragSpriteDurationMillis

      public FxGridDragSpriteEventHandler withDragSpriteDurationMillis(int aDragSpriteDurationMillis)
      With drag sprite duration in milliseconds.
      Parameters:
      aDragSpriteDurationMillis - the drag sprite duration in milliseconds
      Returns:
      this instance as of the builder pattern.
    • getMoveSpriteDurationMillis

      public int getMoveSpriteDurationMillis()
      Gets the move sprite duration in milliseconds.
      Returns:
      the move sprite duration in milliseconds
    • setMoveSpriteDurationMillis

      public void setMoveSpriteDurationMillis(int aMoveSpriteDurationMillis)
      Sets the move sprite duration in milliseconds.
      Parameters:
      aMoveSpriteDurationMillis - the new move sprite duration in milliseconds
    • withMoveSpriteDurationMillis

      public FxGridDragSpriteEventHandler withMoveSpriteDurationMillis(int aMoveSpriteDurationMillis)
      With move sprite duration in milliseconds.
      Parameters:
      aMoveSpriteDurationMillis - the move sprite duration in milliseconds
      Returns:
      this instance as of the builder pattern.
    • onOffsetChanged

      public void onOffsetChanged(BiConsumer<Integer,Integer> aOffsetChangedListener)
      Sets the listener being notified upon offset changes.
      Parameters:
      aOffsetChangedListener - The offset changed listener being provided with any offset changes applied (as of dragging the scene).
    • onMouseClicked

      public void onMouseClicked(BiConsumer<Integer,Integer> aMouseClickedListener)
      Sets the listener being notified upon mouse clicks (alongside the position in the grid of the click).
      Parameters:
      aMouseClickedListener - The listener being provided with the grid positions of where the mouse was clicked.
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.refcodes.mixin.Disposable