Package com.spinyowl.legui.component
Class ProgressBar
java.lang.Object
com.spinyowl.legui.component.Component
com.spinyowl.legui.component.ProgressBar
- All Implemented Interfaces:
Serializable
Progress bar. Used to display for example progress of loading or something else.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault 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. -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.joml.Vector4fReturns progress bar color which used to draw completed progress.floatgetValue()Returns current progress status.inthashCode()voidsetProgressColor(org.joml.Vector4f progressColor) Used to set progress bar color.voidsetValue(float value) Used to set current progress status.toString()Methods inherited from class com.spinyowl.legui.component.Component
add, add, addAll, clearChildComponents, containerIterator, contains, containsAll, count, forEach, getAbsolutePosition, getChildComponents, getFocusedStyle, getFrame, getHoveredStyle, getIntersector, getLayer, getListenerMap, getMetadata, getParent, getPosition, getPressedStyle, getSize, getStyle, getTabIndex, getTooltip, indexOfChild, intersects, isEmpty, isEnabled, isFocusable, isFocused, isHovered, isPressed, isTabFocusable, isVisible, keepRendering, keepRendering, parallelStream, remove, remove, removeAll, removeIf, setEnabled, setFocusable, setFocused, setHovered, setIntersector, setListenerMap, setParent, setPosition, setPosition, setPressed, setSize, setSize, setStyle, setTabFocusable, setTabIndex, setTooltip, stream
-
Field Details
-
MAX_VALUE
public static final float MAX_VALUEMaximum value of progress bar state.- See Also:
-
MIN_VALUE
public static final float MIN_VALUEMinimum value of progress bar state.- See Also:
-
-
Constructor Details
-
ProgressBar
public ProgressBar()Default constructor. Used to create component instance without any parameters.Also if you want to make it easy to use with Json marshaller/unmarshaller component should contain empty constructor.
-
ProgressBar
public ProgressBar(float x, float y, float width, float height) Constructor with position and size parameters.- Parameters:
x- x position position in parent component.y- y position position in parent component.width- width of component.height- height of component.
-
ProgressBar
public ProgressBar(org.joml.Vector2f position, org.joml.Vector2f size) Constructor with position and size parameters.- Parameters:
position- position position in parent component.size- size of component.
-
-
Method Details
-
getValue
public float getValue()Returns current progress status.- Returns:
- current progress status.
-
setValue
public void setValue(float value) Used to set current progress status.- Parameters:
value- current progress status.
-
getProgressColor
public org.joml.Vector4f getProgressColor()Returns progress bar color which used to draw completed progress.- Returns:
- progress bar color which used to draw completed progress.
-
setProgressColor
public void setProgressColor(org.joml.Vector4f progressColor) Used to set progress bar color.- Parameters:
progressColor- progress bar color.
-
equals
-
hashCode
public int hashCode() -
toString
-