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()Gets the value of thetextproperty.final doublegetValue()Gets the value of thevalueproperty.final voidSets the value of thetextproperty.final voidsetValue(double value) Sets the value of thevalueproperty.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 of thetextproperty.- Property description:
- Stores the text of the segment (optional).
- Parameters:
text- the value for thetextproperty- See Also:
-
getText
Gets the value of thetextproperty.- Property description:
- Stores the text of the segment (optional).
- Returns:
- the value of the
textproperty - 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 thevalueproperty.- Property description:
- Stores the current value of the segment. The value has to be larger or equal to zero.
- Parameters:
value- the value for thevalueproperty- See Also:
-
getValue
public final double getValue()Gets the value of thevalueproperty.- Property description:
- Stores the current value of the segment. The value has to be larger or equal to zero.
- Returns:
- the value of the
valueproperty - See Also:
-