Class PropertyEditorRegistry

java.lang.Object
com.bc.ceres.swing.binding.PropertyEditorRegistry

public class PropertyEditorRegistry extends Object
A registry for PropertyEditor.
Since:
BEAM 4.6
Version:
$Revision$ $Date$
  • Method Details

    • getInstance

      public static PropertyEditorRegistry getInstance()
    • setInstance

      public static void setInstance(PropertyEditorRegistry registry)
    • getPropertyEditor

      public PropertyEditor getPropertyEditor(String className)
      Gets a PropertyEditor by its class name.
      Parameters:
      className - The class name of the PropertyEditor.
      Returns:
      the value editor or null if no editor exist for the given class name.
    • findPropertyEditor

      public PropertyEditor findPropertyEditor(PropertyDescriptor propertyDescriptor)
      Finds a matching PropertyEditor for the given PropertyDescriptor.

      At first , if set, the property "propertyEditor" of the property descriptor is used. Afterwards all registered PropertyEditors are tested, whether the can provide an editor. As a fallback a TextFieldEditor is returned.

      Parameters:
      propertyDescriptor - the value descriptor
      Returns:
      the editor that can edit values described by the value descriptor