public class ProgressBar extends Component
Modifier and Type | Field and Description |
---|---|
static float |
MAX_VALUE
Maximum value of progress bar state.
|
static float |
MIN_VALUE
Minimum value of progress bar state.
|
Constructor and Description |
---|
ProgressBar()
Default constructor.
|
ProgressBar(float x,
float y,
float width,
float height)
Constructor with position and size parameters.
|
ProgressBar(org.joml.Vector2f position,
org.joml.Vector2f size)
Constructor with position and size parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
org.joml.Vector4f |
getProgressColor()
Returns progress bar color which used to draw completed progress.
|
float |
getValue()
Returns current progress status.
|
int |
hashCode() |
void |
setProgressColor(org.joml.Vector4f progressColor)
Used to set progress bar color.
|
void |
setValue(float value)
Used to set current progress status.
|
java.lang.String |
toString() |
add, addAll, clearChilds, containerIterator, contains, containsAll, count, forEach, getAbsolutePosition, getBackgroundColor, getBorder, getChilds, getCornerRadius, getFocusedStrokeColor, getIntersector, getListenerMap, getMetadata, getParent, getPosition, getSize, getTooltip, intersects, isEmpty, isEnabled, isFocused, isHovered, isPressed, isVisible, parallelStream, remove, removeAll, removeIf, setBackgroundColor, setBackgroundColor, setBorder, setCornerRadius, setEnabled, setFocused, setFocusedStrokeColor, setFocusedStrokeColor, setHovered, setIntersector, setListenerMap, setParent, setPosition, setPosition, setPressed, setSize, setSize, setTooltip, setVisible, stream
public static final float MAX_VALUE
public static final float MIN_VALUE
public ProgressBar()
Also if you want to make it easy to use with Json marshaller/unmarshaller component should contain empty constructor.
public ProgressBar(float x, float y, float width, float height)
x
- x position position in parent component.y
- y position position in parent component.width
- width of component.height
- height of component.public ProgressBar(org.joml.Vector2f position, org.joml.Vector2f size)
position
- position position in parent component.size
- size of component.public float getValue()
public void setValue(float value)
value
- current progress status.public org.joml.Vector4f getProgressColor()
public void setProgressColor(org.joml.Vector4f progressColor)
progressColor
- progress bar color.