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

public Class SimpleChooserControl

extends SimpleControl<StringField, StackPane>
Class Inheritance
Imports
java.io.File, java.nio.file.Path, .Paths, javafx.beans.binding.Bindings, javafx.geometry.Pos, javafx.scene.control.Button, .Label, .TextArea, .TextField, javafx.scene.layout.HBox, .Priority, .StackPane, javafx.stage.DirectoryChooser, .FileChooser, com.dlsc.formsfx.model.structure.StringField, com.dlsc.preferencesfx.util.VisibilityProperty

This class provides the base implementation for a simple control to select or enter a directory path.
Authors
Rinesch Murugathas, Sacha Schmid, François Martin, Marco Sanfratello, Arvid Nyström

Field Summary

Modifier and TypeField and Description
private String
private Button
private HBox
private boolean
protected TextArea
protected TextField
editableField

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

protected Label
private File
protected Label
Inherited from com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl:
CHANGED_CLASSDISABLED_CLASSfieldINVALID_CLASSnodeREQUIRED_CLASStooltipvisibilityProperty

Constructor Summary

AccessConstructor and Description
public
SimpleChooserControl(String
Text for the button to show, e.g. "Browse"
buttonText
,
File
An optional initial path, can be null. If null, will use the path from the previously chosen file if present.
initialDirectory
,
boolean
true, if only directories are allowed
directory
)

Create a new SimpleChooserControl.

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 SimpleChooserControl

Returns:

the constructed SimpleChooserControl
of
(String buttonText, File initialDirectory, boolean directory, VisibilityProperty
property for control visibility of this element
visibilityProperty
)

Constructs a SimpleChooserControl of SimpleChooserControl type, with visibility condition.

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
Inherited from com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl:
addStyleClassgetFieldgetFieldLabelgetNodegetVisibilityPropertyinitremoveStyleClasssetFieldsetupEventHandlerssetVisibilityPropertytoggleTooltiptoggleTooltipupdateStyle

Field Detail

buttonTextback to summary
private String buttonText
chooserButtonback to summary
private Button chooserButton
contentBoxback to summary
private HBox contentBox
directoryback to summary
private boolean directory
editableAreaback to summary
protected TextArea editableArea
editableFieldback to summary
protected TextField editableField

- The fieldLabel is the container that displays the label property of the field. - The editableField allows users to modify the field's value. - The readOnlyLabel displays the field's value if it is not editable.

fieldLabelback to summary
protected Label fieldLabel

Hides com.dlsc.preferencesfx.formsfx.view.controls.SimpleControl.fieldLabel.

initialDirectoryback to summary
private File initialDirectory
readOnlyLabelback to summary
protected Label readOnlyLabel

Constructor Detail

SimpleChooserControlback to summary
public SimpleChooserControl(String buttonText, File initialDirectory, boolean directory)

Create a new SimpleChooserControl.

Parameters
buttonText:String

Text for the button to show, e.g. "Browse"

initialDirectory:File

An optional initial path, can be null. If null, will use the path from the previously chosen file if present.

directory:boolean

true, if only directories are allowed

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 SimpleChooserControl of(String buttonText, File initialDirectory, boolean directory, VisibilityProperty visibilityProperty)

Constructs a SimpleChooserControl of SimpleChooserControl type, with visibility condition.

Parameters
visibilityProperty:VisibilityProperty

property for control visibility of this element

Returns:SimpleChooserControl

the constructed SimpleChooserControl

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
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