Class OptionEditorBase<T,​C extends Node>

  • 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 the OptionEditor interface.
    Since:
    2.0.0
    • 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 interface OptionEditor<T>
        Returns:
        the Node used for editing this option
      • getValue

        public T getValue()
        Returns the current value in the editor
        Specified by:
        getValue in interface OptionEditor<T>
        Returns:
        T the value in the editor, of type T