public class LoadingIndicator extends Object
The loading indicator has four states: "triggered", "first", "second" and
"third". When trigger() is called the indicator moves to its
"triggered" state and then transitions from one state to the next when the
timeouts specified using the set*StateDelay methods occur.
| Constructor and Description |
|---|
LoadingIndicator() |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureTriggered()
Triggers displaying of this loading indicator unless it's already visible
or scheduled to be shown after a delay.
|
elemental.dom.Element |
getElement()
Returns the root element of the loading indicator.
|
int |
getFirstDelay()
Returns the delay (in ms) which must pass before the loading indicator
moves into the "first" state and is shown to the user
|
int |
getSecondDelay()
Returns the delay (in ms) which must pass before the loading indicator
moves to its "second" state.
|
int |
getThirdDelay()
Returns the delay (in ms) which must pass before the loading indicator
moves to its "third" state.
|
void |
hide()
Hides the loading indicator (if visible).
|
boolean |
isApplyDefaultTheme()
Returns whether the default theming should be applied for the loading indicator or not.
|
boolean |
isVisible()
Returns whether or not the loading indicator is showing.
|
void |
setApplyDefaultTheme(boolean applyDefaultTheme)
Sets whether the default theming should be applied for the loading indicator or not.
|
void |
setFirstDelay(int firstDelay)
Sets the delay (in ms) which must pass before the loading indicator moves
into the "first" state and is shown to the user
|
void |
setSecondDelay(int secondDelay)
Sets the delay (in ms) which must pass before the loading indicator moves
to its "second" state.
|
void |
setThirdDelay(int thirdDelay)
Sets the delay (in ms) which must pass before the loading indicator moves
to its "third" state.
|
void |
show()
Shows the loading indicator in its standard state and triggers timers for
transitioning into the "second" and "third" states.
|
void |
trigger()
Triggers displaying of this loading indicator.
|
public int getFirstDelay()
trigger() is called.public void setFirstDelay(int firstDelay)
firstDelay - The delay (in ms) until moving into the "first" state. Counted
from when trigger() is called.public int getSecondDelay()
trigger() is called.public void setSecondDelay(int secondDelay)
secondDelay - The delay (in ms) until the loading indicator moves into its
"second" state. Counted from when trigger() is
called.public int getThirdDelay()
trigger() is called.public void setThirdDelay(int thirdDelay)
thirdDelay - The delay (in ms) from the event until changing the loading
indicator into its "third" state. Counted from when
trigger() is called.public void trigger()
show() when the "first" delay (as specified
by getFirstDelay()) has passed.
The loading indicator will be hidden if shown when calling this method.
public void ensureTriggered()
public void show()
public void hide()
public boolean isVisible()
public elemental.dom.Element getElement()
public void setApplyDefaultTheme(boolean applyDefaultTheme)
Default is true.
applyDefaultTheme - true for applying the default theming, false for notpublic boolean isApplyDefaultTheme()
Default is true.
true for applying the default theming, false for notCopyright © 2000–2022 Vaadin Ltd. All rights reserved.