java.lang.Object
org.controlsfx.control.SegmentedBar.Segment
- Enclosing class:
- SegmentedBar<T extends SegmentedBar.Segment>
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
PropertiesTypePropertyDescriptionfinal StringPropertyStores the text of the segment (optional).final DoublePropertyStores the current value of the segment. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetText()Returns the value oftextProperty().final doublegetValue()Returns the value ofvalueProperty().final voidSets the value oftextProperty().final voidsetValue(double value) Sets the value ofvalueProperty().final StringPropertyStores the text of the segment (optional).final DoublePropertyStores the current value of the segment.
-
Property Details
-
text
Stores the text of the segment (optional).- See Also:
-
value
Stores the current value of the segment. The value has to be larger or equal to zero.- See Also:
-
-
Constructor Details
-
Segment
public Segment(double value) Constructs a new segment with the given value.- Parameters:
value- the segment's value
-
Segment
Constructs a new segment with the given value.- Parameters:
value- the segment's valuetext- the segment's text
-
-
Method Details
-
textProperty
Stores the text of the segment (optional).- See Also:
-
setText
Sets the value oftextProperty().- Parameters:
text- the new text
-
getText
Returns the value oftextProperty().- Returns:
- the segment's text
-
valueProperty
Stores the current value of the segment. The value has to be larger or equal to zero.- See Also:
-
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
-