Module qupath.fx

Class PropertyEditorFactory

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

    Fields
    Modifier and Type
    Field
    Description
    A default reformatter that can be used to show enums in a nicer way (i.e.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ENUM_REFORMATTER

      public Function<?,String> 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 interface javafx.util.Callback<org.controlsfx.control.PropertySheet.Item,org.controlsfx.property.editor.PropertyEditor<?>>
      Overrides:
      call in class org.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

      public 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.
      Parameters:
      enumTypes -
    • setReformatType

      public void setReformatType(Class<?> cls, Function<?,String> formatter)
      Request that editors created with this factory reformat the display of the specified type.
      Parameters:
      cls -
      formatter -