Class ProgressBar
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.progressbar.GeneratedVaadinProgressBar<ProgressBar>
-
- com.vaadin.flow.component.progressbar.ProgressBar
-
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,Serializable
@NpmPackage(value="@vaadin/progress-bar",version="23.3.27") @NpmPackage(value="@vaadin/vaadin-progress-bar",version="23.3.27") public class ProgressBar extends GeneratedVaadinProgressBar<ProgressBar> implements com.vaadin.flow.component.HasSize
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProgressBar()Constructs 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddThemeVariants(ProgressBarVariant... variants)Adds theme variants to the component.doublegetMax()Gets the maximum bound of the progressbar.doublegetMin()Gets the minimum bound of the progressbar.doublegetValue()Gets the current value of the progressbarbooleanisIndeterminate()Get the indeterminate state of the progressbarvoidremoveThemeVariants(ProgressBarVariant... variants)Removes theme variants from the component.voidsetIndeterminate(boolean indeterminate)Description copied from corresponding location in WebComponent: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.progressbar.GeneratedVaadinProgressBar
getMaxDouble, getMinDouble, getValueDouble, isIndeterminateBoolean
-
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, 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.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
-
-
-
-
Constructor Detail
-
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 Detail
-
setValue
public void setValue(double value)
Sets value to the progressbar.- Overrides:
setValuein classGeneratedVaadinProgressBar<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
-
setMax
public void setMax(double max)
Sets the maximum bound of the progressbar.- Overrides:
setMaxin classGeneratedVaadinProgressBar<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- Overrides:
setMinin classGeneratedVaadinProgressBar<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
-
setIndeterminate
public void setIndeterminate(boolean indeterminate)
Description copied from class:GeneratedVaadinProgressBarDescription copied from corresponding location in WebComponent:
Indeterminate state of the progress bar. This property takes precedence over other state properties (min, max, value).
- Overrides:
setIndeterminatein classGeneratedVaadinProgressBar<ProgressBar>- 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
-
addThemeVariants
public void addThemeVariants(ProgressBarVariant... variants)
Adds theme variants to the component.- Overrides:
addThemeVariantsin classGeneratedVaadinProgressBar<ProgressBar>- Parameters:
variants- theme variants to add
-
removeThemeVariants
public void removeThemeVariants(ProgressBarVariant... variants)
Removes theme variants from the component.- Overrides:
removeThemeVariantsin classGeneratedVaadinProgressBar<ProgressBar>- Parameters:
variants- theme variants to remove
-
-