Package com.vaadin.client.ui
Class VProgressBar
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.vaadin.client.ui.VProgressBar
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.HasEnabled,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.IsWidget
public class VProgressBar extends com.google.gwt.user.client.ui.Widget implements com.google.gwt.user.client.ui.HasEnabledWidget for showing the current progress of a long running task.The default mode is to show the current progress internally represented by a floating point value between 0 and 1 (inclusive). The progress bar can also be in an indeterminate mode showing an animation indicating that the task is running but without providing any information about the current progress.
- Since:
- 7.1
- Author:
- Vaadin Ltd
-
-
Field Summary
Fields Modifier and Type Field Description static StringPRIMARY_STYLE_NAMEDefault classname for this widget.
-
Constructor Summary
Constructors Constructor Description VProgressBar()Constructs a widget for the ProgressBar component or renderer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetState()Returns the current value of this progress bar.booleanisEnabled()booleanisIndeterminate()Gets whether or not this progress indicator is indeterminate.voidsetEnabled(boolean enabled)voidsetIndeterminate(boolean indeterminate)Sets whether or not this progress indicator is indeterminate.voidsetState(float state)Sets the value of this progress bar.voidsetStylePrimaryName(String style)-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
-
-
-
Field Detail
-
PRIMARY_STYLE_NAME
public static final String PRIMARY_STYLE_NAME
Default classname for this widget.- See Also:
- Constant Field Values
-
-
Method Detail
-
setStylePrimaryName
public void setStylePrimaryName(String style)
- Overrides:
setStylePrimaryNamein classcom.google.gwt.user.client.ui.UIObject
-
setIndeterminate
public void setIndeterminate(boolean indeterminate)
Sets whether or not this progress indicator is indeterminate. In indeterminate mode there is an animation indicating that the task is running but without providing any information about the current progress.- Parameters:
indeterminate-trueto set to indeterminate mode,falseotherwise
-
setState
public void setState(float state)
Sets the value of this progress bar. The value is afloatbetween 0 and 1 where 0 represents no progress at all and 1 represents fully completed.- Parameters:
state- the new progress value
-
isIndeterminate
public boolean isIndeterminate()
Gets whether or not this progress indicator is indeterminate. In indeterminate mode there is an animation indicating that the task is running but without providing any information about the current progress.- Returns:
trueif set to indeterminate mode,falseotherwise
-
getState
public float getState()
Returns the current value of this progress bar. The value is afloatbetween 0 and 1 where 0 represents no progress at all and 1 represents fully completed.- Returns:
- the current progress value
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled
-
-