AnyLogic AnyLogic
Expand
Font size
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
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class com.anylogic.engine.presentation.ShapeControl

ShapeControl.ValueType

Field Summary

Fields inherited from class com.anylogic.engine.presentation.ShapeControl

TYPE_DOUBLE, TYPE_INT, TYPE_STRING

Fields inherited from class com.anylogic.engine.presentation.Shape

UNKNOWN_NAME

Constructor Summary

Constructors 
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

Method Summary

All Methods Instance Methods Concrete Methods 
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

Methods inherited from class com.anylogic.engine.presentation.ShapeInputControl

postSVGShapeSpecificAttributes

Methods inherited from class com.anylogic.engine.presentation.ShapeControl

clone, contains, getHeight, getPresentable, getWidth, isEnabled, randomPointInside, restoreOwner, setEnabled, setHeight, setWidth

Methods inherited from class com.anylogic.engine.presentation.Shape

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

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, postInitialize

Constructor Detail

ShapeProgressBar

@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

ShapeProgressBar

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 control
ispublic - if true, the control is visible on container's presentation
x - the x coordinate
y - the y coordinate
width - the width
height - the height
vertical - if true - vertical, otherwise horizontal
min - the minimum value of the progress bar
max - the maximum value of the progress bar

Method Detail

action

@AnyLogicInternalAPI
public final void action()
Does nothing since progress bar has no action.
Overrides:
action in class ShapeControl

setValueToDefault

public final void setValueToDefault()
Does nothing since progress bar has no default value.
Overrides:
setValueToDefault in class ShapeControl

setValue

public void setValue​(double val)
Sets the value of the progress bar.
Parameters:
val - the new value

setProgressString

public void setProgressString​(java.lang.String val)
Sets the String value of the progress bar.
Parameters:
val - the new value or null to hide progress string

setDeterminate

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 true.
Parameters:
val -

getValue

public double getValue()
Returns the current value of the progress bar.
Returns:
the current value of the progress bar

getPercent

public int getPercent()
Returns progress percents (integer value from 0 to 100)
Returns:
progress percents (integer value from 0 to 100)

setRange

public void setRange​(double min,
                     double max)
Sets the minimum and maximum values of the progress bar.
Parameters:
min - the new minimum value
max - the new maximum value

getMin

public double getMin()
Returns the minimum value of the progress bar.
Returns:
the minimum value of the progress bar

getMax

public double getMax()
Returns the maximum value of the progress bar.
Returns:
the maximum value of the progress bar

executeAction

@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.
Overrides:
executeAction in class ShapeControl
How can we improve this article?