Class SegmentedBar.Segment

java.lang.Object
org.controlsfx.control.SegmentedBar.Segment
Enclosing class:
SegmentedBar<T extends SegmentedBar.Segment>

public static class SegmentedBar.Segment extends Object
A model class used by the SegmentedBar control. Applications usually subclass this type for their own specific needs. A segment always carries a value and an optional text. Changing the value of the segment will trigger a rebuild of the control.
  • Property Details

  • Constructor Details

    • Segment

      public Segment(double value)
      Constructs a new segment with the given value.
      Parameters:
      value - the segment's value
    • Segment

      public Segment(double value, String text)
      Constructs a new segment with the given value.
      Parameters:
      value - the segment's value
      text - the segment's text
  • Method Details

    • textProperty

      public final javafx.beans.property.StringProperty textProperty()
      Stores the text of the segment (optional).
      Returns:
      the text property
      See Also:
    • setText

      public final void setText(String text)
      Sets the value of textProperty().
      Parameters:
      text - the new text
    • getText

      public final String getText()
      Returns the value of textProperty().
      Returns:
      the segment's text
    • valueProperty

      public final javafx.beans.property.DoubleProperty valueProperty()
      Stores the current value of the segment. The value has to be larger or equal to zero.
      Returns:
      the value property
      See Also:
    • setValue

      public final void setValue(double value)
      Sets the value of valueProperty().
      Parameters:
      value - the new value
    • getValue

      public final double getValue()
      Returns the value of valueProperty().
      Returns:
      the segment's value