Module qupath.fx

Class PropertyItemParser

java.lang.Object
qupath.fx.prefs.controlsfx.PropertyItemParser

public class PropertyItemParser extends Object
A parser for JavaFX properties annotated with Pref and related annotations.

This can be used to create a list of PropertySheet.Item objects for use with a PropertySheet, while writing minimal code (i.e. just define the properties and annotate them appropriately).

For an alternative that does not use annotations, see PropertyItemBuilder.

  • Constructor Details

    • PropertyItemParser

      public PropertyItemParser()
  • Method Details

    • setResourceManager

      public PropertyItemParser setResourceManager(LocalizedResourceManager manager)
      Set the resource manager. This is used to obtain localized strings for annotated preferences from a ResourceBundle.
      Parameters:
      manager -
      Returns:
    • setLocaleManager

      public PropertyItemParser setLocaleManager(LocaleManager manager)
      Set the locale manager. This is used to control the available locales for any preference annotated with LocalePref.
      Parameters:
      manager -
      Returns:
    • parseAnnotatedItems

      public List<org.controlsfx.control.PropertySheet.Item> parseAnnotatedItems(Object obj)
      Parse all the JavaFX properties with annotations (e.g. Pref) that are accessible fields of the given object.
      Parameters:
      obj -
      Returns: