Class SegmentedBar.Segment

java.lang.Object
com.dlsc.gemsfx.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 Summary

    Properties
    Type
    Property
    Description
    final javafx.beans.property.StringProperty
    Stores the text of the segment (optional).
    final javafx.beans.property.DoubleProperty
    Stores the current value of the segment.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Segment(double value)
    Constructs a new segment with the given value.
    Segment(double value, String text)
    Constructs a new segment with the given value.
  • Method Summary

    Modifier and Type
    Method
    Description
    final String
    Gets the value of the text property.
    final double
    Gets the value of the value property.
    final void
    Sets the value of the text property.
    final void
    setValue(double value)
    Sets the value of the value property.
    final javafx.beans.property.StringProperty
    Stores the text of the segment (optional).
    final javafx.beans.property.DoubleProperty
    Stores the current value of the segment.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 the text property.
      Property description:
      Stores the text of the segment (optional).
      Parameters:
      text - the value for the text property
      See Also:
    • getText

      public final String getText()
      Gets the value of the text property.
      Property description:
      Stores the text of the segment (optional).
      Returns:
      the value of the text property
      See Also:
    • 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 the value property.
      Property description:
      Stores the current value of the segment. The value has to be larger or equal to zero.
      Parameters:
      value - the value for the value property
      See Also:
    • getValue

      public final double getValue()
      Gets the value of the value property.
      Property description:
      Stores the current value of the segment. The value has to be larger or equal to zero.
      Returns:
      the value of the value property
      See Also: