Top Description Fields Constructors Methods
com.dlsc.preferencesfx.formsfx.view.controls

public Class DoubleSliderControl

extends SimpleControl<DoubleField, HBox>
Class Inheritance
Imports
com.dlsc.formsfx.model.structure.DoubleField, com.dlsc.preferencesfx.util.VisibilityProperty, java.math.BigDecimal, .RoundingMode, javafx.geometry.Insets, .Pos, javafx.scene.control.Label, .Slider, javafx.scene.layout.HBox, .Priority

Provides an implementation of a slider control for an DoubleField.
Authors
François Martin, Marco Sanfratello

Field Summary

Modifier and TypeField and Description
private double
private double
private int
protected Slider
slider

- fieldLabel is the container that displays the label property of the field.

public static final int
protected Label
Inherited from com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl:
CHANGED_CLASSDISABLED_CLASSfieldfieldLabelINVALID_CLASSnodeREQUIRED_CLASStooltipvisibilityProperty

Constructor Summary

AccessConstructor and Description
public
DoubleSliderControl(double
minimum slider value
min
,
double
maximum slider value
max
,
int
number of digits after the decimal point
precision
)

Creates a slider for double values with a minimum and maximum value, with a set precision.

Method Summary

Modifier and TypeMethod and Description
public void
public void
layoutParts()

Implements abstract com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl.layoutParts.

Implements com.dlsc.formsfx.view.util.ViewMixin.layoutParts.

This method is used to align the parts of a class.

public static DoubleSliderControl

Returns:

the constructed DoubleSliderControl
of
(double
minimum slider value
min
,
double
maximum slider value
max
,
int
number of digits after the decimal point
precision
,
VisibilityProperty
property for control visibility of this element
visibilityProperty
)

Constructs a DoubleSliderControl of DoubleSliderControl type, with visibility condition.

private double
round(double
value to be rounded
value
,
int
number of digits after the decimal point
precision
)

Rounds a value to a given precision, using RoundingMode#HALF_UP.

public void
setupBindings()

Overrides com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl.setupBindings.

Overrides default com.dlsc.formsfx.view.util.ViewMixin.setupBindings.

This method is used to configure the bindings of the properties.

public void
public void
Inherited from com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl:
addStyleClassgetFieldgetFieldLabelgetNodegetVisibilityPropertyinitremoveStyleClasssetFieldsetVisibilityPropertytoggleTooltiptoggleTooltipupdateStyle

Field Detail

maxback to summary
private double max
minback to summary
private double min
precisionback to summary
private int precision
sliderback to summary
protected Slider slider

- fieldLabel is the container that displays the label property of the field. - slider is the control to change the value. - node holds the control so that it can be styled properly.

VALUE_LABEL_PADDINGback to summary
public static final int VALUE_LABEL_PADDING
valueLabelback to summary
protected Label valueLabel

Constructor Detail

DoubleSliderControlback to summary
public DoubleSliderControl(double min, double max, int precision)

Creates a slider for double values with a minimum and maximum value, with a set precision.

Parameters
min:double

minimum slider value

max:double

maximum slider value

precision:int

number of digits after the decimal point

Method Detail

initializePartsback to summary
public void initializeParts()

Overrides com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl.initializeParts.

Implements com.dlsc.formsfx.view.util.ViewMixin.initializeParts.

Doc from com.dlsc.formsfx.view.controls.SimpleControl.initializeParts.

This method is used to initializes all the properties of a class.

Annotations
@Override
layoutPartsback to summary
public void layoutParts()

Implements abstract com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl.layoutParts.

Implements com.dlsc.formsfx.view.util.ViewMixin.layoutParts.

Doc from com.dlsc.formsfx.view.controls.SimpleControl.layoutParts.

This method is used to align the parts of a class.

Annotations
@Override
ofback to summary
public static DoubleSliderControl of(double min, double max, int precision, VisibilityProperty visibilityProperty)

Constructs a DoubleSliderControl of DoubleSliderControl type, with visibility condition.

Parameters
min:double

minimum slider value

max:double

maximum slider value

precision:int

number of digits after the decimal point

visibilityProperty:VisibilityProperty

property for control visibility of this element

Returns:DoubleSliderControl

the constructed DoubleSliderControl

roundback to summary
private double round(double value, int precision)

Rounds a value to a given precision, using RoundingMode#HALF_UP.

Parameters
value:double

value to be rounded

precision:int

number of digits after the decimal point

setupBindingsback to summary
public void setupBindings()

Overrides com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl.setupBindings.

Overrides default com.dlsc.formsfx.view.util.ViewMixin.setupBindings.

Doc from com.dlsc.formsfx.view.controls.SimpleControl.setupBindings.

This method is used to configure the bindings of the properties.

Annotations
@Override
setupEventHandlersback to summary
public void setupEventHandlers()

Overrides com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl.setupEventHandlers.

Overrides default com.dlsc.formsfx.view.util.ViewMixin.setupEventHandlers.

Doc from com.dlsc.formsfx.view.util.ViewMixin.setupEventHandlers.

This method is used to set up event handlers.

Annotations
@Override
setupValueChangedListenersback to summary
public void setupValueChangedListeners()

Overrides com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl.setupValueChangedListeners.

Overrides default com.dlsc.formsfx.view.util.ViewMixin.setupValueChangedListeners.

Doc from com.dlsc.formsfx.view.controls.SimpleControl.setupValueChangedListeners.

This method is used to set up value change listeners.

Annotations
@Override