Package com.anylogic.engine.presentation
- Nested Class Summary
- Nested classes/interfaces inherited from class com.anylogic.engine.presentation.ShapeControl
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.presentation.ShapeInputControl
- Methods inherited from class com.anylogic.engine.presentation.ShapeControl
- Methods inherited from class com.anylogic.engine.presentation.Shape
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Constructor Details
- Method Details
- java.lang.Object
- com.anylogic.engine.presentation.Shape
- com.anylogic.engine.presentation.ShapeControl
- com.anylogic.engine.presentation.ShapeInputControl
- com.anylogic.engine.presentation.ShapeProgressBar
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,Locatable2D
,AggregatableAnimationElement
,HasLevel
,LevelElement
,SVGElement
,UsdElement
,Serializable
,Cloneable
public class ShapeProgressBar extends ShapeInputControl
Progress bar control. Embeds JProgressBar.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
ShapeProgressBar |
Creates a persistent progress bar control.
|
ShapeProgressBar |
Deprecated.
may be removed in future releases
|
Modifier and Type | Method | Description |
---|---|---|
final void | action() |
Does nothing since progress bar has no action.
|
void | executeAction() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
double | getMax() |
Returns the maximum value of the progress bar.
|
double | getMin() |
Returns the minimum value of the progress bar.
|
int | getPercent() |
Returns progress percents (integer value from 0 to 100)
|
double | getValue() |
Returns the current value of the progress bar.
|
void | setDeterminate |
Sets determinate property of progress bar,
which determines whether the progress bar is in determinate
or indeterminate mode.
An indeterminate progress bar continuously displays animation indicating that an operation of unknown length is occurring. By default, this property is true . |
void | setProgressString |
Sets the String value of the progress bar.
|
void | setRange |
Sets the minimum and maximum values of the progress bar.
|
void | setValue |
Sets the value of the progress bar.
|
final void | setValueToDefault() |
Does nothing since progress bar has no default value.
|
clone, contains, getHeight, getPresentable, getWidth, isEnabled, randomPointInside, restoreOwner, setEnabled, setHeight, setWidth
canHandleClick, executeUserAction, findSVGElement, getDrawMode, getGroup, getLevel, getName, getOrGenerateUSDId, getRotation, getScaleX, getScaleY, getSVGId, getUsdVersion, getX, getY, isJava2DSwingPresentation, isPublic_xjal, isSVGPresentation, isVisible, isVisibleCurrently, onAggregatorVisibilityChanged, onClick, randomPointInside, removeSVGFromOwner, removeSVGImage, resetSVGState, setChangedUsdVersion, setLevel, setNextChangedUsdVersion, setPos, setPos, setPublic_xjal, setRotation, setScale, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
@Deprecated public ShapeProgressBar(Presentable p, boolean ispublic, double x, double y, double width, double height, Color backgroundColor, boolean vertical, double min, double max)
Deprecated.
may be removed in future releases
public ShapeProgressBar(Presentable p, boolean ispublic, double x, double y, double width, double height, boolean vertical, double min, double max)
Creates a persistent progress bar control. You should override the action()
method.
- Parameters:
p
- the presentable object owning this controlispublic
- iftrue
, the control is visible on container's presentationx
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightvertical
- iftrue
- vertical, otherwise horizontalmin
- the minimum value of the progress barmax
- the maximum value of the progress bar
@AnyLogicInternalAPI public final void action()
Does nothing since progress bar has no action.
- Overrides:
action
in classShapeControl
public final void setValueToDefault()
Does nothing since progress bar has no default value.
- Overrides:
setValueToDefault
in classShapeControl
public void setValue(double val)
Sets the value of the progress bar.
- Parameters:
val
- the new value
public void setProgressString(String val)
Sets the String value of the progress bar.
- Parameters:
val
- the new value ornull
to hide progress string
public void setDeterminate(boolean val)
Sets determinate property of progress bar,
which determines whether the progress bar is in determinate
or indeterminate mode.
An indeterminate progress bar continuously displays animation indicating that an operation of unknown length is occurring.
By default, this property is
An indeterminate progress bar continuously displays animation indicating that an operation of unknown length is occurring.
By default, this property is
true
.- Parameters:
val
-
public double getValue()
Returns the current value of the progress bar.
- Returns:
- the current value of the progress bar
public int getPercent()
Returns progress percents (integer value from 0 to 100)
- Returns:
- progress percents (integer value from 0 to 100)
public void setRange(double min, double max)
Sets the minimum and maximum values of the progress bar.
- Parameters:
min
- the new minimum valuemax
- the new maximum value
public double getMin()
Returns the minimum value of the progress bar.
- Returns:
- the minimum value of the progress bar
public double getMax()
Returns the maximum value of the progress bar.
- Returns:
- the maximum value of the progress bar
@AnyLogicInternalAPI public void executeAction()
Description copied from class:
ShapeControl
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Overrides:
executeAction
in classShapeControl