Module org.controlsfx.controls
Package org.controlsfx.property.editor
Class AbstractPropertyEditor<T,C extends Node>
- java.lang.Object
-
- org.controlsfx.property.editor.AbstractPropertyEditor<T,C>
-
- 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 thePropertyEditorinterface.
-
-
Constructor Summary
Constructors Constructor Description AbstractPropertyEditor(PropertySheet.Item property, C control)Creates an editable AbstractPropertyEditor instance for the given property using the given editing control.AbstractPropertyEditor(PropertySheet.Item property, C control, boolean readonly)Creates an AbstractPropertyEditor instance for the given property using the given editing control.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CgetEditor()Returns the editor responsible for editing this property.protected abstract ObservableValue<T>getObservableValue()Returns anObservableValueof the property that this property editor is responsible for editing.PropertySheet.ItemgetProperty()Returns the property that this property editor is responsible for editing.TgetValue()Returns the current value in the editor - this may not be the value of the property itself!-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.controlsfx.property.editor.PropertyEditor
setValue
-
-
-
-
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 anObservableValueof 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:
getEditorin interfacePropertyEditor<T>
-
getValue
public T getValue()
Returns the current value in the editor - this may not be the value of the property itself!- Specified by:
getValuein interfacePropertyEditor<T>
-
-