java.lang.Object
org.controlsfx.property.editor.DefaultPropertyEditorFactory
qupath.fx.prefs.controlsfx.PropertyEditorFactory
- All Implemented Interfaces:
javafx.util.Callback<org.controlsfx.control.PropertySheet.Item,
org.controlsfx.property.editor.PropertyEditor<?>>
public class PropertyEditorFactory
extends org.controlsfx.property.editor.DefaultPropertyEditorFactory
Extends
DefaultPropertyEditorFactory
from ControlsFX to offer more editors, including for directories,
choices, locales, and choices from a searchable list.-
Field Summary
Modifier and TypeFieldDescriptionA default reformatter that can be used to show enums in a nicer way (i.e. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.controlsfx.property.editor.PropertyEditor<?>
call
(org.controlsfx.control.PropertySheet.Item item) org.controlsfx.property.editor.PropertyEditor<?>
getEditor
(org.controlsfx.control.PropertySheet.Item item) Get the editor associated with a particular item, assuming it has already been created and cached by this factory.void
setReformatEnums
(Class<? extends Enum>... enumTypes) Request that editors created with this factory reformat the default string display of the specified enums using the default reformatting method.void
setReformatType
(Class<?> cls, Function<?, String> formatter) Request that editors created with this factory reformat the display of the specified type.
-
Field Details
-
ENUM_REFORMATTER
A default reformatter that can be used to show enums in a nicer way (i.e. lowercase with the first letter capitalized, and underscores replaced with spaces).
-
-
Constructor Details
-
PropertyEditorFactory
public PropertyEditorFactory()
-
-
Method Details
-
call
public org.controlsfx.property.editor.PropertyEditor<?> call(org.controlsfx.control.PropertySheet.Item item) - Specified by:
call
in interfacejavafx.util.Callback<org.controlsfx.control.PropertySheet.Item,
org.controlsfx.property.editor.PropertyEditor<?>> - Overrides:
call
in classorg.controlsfx.property.editor.DefaultPropertyEditorFactory
-
getEditor
public org.controlsfx.property.editor.PropertyEditor<?> getEditor(org.controlsfx.control.PropertySheet.Item item) Get the editor associated with a particular item, assuming it has already been created and cached by this factory.- Parameters:
item
-- Returns:
- the editor if it exists, or null otherwise
-
setReformatEnums
Request that editors created with this factory reformat the default string display of the specified enums using the default reformatting method.- Parameters:
enumTypes
-
-
setReformatType
Request that editors created with this factory reformat the display of the specified type.- Parameters:
cls
-formatter
-
-