eu.webtoolkit.jwt
Class WDefaultLoadingIndicator

java.lang.Object
  extended by eu.webtoolkit.jwt.WObject
      extended by eu.webtoolkit.jwt.WWidget
          extended by eu.webtoolkit.jwt.WWebWidget
              extended by eu.webtoolkit.jwt.WInteractWidget
                  extended by eu.webtoolkit.jwt.WText
                      extended by eu.webtoolkit.jwt.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:

See Also:
WApplication.setLoadingIndicator(WLoadingIndicator indicator)

Constructor Summary
WDefaultLoadingIndicator()
          Constructor.
 
Method Summary
 WWidget getWidget()
          Returns the widget that visually represents the indicator.
 void setMessage(java.lang.CharSequence text)
          Sets the message that you want to be displayed.
 
Methods inherited from class eu.webtoolkit.jwt.WText
getPadding, getText, getTextFormat, hasInternalPathEncoding, isWordWrap, refresh, remove, render, setInternalPathEncoding, setPadding, setPadding, setPadding, setText, setTextFormat, setWordWrap
 
Methods inherited from class eu.webtoolkit.jwt.WInteractWidget
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, propagateSetEnabled, setDraggable, setDraggable, setDraggable, setDraggable, touchEnded, touchMoved, touchStarted
 
Methods inherited from class eu.webtoolkit.jwt.WWebWidget
addStyleClass, callJavaScriptMember, childrenChanged, doJavaScript, domCanBeSaved, enableAjax, escapeText, escapeText, escapeText, escapeText, find, getAttributeValue, getChildren, getClearSides, getDecorationStyle, getFloatSide, getHeight, getId, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getOffset, getPositionScheme, getStyleClass, getTabIndex, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, isDisabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isRendered, isVisible, jsStringLiteral, jsStringLiteral, removeScript, removeStyleClass, resize, setAttributeValue, setClearSides, setDecorationStyle, setDisabled, setFloatSide, setHidden, setHiddenKeepsGeometry, setId, setInline, setJavaScriptMember, setLineHeight, setLoadLaterWhenInvisible, setMargin, setMaximumSize, setMinimumSize, setOffsets, setPopup, setPositionScheme, setSelectable, setStyleClass, setTabIndex, setToolTip, setVerticalAlignment, updateSignalConnection
 
Methods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, boxBorder, boxPadding, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, layoutSizeChanged, positionAt, positionAt, removeStyleClass, resize, setClearSides, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr
 
Methods inherited from class eu.webtoolkit.jwt.WObject
addChild, getObjectName, setObjectName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WDefaultLoadingIndicator

public WDefaultLoadingIndicator()
Constructor.

Method Detail

getWidget

public WWidget getWidget()
Description copied from interface: WLoadingIndicator
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 show() and 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