Package com.bc.ceres.swing.binding
Class PropertyEditorRegistry
- java.lang.Object
-
- com.bc.ceres.swing.binding.PropertyEditorRegistry
-
public class PropertyEditorRegistry extends Object
A registry forPropertyEditor.- Since:
- BEAM 4.6
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyEditorfindPropertyEditor(PropertyDescriptor propertyDescriptor)Finds a matchingPropertyEditorfor the givenPropertyDescriptor.static PropertyEditorRegistrygetInstance()PropertyEditorgetPropertyEditor(String className)Gets aPropertyEditorby its class name.static voidsetInstance(PropertyEditorRegistry registry)
-
-
-
Method Detail
-
getInstance
public static PropertyEditorRegistry getInstance()
-
setInstance
public static void setInstance(PropertyEditorRegistry registry)
-
getPropertyEditor
public PropertyEditor getPropertyEditor(String className)
Gets aPropertyEditorby its class name.- Parameters:
className- The class name of thePropertyEditor.- Returns:
- the value editor or
nullif no editor exist for the given class name.
-
findPropertyEditor
public PropertyEditor findPropertyEditor(PropertyDescriptor propertyDescriptor)
Finds a matchingPropertyEditorfor the givenPropertyDescriptor.At first , if set, the property
"propertyEditor"of the property descriptor is used. Afterwards all registeredPropertyEditors are tested, whether the can provide an editor. As a fallback aTextFieldEditoris returned.- Parameters:
propertyDescriptor- the value descriptor- Returns:
- the editor that can edit values described by the value descriptor
-
-