Class 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.
    • Constructor Detail

      • 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 Detail

      • 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
      • 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