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

public abstract Class SimpleControl<F extends Field<F extends Field<F>>>

extends GridPane
implements ViewMixin
Class Inheritance
All Implemented Interfaces
com.dlsc.formsfx.view.util.ViewMixin
Known Direct Subclasses
com.dlsc.formsfx.view.controls.SimpleDateControl, com.dlsc.formsfx.view.controls.SimpleListViewControl, com.dlsc.formsfx.view.controls.SimpleNumberControl, com.dlsc.formsfx.view.controls.SimplePasswordControl, com.dlsc.formsfx.view.controls.SimpleRadioButtonControl, com.dlsc.formsfx.view.controls.SimpleTextControl, com.dlsc.formsfx.view.controls.SimpleBooleanControl, com.dlsc.formsfx.view.controls.SimpleCheckBoxControl, com.dlsc.formsfx.view.controls.SimpleComboBoxControl
Imports
com.dlsc.formsfx.model.structure.Field, com.dlsc.formsfx.view.util.ViewMixin, javafx.collections.ListChangeListener, javafx.css.PseudoClass, javafx.geometry.Point2D, .Pos, javafx.scene.Node, javafx.scene.control.Control, .Tooltip, javafx.scene.layout.ColumnConstraints, .GridPane

This class provides a base for general purpose FormsFX controls.
Authors
Sacha Schmid, Rinesch Murugathas

Field Summary

Modifier and TypeField and Description
protected static final PseudoClass
protected static final PseudoClass
protected F
field

This is the Field that is used for binding and update styling changes.

protected static final PseudoClass
protected static final PseudoClass
REQUIRED_CLASS

Pseudo classes for state changes.

protected Tooltip
tooltip

Tooltip to hold the error message.

Inherited from javafx.scene.layout.GridPane:
REMAINING

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addStyleClass(String
of the style class to be added to the control
name
)

Adds a style class to the control.

public void
initializeParts()

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

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

public void
layoutParts()

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

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

public void
removeStyleClass(String
of the class to be removed from the control
name
)

Removes a style class from the control.

public void
setField(F field)

public void
setupBindings()

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

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

public void
setupValueChangedListeners()

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

This method is used to set up value change listeners.

protected void
toggleTooltip(Node
The control which gets the tooltip.
reference
)

Sets the error message as tooltip for the matching control and shows them below the same control.

protected void
toggleTooltip(Node
The control which gets the tooltip.
reference
,
Control
The control needed for positioning the tooltip.
below
)

Sets the error message as tooltip for the matching control.

protected void
updateStyle(PseudoClass
The CSS pseudo class to toggle.
pseudo
,
boolean
Determines whether the CSS class should be applied.
newValue
)

Sets the css style for the defined properties.

Inherited from javafx.scene.layout.GridPane:
addaddaddColumnaddRowalignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetAlignmentgetCellBoundsgetClassCssMetaDatagetColumnConstraintsgetColumnCountgetColumnIndexgetColumnSpangetContentBiasgetCssMetaDatagetHalignmentgetHgapgetHgrowgetMargingetRowConstraintsgetRowCountgetRowIndexgetRowSpangetValignmentgetVgapgetVgrowgridLinesVisiblePropertyhgapPropertyisFillHeightisFillWidthisGridLinesVisiblelayoutChildrenrequestLayoutsetAlignmentsetColumnIndexsetColumnSpansetConstraintssetConstraintssetConstraintssetConstraintssetConstraintssetFillHeightsetFillWidthsetGridLinesVisiblesetHalignmentsetHgapsetHgrowsetMarginsetRowIndexsetRowSpansetValignmentsetVgapsetVgrowtoStringvgapProperty

Field Detail

CHANGED_CLASSback to summary
protected static final PseudoClass CHANGED_CLASS
DISABLED_CLASSback to summary
protected static final PseudoClass DISABLED_CLASS
fieldback to summary
protected F field

This is the Field that is used for binding and update styling changes.

INVALID_CLASSback to summary
protected static final PseudoClass INVALID_CLASS
REQUIRED_CLASSback to summary
protected static final PseudoClass REQUIRED_CLASS

Pseudo classes for state changes.

tooltipback to summary
protected Tooltip tooltip

Tooltip to hold the error message.

Constructor Detail

SimpleControlback to summary
public SimpleControl()

Method Detail

addStyleClassback to summary
public void addStyleClass(String name)

Adds a style class to the control.

Parameters
name:String

of the style class to be added to the control

initializePartsback to summary
public void initializeParts()

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

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

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

Annotations
@Override
layoutPartsback to summary
public void layoutParts()

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

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

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

Annotations
@Override
removeStyleClassback to summary
public void removeStyleClass(String name)

Removes a style class from the control.

Parameters
name:String

of the class to be removed from the control

setFieldback to summary
public void setField(F field)
setupBindingsback to summary
public void setupBindings()

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

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

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

setupValueChangedListenersback to summary
public void setupValueChangedListeners()

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

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

This method is used to set up value change listeners.

Annotations
@Override
toggleTooltipback to summary
protected void toggleTooltip(Node reference)

Sets the error message as tooltip for the matching control and shows them below the same control.

Parameters
reference:Node

The control which gets the tooltip.

toggleTooltipback to summary
protected void toggleTooltip(Node reference, Control below)

Sets the error message as tooltip for the matching control.

Parameters
reference:Node

The control which gets the tooltip.

below:Control

The control needed for positioning the tooltip.

updateStyleback to summary
protected void updateStyle(PseudoClass pseudo, boolean newValue)

Sets the css style for the defined properties.

Parameters
pseudo:PseudoClass

The CSS pseudo class to toggle.

newValue:boolean

Determines whether the CSS class should be applied.