Module com.gluonhq.charm.glisten
Interface Option<T>
-
- Type Parameters:
T
- The type of the property of the Option value
- All Known Implementing Classes:
DefaultOption
,OptionBase
public interface Option<T>
A wrapper interface for a single option to be displayed in aSettingsPane
control.- Since:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<Function<Option<T>,OptionEditor<T>>>
editorFactoryProperty()
Returns anOptional
of aFunction
that returns an instance of theOptionEditor
that should be used for editing this option.String
getCaption()
Returns the display name of the property associated to theOption
or the name associated to the group of options.String
getCategory()
Returns aString
representation of the category of the property.ObservableList<Option>
getChildren()
Returns theObservableList
ofsub-options
that a given option contains.String
getDescription()
AString
that will be shown to the user as a tooltip.Optional<String>
getExtendedDescription()
A longString
that will be shown to the user in an extended view.Optional<Node>
getGraphic()
Returns anOptional
with the node that will be displayed as a graphic on the left side of the option if not emptyOrientation
getLayout()
Returns theOrientation
of theOption
, that defines its layout:Orientation.HORIZONTAL
sets an horizontal layout, with an optional graphic on the left, caption and description on the center, and editor on the right.Optional<StringConverter<T>>
getStringConverter()
Returns anOptional
of aStringConverter
that can be applied to the valueboolean
isEditable()
Indicates whether theSettingsPane
control should allow editing this option, or whether it is read-only.Property<T>
valueProperty()
Returns the underlyingProperty
, where one exists, that the editor can monitor for changes.
-
-
-
Field Detail
-
SEPARATOR
static final String SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getGraphic
Optional<Node> getGraphic()
Returns anOptional
with the node that will be displayed as a graphic on the left side of the option if not empty
-
getCaption
String getCaption()
Returns the display name of the property associated to theOption
or the name associated to the group of options. It should be short (i.e. less than two words). This is used to explain to the end user what the option represents.
-
getDescription
String getDescription()
AString
that will be shown to the user as a tooltip. This allows for a longer form of detail than what is possible with thegetCaption()
method.
-
getExtendedDescription
Optional<String> getExtendedDescription()
A longString
that will be shown to the user in an extended view. This allows for a longer form of detail than what is possible with thegetCaption()
method.
-
getCategory
String getCategory()
Returns aString
representation of the category of the property. This is relevant when properties with the same category can be grouped together visually.
-
valueProperty
Property<T> valueProperty()
Returns the underlyingProperty
, where one exists, that the editor can monitor for changes.
-
isEditable
boolean isEditable()
Indicates whether theSettingsPane
control should allow editing this option, or whether it is read-only.- Returns:
- boolean if the control is editable or not
-
editorFactoryProperty
Optional<Function<Option<T>,OptionEditor<T>>> editorFactoryProperty()
Returns anOptional
of aFunction
that returns an instance of theOptionEditor
that should be used for editing this option.
-
getChildren
ObservableList<Option> getChildren()
Returns theObservableList
ofsub-options
that a given option contains.- Returns:
ObservableList
withoptions
-
getStringConverter
Optional<StringConverter<T>> getStringConverter()
Returns anOptional
of aStringConverter
that can be applied to the value- Returns:
Optional
with aStringConverter
if not empty
-
getLayout
Orientation getLayout()
Returns theOrientation
of theOption
, that defines its layout:-
Orientation.HORIZONTAL
sets an horizontal layout, with an optional graphic on the left, caption and description on the center, and editor on the right. Orientation.VERTICAL
sets a vertical layout, with an optional graphic on the left, caption on top and editor on bottom.
Orientation.HORIZONTAL
- Returns:
Orientation
that indicates the layout of theOption
-
-
-