com.vaadin.client
Class VLoadingIndicator

java.lang.Object
  extended by com.vaadin.client.VLoadingIndicator

public class VLoadingIndicator
extends java.lang.Object

Class representing the loading indicator for Vaadin applications. 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.

Since:
7.1
Author:
Vaadin Ltd

Constructor Summary
VLoadingIndicator()
           
 
Method Summary
 ApplicationConnection getConnection()
          Returns the ApplicationConnection which uses this loading indicator
 com.google.gwt.user.client.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 isVisible()
          Returns whether or not the loading indicator is showing.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VLoadingIndicator

public VLoadingIndicator()
Method Detail

getFirstDelay

public 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

Returns:
The delay (in ms) until moving into the "first" state. Counted from when trigger() is called.

setFirstDelay

public 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

Parameters:
firstDelay - The delay (in ms) until moving into the "first" state. Counted from when trigger() is called.

getSecondDelay

public int getSecondDelay()
Returns the delay (in ms) which must pass before the loading indicator moves to its "second" state.

Returns:
The delay (in ms) until the loading indicator moves into its "second" state. Counted from when trigger() is called.

setSecondDelay

public void setSecondDelay(int secondDelay)
Sets the delay (in ms) which must pass before the loading indicator moves to its "second" state.

Parameters:
secondDelay - The delay (in ms) until the loading indicator moves into its "second" state. Counted from when trigger() is called.

getThirdDelay

public int getThirdDelay()
Returns the delay (in ms) which must pass before the loading indicator moves to its "third" state.

Returns:
The delay (in ms) until the loading indicator moves into its "third" state. Counted from when trigger() is called.

setThirdDelay

public void setThirdDelay(int thirdDelay)
Sets the delay (in ms) which must pass before the loading indicator moves to its "third" state.

Parameters:
thirdDelay - The delay (in ms) from the event until changing the loading indicator into its "third" state. Counted from when trigger() is called.

trigger

public void trigger()
Triggers displaying of this loading indicator. The loading indicator will actually be shown by show() when the "first" delay (as specified by getFirstDelay()) has passed.

The loading indicator will be hidden if shown when calling this method.


show

public void show()
Shows the loading indicator in its standard state and triggers timers for transitioning into the "second" and "third" states.


getConnection

public ApplicationConnection getConnection()
Returns the ApplicationConnection which uses this loading indicator

Returns:
The ApplicationConnection for this loading indicator

hide

public void hide()
Hides the loading indicator (if visible). Cancels any possibly running timers.


isVisible

public boolean isVisible()
Returns whether or not the loading indicator is showing.

Returns:
true if the loading indicator is visible, false otherwise

getElement

public com.google.gwt.user.client.Element getElement()
Returns the root element of the loading indicator

Returns:
The loading indicator DOM element


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.