Usage:
Loader loader = Loader.create(someElement, LoaderEffect.SOME_EFFECT); loader.start(); // ... do some work loader.stop();
public static Loader create(HTMLElement target, LoaderEffect effect)
target
The target HTMLElement where the loader will be shown.
effect
The loading effect to be applied.
A new Loader instance.
public static Loader create(IsElement<?> target, LoaderEffect effect)
target
The target IsElement where the loader will be shown.
effect
The loading effect to be applied.
A new Loader instance.
public Loader start()
The current Loader instance.
public Loader start(int timeout)
timeout
The time in milliseconds after which the loader should stop automatically.
The current Loader instance.
public Loader stop()
The current Loader instance.
public Loader setLoadingText(String text)
text
The loading text.
The current Loader instance.
public Loader setSize(String width, String height)
width
Width of the loader.
height
Height of the loader.
The current Loader instance.
public Loader setRemoveLoadingText(boolean removeLoadingText)
removeLoadingText
Whether to remove the loading text or not.
The current Loader instance.
public boolean isStarted()
true if the loader is running, otherwise false .
public Loader setLoadingTextPosition(LoadingTextPosition loadingTextPosition)
loadingTextPosition
The desired position for the loading text.
The current Loader instance.
public IsLoader getLoaderElement()
The loader element.