Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: FxglProgressBar

[14:7] extends: Parent

Wraps FXGL's ProgressBar (com.almasb.fxgl.ui.ProgressBar), a health/status-bar-style progress indicator distinct from JavaFX's built-in ProgressBar. Named FxglProgressBar to avoid the name collision with the existing fx.ProgressBar wrapper from chunk 1.

Methods

  • FxglProgressBar (bool ShowChanges = true)

    Creates a new progress bar.

  • adopt (object Ajo)

    Wraps an existing FXGL ProgressBar AussomJavaObject.

    • @p Ajo is an AussomJavaObject around an FXGL ProgressBar.
    • @r A new wrapper.
  • setCurrentValue (double Value)

    Sets the current value (0 to maxValue).

    • @p Value is the new value.
    • @r this object
  • setMaxValue (double Max)

    Sets the maximum value.

    • @p Max is the new max.
    • @r this object
  • setMinValue (double Min)

    Sets the minimum value.

    • @p Min is the new min.
    • @r this object
  • getCurrentValue ()

    Returns the current value.

    • @r A double.
  • currentValueProperty ()

    Returns the underlying DoubleProperty for the current value. Useful for binding a HUD label or another bar to this one.

    • @r An AussomJavaObject around a DoubleProperty.
  • minValueProperty ()

    Returns the underlying DoubleProperty for the min value.

    • @r An AussomJavaObject around a DoubleProperty.
  • maxValueProperty ()

    Returns the underlying DoubleProperty for the max value.

    • @r An AussomJavaObject around a DoubleProperty.
  • setWidth (double Width)

    Sets the bar width.

    • @p Width is the new width in pixels.
    • @r this object
  • setHeight (double Height)

    Sets the bar height.

    • @p Height is the new height in pixels.
    • @r this object
  • setFill (object ColorObj)

    Sets the fill color of the filled section.

    • @p ColorObj is a Color wrapper.
    • @r this object
  • setBackgroundFill (object PaintObj)

    Sets the background paint of the unfilled section.

    • @p PaintObj is an AussomJavaObject around a Paint (or a Color wrapper).
    • @r this object
  • setLabelFill (object PaintObj)

    Sets the label text color.

    • @p PaintObj is an AussomJavaObject around a Paint or a Color wrapper.
    • @r this object
  • setTraceFill (object PaintObj)

    Sets the trace (animated flash) color.

    • @p PaintObj is an AussomJavaObject around a Paint or a Color wrapper.
    • @r this object
  • setLabelVisible (bool Visible)

    Sets whether the value-text label is visible.

    • @p Visible is a bool.
    • @r this object
  • isLabelVisible ()

    Returns whether the value-text label is visible.

    • @r A bool.
  • setLabelPosition (string PositionName)

    Sets the label position relative to the bar.

    • @p PositionName is the Position name ("LEFT", "RIGHT", "TOP", "BOTTOM").
    • @r this object
  • getBackgroundBar ()

    Returns the underlying background-bar Rectangle for direct styling.

    • @r An AussomJavaObject around a Rectangle.
  • getInnerBar ()

    Returns the underlying inner-bar Rectangle (the filled portion) for direct styling.

    • @r An AussomJavaObject around a Rectangle.