Class ProgressBar

java.lang.Object
com.spinyowl.legui.component.Component
com.spinyowl.legui.component.ProgressBar
All Implemented Interfaces:
Serializable

public class ProgressBar extends Component
Progress bar. Used to display for example progress of loading or something else.
See Also:
  • Field Details

    • MAX_VALUE

      public static final float MAX_VALUE
      Maximum value of progress bar state.
      See Also:
    • MIN_VALUE

      public static final float MIN_VALUE
      Minimum 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

      public boolean equals(Object o)
      Overrides:
      equals in class Component
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Component
    • toString

      public String toString()
      Overrides:
      toString in class Component