Module com.gluonhq.charm.glisten
Class OptionEditorBase<T,C extends Node>
- java.lang.Object
-
- com.gluonhq.charm.glisten.control.settings.OptionEditorBase<T,C>
-
- Type Parameters:
T
- The type of the option being edited.C
- The type of Node that is used to edit this option.
- All Implemented Interfaces:
OptionEditor<T>
public abstract class OptionEditorBase<T,C extends Node> extends Object implements OptionEditor<T>
An abstract implementation of theOptionEditor
interface.- Since:
- 2.0.0
-
-
Property Summary
-
Properties inherited from interface com.gluonhq.charm.glisten.control.settings.OptionEditor
value
-
-
Constructor Summary
Constructors Constructor Description OptionEditorBase(Option<T> option, C control)
Creates an editable AbstractPropertyEditor instance for the given option using the given editing control.OptionEditorBase(Option<T> option, C control, boolean readonly)
Creates an AbstractPropertyEditor instance for the given option using the given editing control.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description C
getEditor()
Returns the editor responsible for editing this option.Option<T>
getOption()
Returns the option that this property editor is responsible for editing.T
getValue()
Returns the current value in the editor-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gluonhq.charm.glisten.control.settings.OptionEditor
setValue, valueProperty
-
-
-
-
Constructor Detail
-
OptionEditorBase
public OptionEditorBase(Option<T> option, C control)
Creates an editable AbstractPropertyEditor instance for the given option using the given editing control.- Parameters:
option
- The option that the instance is responsible for editing.control
- The control that is responsible for editing the option.
-
OptionEditorBase
public OptionEditorBase(Option<T> option, C control, boolean readonly)
Creates an AbstractPropertyEditor instance for the given option using the given editing control. It may be read-only or editable, based on the readonly boolean parameter.- Parameters:
option
- The option that the instance is responsible for editing.control
- The control that is responsible for editing the option.readonly
- Specifies whether the editor should allow input or not.
-
-
Method Detail
-
getOption
public final Option<T> getOption()
Returns the option that this property editor is responsible for editing.- Returns:
- an
Option
of type T that will be edited with this editor
-
getEditor
public C getEditor()
Returns the editor responsible for editing this option.- Specified by:
getEditor
in interfaceOptionEditor<T>
- Returns:
- the
Node
used for editing this option
-
getValue
public T getValue()
Returns the current value in the editor- Specified by:
getValue
in interfaceOptionEditor<T>
- Returns:
- T the value in the editor, of type T
-
-