com.vaadin.flow.component.progressbar.
Class ProgressBar
All Implemented Interfaces:
AttachNotifier
, DetachNotifier
, HasElement
, HasSize
, HasStyle
, HasTheme
, HasThemeVariant<ProgressBarVariant>
, Serializable
Progress Bar shows the completion status of a task or process. The progress can be determinate or indeterminate. Use Progress Bar to show an ongoing process that takes a noticeable time to finish.
Author:
Vaadin Ltd.
See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new object with a scale of 0 to 1, and an initial value of 0.
ProgressBar
(double min, double max) Constructs a new object with a scale of
min
tomax
, and an initial value ofmin
.ProgressBar
(double min, double max, double value) Constructs a new object with a scale of
min
tomax
, and an initial value ofvalue
. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getMax()
Gets the maximum bound of the progressbar.
double
getMin()
Gets the minimum bound of the progressbar.
double
getValue()
Gets the current value of the progressbar
boolean
Get the indeterminate state of the progressbar
void
setIndeterminate
(boolean indeterminate) Indeterminate state of the progressbar.
void
setMax
(double max) Sets the maximum bound of the progressbar.
void
setMin
(double min) Sets the minimum bound of the progressbar
void
setValue
(double value) Sets value to the progressbar.
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
Methods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
Methods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, removeThemeVariants
-
Constructor Details
-
ProgressBar
public ProgressBar()Constructs a new object with a scale of 0 to 1, and an initial value of 0.
-
ProgressBar
public ProgressBar(double min, double max) Constructs a new object with a scale of
min
tomax
, and an initial value ofmin
.min
must be less thanmax
.Parameters:
min
- the low end of the scale of progressmax
- the high end of the scale of progressThrows:
IllegalArgumentException
- ifmin
is not less thanmax
-
ProgressBar
public ProgressBar(double min, double max, double value) Constructs a new object with a scale of
min
tomax
, and an initial value ofvalue
.min
must be less thanmax
, andvalue
must be betweenmin
andmax
(inclusive).Parameters:
min
- the low end of the scale of progressmax
- the high end of the scale of progressvalue
- the initial valueThrows:
IllegalArgumentException
- ifmin
is not less thanmax
, orvalue
is not betweenmin
andmax
-
-
Method Details
-
setValue
public void setValue(double value) Sets value to the progressbar.
Parameters:
value
- the double value to set -
getValue
public double getValue()Gets the current value of the progressbar
Returns:
the
value
property of the progressbar -
setMax
public void setMax(double max) Sets the maximum bound of the progressbar.
Parameters:
max
- the double value to set -
getMax
public double getMax()Gets the maximum bound of the progressbar.
Returns:
the
max
property of the progressbar -
setMin
public void setMin(double min) Sets the minimum bound of the progressbar
Parameters:
min
- the double value to set -
getMin
public double getMin()Gets the minimum bound of the progressbar.
Returns:
the
min
property of the progressbar -
setIndeterminate
public void setIndeterminate(boolean indeterminate) Indeterminate state of the progressbar. This property takes precedence over other state properties (min, max, value).
Parameters:
indeterminate
- the boolean value to set -
isIndeterminate
public boolean isIndeterminate()Get the indeterminate state of the progressbar
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
Returns:
the
indeterminate
property of the progressbar
-