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.HasEnabled
Widget 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 String
PRIMARY_STYLE_NAME
Default classname for this widget.
-
Constructor Summary
Constructors Constructor Description VProgressBar()
Constructs a widget for the ProgressBar component or renderer.
-
Method Summary
All Methods Modifier and Type Method Description float
getState()
Returns the current value of this progress bar.
boolean
isEnabled()
boolean
isIndeterminate()
Gets whether or not this progress indicator is indeterminate.
void
setEnabled(boolean enabled)
void
setIndeterminate(boolean indeterminate)
Sets whether or not this progress indicator is indeterminate.
void
setState(float state)
Sets the value of this progress bar.
void
setStylePrimaryName(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:
-
-
Method Detail
-
setStylePrimaryName
public void setStylePrimaryName(String style)
Overrides:
setStylePrimaryName
in 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
-true
to set to indeterminate mode,false
otherwise
-
setState
public void setState(float state)
Sets the value of this progress bar. The value is a
float
between 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:
true
if set to indeterminate mode,false
otherwise
-
getState
public float getState()
Returns the current value of this progress bar. The value is a
float
between 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:
isEnabled
in interfacecom.google.gwt.user.client.ui.HasEnabled
-
setEnabled
public void setEnabled(boolean enabled)
Specified by:
setEnabled
in interfacecom.google.gwt.user.client.ui.HasEnabled
-
-