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 Summary
Modifier and TypeMethodDescriptionvoidEvery ripple generator should have a default clip supplier.voidEvery ripple generator should have a default position for the ripples.voidEvery ripple generator should have a default ripple supplier.voidsetClipSupplier(Supplier<Shape> clipSupplier) Sets the generator's clip supplier to the specified one.voidsetRipplePositionFunction(Function<MouseEvent, PositionBean> positionFunction) Sets the generator's ripple position function to the specified one.voidsetRippleSupplier(Supplier<T> rippleSupplier) Sets the generator's ripple supplier to the specified one.
-
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
- Returns:
- the current generator's clip supplier
-
setClipSupplier
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
Shapeit is highly recommended to build clips usingRippleClipTypeFactory. -
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
Sets the generator's ripple position function to the specified one.This
Functionis 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 aPositionBeanbean. -
defaultRippleSupplier
void defaultRippleSupplier()Every ripple generator should have a default ripple supplier. -
getRippleSupplier
- Returns:
- the current generator's ripple supplier
-
setRippleSupplier
Sets the generator's ripple supplier to the specified one.This
Supplieris responsible for creating the ripple shape before the animation is played.
-