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 aSettingsPanecontrol.- 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 anOptionalof aFunctionthat returns an instance of theOptionEditorthat should be used for editing this option.StringgetCaption()Returns the display name of the property associated to theOptionor the name associated to the group of options.StringgetCategory()Returns aStringrepresentation of the category of the property.ObservableList<Option>getChildren()Returns theObservableListofsub-optionsthat a given option contains.StringgetDescription()AStringthat will be shown to the user as a tooltip.Optional<String>getExtendedDescription()A longStringthat will be shown to the user in an extended view.Optional<Node>getGraphic()Returns anOptionalwith the node that will be displayed as a graphic on the left side of the option if not emptyOrientationgetLayout()Returns theOrientationof theOption, that defines its layout:Orientation.HORIZONTALsets 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 anOptionalof aStringConverterthat can be applied to the valuebooleanisEditable()Indicates whether theSettingsPanecontrol 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 anOptionalwith 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 theOptionor 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()
AStringthat 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 longStringthat 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 aStringrepresentation 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 theSettingsPanecontrol 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 anOptionalof aFunctionthat returns an instance of theOptionEditorthat should be used for editing this option.
-
getChildren
ObservableList<Option> getChildren()
Returns theObservableListofsub-optionsthat a given option contains.- Returns:
ObservableListwithoptions
-
getStringConverter
Optional<StringConverter<T>> getStringConverter()
Returns anOptionalof aStringConverterthat can be applied to the value- Returns:
Optionalwith aStringConverterif not empty
-
getLayout
Orientation getLayout()
Returns theOrientationof theOption, that defines its layout:-
Orientation.HORIZONTALsets an horizontal layout, with an optional graphic on the left, caption and description on the center, and editor on the right. Orientation.VERTICALsets a vertical layout, with an optional graphic on the left, caption on top and editor on bottom.
Orientation.HORIZONTAL- Returns:
Orientationthat indicates the layout of theOption
-
-
-