Module MaterialFX

Interface IRippleGenerator<T extends IRipple>

Type Parameters:
T - the type of accepted ripples
All Known Implementing Classes:
AbstractMFXRippleGenerator, MFXCircleRippleGenerator

public interface IRippleGenerator<T extends IRipple>
Public API for every ripple generator.
  • Method Details

    • getRegion

      Region getRegion()
      Returns:
      the region on which the ripple will be generated
    • defaultClipSupplier

      void defaultClipSupplier()
      Every ripple generator should have a default clip supplier.
    • getClipSupplier

      Supplier<Shape> getClipSupplier()
      Returns:
      the current generator's clip supplier
    • setClipSupplier

      void setClipSupplier(Supplier<Shape> clipSupplier)
      Sets the generator's clip supplier to the specified one.

      This is responsible for creating the clip node of the generator, which is built and set everytime the ripple is generated, before the animation is started, and defines the bounds beyond which the ripple must not go.

      Although the supplier accepts any Shape it is highly recommended to build clips using RippleClipTypeFactory.

    • defaultPositionFunction

      void defaultPositionFunction()
      Every ripple generator should have a default position for the ripples.
    • getRipplePositionFunction

      Function<MouseEvent,PositionBean> getRipplePositionFunction()
      Returns:
      the current generator's position function
    • setRipplePositionFunction

      void setRipplePositionFunction(Function<MouseEvent,PositionBean> positionFunction)
      Sets the generator's ripple position function to the specified one.

      This Function is responsible for computing the ripple's x and y coordinates before the animation is played. The function takes a MouseEvent as the input (since in most controls the coordinates are the x and y coordinates of the mouse event) and returns a PositionBean bean.

    • defaultRippleSupplier

      void defaultRippleSupplier()
      Every ripple generator should have a default ripple supplier.
    • getRippleSupplier

      Supplier<T> getRippleSupplier()
      Returns:
      the current generator's ripple supplier
    • setRippleSupplier

      void setRippleSupplier(Supplier<T> rippleSupplier)
      Sets the generator's ripple supplier to the specified one.

      This Supplier is responsible for creating the ripple shape before the animation is played.