- 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 theSegmentedBarcontrol. 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 StringPropertytextStores the text of the segment (optional).DoublePropertyvalueStores the current value of the segment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetText()Returns the value oftextProperty().doublegetValue()Returns the value ofvalueProperty().voidsetText(String text)Sets the value oftextProperty().voidsetValue(double value)Sets the value ofvalueProperty().StringPropertytextProperty()Stores the text of the segment (optional).DoublePropertyvalueProperty()Stores the current value of the segment.
-
-
-
Property Detail
-
text
public final StringProperty textProperty
Stores the text of the segment (optional).- See Also:
getText(),setText(String)
-
value
public final DoubleProperty valueProperty
Stores the current value of the segment. The value has to be larger or equal to zero.- See Also:
getValue(),setValue(double)
-
-
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 valuetext- the segment's text
-
-
Method Detail
-
textProperty
public final StringProperty textProperty()
Stores the text of the segment (optional).- See Also:
getText(),setText(String)
-
setText
public final void setText(String text)
Sets the value oftextProperty().- Parameters:
text- the new text
-
getText
public final String getText()
Returns the value oftextProperty().- Returns:
- the segment's text
-
valueProperty
public final DoubleProperty valueProperty()
Stores the current value of the segment. The value has to be larger or equal to zero.- See Also:
getValue(),setValue(double)
-
setValue
public final void setValue(double value)
Sets the value ofvalueProperty().- Parameters:
value- the new value
-
getValue
public final double getValue()
Returns the value ofvalueProperty().- Returns:
- the segment's value
-
-