Class SegmentedBar.Segment
java.lang.Object
com.dlsc.gemsfx.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
Properties -
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 javafx.beans.property.StringPropertyStores the text of the segment (optional).final javafx.beans.property.DoublePropertyStores the current value of the segment.
-
Property Details
-
text
public final javafx.beans.property.StringProperty textPropertyStores the text of the segment (optional).- See Also:
-
value
public final javafx.beans.property.DoubleProperty valuePropertyStores 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
public final javafx.beans.property.StringProperty textProperty()Stores the text of the segment (optional).- Returns:
- the text property
- See Also:
-
setText
Sets the value oftextProperty().- Parameters:
text- the new text
-
getText
-
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 ofvalueProperty().- Parameters:
value- the new value
-
getValue
-