Package com.anylogic.engine.presentation
- Nested Class Summary
- Nested classes/interfaces inherited from class com.anylogic.engine.presentation.ShapeControl
- Field Summary
- Fields inherited from class com.anylogic.engine.presentation.ShapeControl
- Fields inherited from class com.anylogic.engine.presentation.Shape
- 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 Detail
- Method Detail
- 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
,java.io.Serializable
,java.lang.Cloneable
public class ShapeProgressBar extends ShapeInputControl
Progress bar control. Embeds JProgressBar.
This object is only available in the AnyLogic Professional
This object is only available in the AnyLogic Professional
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
ShapeControl.ValueType
TYPE_DOUBLE, TYPE_INT, TYPE_STRING
UNKNOWN_NAME
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.
|
ShapeProgressBar(Presentable p,
boolean ispublic,
double x,
double y,
double width,
double height,
java.awt.Color backgroundColor,
boolean vertical,
double min,
double max) |
Deprecated.
may be removed in future releases
|
Constructor | Description |
---|
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(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 true . |
void |
setProgressString(java.lang.String val) |
Sets the String value of the progress bar.
|
void |
setRange(double min,
double max) |
Sets the minimum and maximum values of the progress bar.
|
void |
setValue(double val) |
Sets the value of the progress bar.
|
void |
setValueToDefault() |
Does nothing since progress bar has no default value.
|
Modifier and Type | Method | Description |
---|
postSVGShapeSpecificAttributes
clone, contains, getHeight, getPresentable, getWidth, isEnabled, randomPointInside, restoreOwner, setEnabled, setHeight, setWidth
canHandleClick, executeUserAction, findSVGElement, getDrawMode, getGroup, getLevel, getName, getRotation, getScaleX, getScaleY, getSVGId, getX, getY, isJava2DSwingPresentation, isPublic_xjal, isSVGPresentation, isVisible, onAggregatorVisibilityChanged, onClick, randomPointInside, removeSVGFromOwner, removeSVGImage, resetSVGState, setLevel, setPos, setPos, setPublic_xjal, setRotation, setScale, setScale, setScaleX, setScaleY, setVisible, setX, setY, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeInternal, postInitialize
@Deprecated public ShapeProgressBar(Presentable p, boolean ispublic, double x, double y, double width, double height, java.awt.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(java.lang.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
-
How can we improve this article?
-