Class WDefaultLoadingIndicator

All Implemented Interfaces:
WLoadingIndicator

public class WDefaultLoadingIndicator
extends WText
implements WLoadingIndicator
A default loading indicator.

The default loading indicator displays the text message Loading... in the right top corner of the window.

CSS

This widget does not provide styling, and can be styled using inline or external CSS as appropriate.

i18n

The strings used in this class can be translated by overriding the default values for the following localization keys:

  • Wt.WDefaultLoadingIndicator.Loading: Loading...

See Also:
WApplication.setLoadingIndicator(WLoadingIndicator indicator)
  • Constructor Details

    • WDefaultLoadingIndicator

      public WDefaultLoadingIndicator()
      Constructor.
  • Method Details

    • getWidget

      public WWidget getWidget()
      Returns the widget that visually represents the indicator.

      You should reimplement this method to return a widget that will be shown to indicate that a response is pending. The widget should be positioned using CSS.

      The widget will be shown and hidden using WWidget.show() and WWidget.hide(). If you want to customize this behaviour, you should reimplement the WWidget#setHidden() method. Note that WWidget.show() and WWidget.hide() are stateless slots, and thus you need to make sure that your implementation comforms to that contract, so that it may be optimized to JavaScript (the server-side implementation will only be called during stateless slot prelearning).

      Note: The widget will not be added to the WApplication.getRoot() container.

      Specified by:
      getWidget in interface WLoadingIndicator
    • setMessage

      public void setMessage​(java.lang.CharSequence text)
      Description copied from interface: WLoadingIndicator
      Sets the message that you want to be displayed.

      If the indicator is capable of displaying a text message, then you should reimplement this method to allow this message to be modified.

      Specified by:
      setMessage in interface WLoadingIndicator