Class AbstractPropertyEditor<T,​C extends Node>

  • Type Parameters:
    T - The type of the property being edited.
    C - The type of Node that is used to edit this property.
    All Implemented Interfaces:
    PropertyEditor<T>

    public abstract class AbstractPropertyEditor<T,​C extends Node>
    extends Object
    implements PropertyEditor<T>
    An abstract implementation of the PropertyEditor interface.
    • Constructor Detail

      • AbstractPropertyEditor

        public AbstractPropertyEditor​(PropertySheet.Item property,
                                      C control)
        Creates an editable AbstractPropertyEditor instance for the given property using the given editing control.
        Parameters:
        property - The property that the instance is responsible for editing.
        control - The control that is responsible for editing the property.
      • AbstractPropertyEditor

        public AbstractPropertyEditor​(PropertySheet.Item property,
                                      C control,
                                      boolean readonly)
        Creates an AbstractPropertyEditor instance for the given property using the given editing control. It may be read-only or editable, based on the readonly boolean parameter being true or false.
        Parameters:
        property - The property that the instance is responsible for editing.
        control - The control that is responsible for editing the property.
        readonly - Specifies whether the editor should allow input or not.
    • Method Detail

      • getObservableValue

        protected abstract ObservableValue<T> getObservableValue()
        Returns an ObservableValue of the property that this property editor is responsible for editing. This is the editor's value, e.g. a TextField's textProperty().
      • getProperty

        public final PropertySheet.Item getProperty()
        Returns the property that this property editor is responsible for editing.
      • getEditor

        public C getEditor()
        Returns the editor responsible for editing this property.
        Specified by:
        getEditor in interface PropertyEditor<T>
      • getValue

        public T getValue()
        Returns the current value in the editor - this may not be the value of the property itself!
        Specified by:
        getValue in interface PropertyEditor<T>