Class ProgressBar
- All Implemented Interfaces:
AttachNotifier,DetachNotifier,HasElement,HasSize,HasStyle,HasTheme,HasThemeVariant<ProgressBarVariant>,Serializable
- 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 ofmintomax, and an initial value ofmin.ProgressBar(double min, double max, double value) Constructs a new object with a scale ofmintomax, and an initial value ofvalue. -
Method Summary
Modifier and TypeMethodDescriptionvoidBinds the given signal to the maximum bound of the progressbar.voidBinds the given signal to the minimum bound of the progressbar.voidBinds the given signal to the value of the progressbar as a one-way binding so that the property is updated when the signal's value is updated.doublegetMax()Gets the maximum bound of the progressbar.doublegetMin()Gets the minimum bound of the progressbar.doublegetValue()Gets the current value of the progressbarbooleanGet the indeterminate state of the progressbarvoidsetIndeterminate(boolean indeterminate) Indeterminate state of the progressbar.voidsetMax(double max) Sets the maximum bound of the progressbar.voidsetMin(double min) Sets the minimum bound of the progressbarvoidsetValue(double value) Sets value to the progressbar.Methods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, bindThemeName, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, bindThemeVariant, removeThemeVariants, setThemeVariant, setThemeVariants, setThemeVariants
-
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 ofmintomax, and an initial value ofmin.minmust be less thanmax.- Parameters:
min- the low end of the scale of progressmax- the high end of the scale of progress- Throws:
IllegalArgumentException- ifminis not less thanmax
-
ProgressBar
public ProgressBar(double min, double max, double value) Constructs a new object with a scale ofmintomax, and an initial value ofvalue.minmust be less thanmax, andvaluemust be betweenminandmax(inclusive).- Parameters:
min- the low end of the scale of progressmax- the high end of the scale of progressvalue- the initial value- Throws:
IllegalArgumentException- ifminis not less thanmax, orvalueis not betweenminandmax
-
-
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
valueproperty of the progressbar
-
bindValue
Binds the given signal to the value of the progressbar as a one-way binding so that the property is updated when the signal's value is updated.When a signal is bound, the value is kept synchronized with the signal value while the component is attached. When the component is detached, signal value changes have no effect.
While a signal is bound, any attempt to set the value manually through
setValue(double)throws aBindingActiveException.- Parameters:
signal- the signal to bind the value to, notnull- Since:
- 25.1
- See Also:
-
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
maxproperty 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
minproperty of the progressbar
-
bindMin
Binds the given signal to the minimum bound of the progressbar.When a signal is bound, the minimum bound is kept synchronized with the signal value while the component is attached. When the component is detached, signal value changes have no effect.
While a signal is bound, any attempt to set the minimum bound manually through
setMin(double)throws aBindingActiveException.- Parameters:
signal- the signal to bind the minimum bound to, notnull- Since:
- 25.1
- See Also:
-
bindMax
Binds the given signal to the maximum bound of the progressbar.When a signal is bound, the maximum bound is kept synchronized with the signal value while the component is attached. When the component is detached, signal value changes have no effect.
While a signal is bound, any attempt to set the maximum bound manually through
setMax(double)throws aBindingActiveException.- Parameters:
signal- the signal to bind the maximum bound to, notnull- Since:
- 25.1
- See Also:
-
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 progressbarThis property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
- Returns:
- the
indeterminateproperty of the progressbar
-