Package com.bc.ceres.swing.binding
Class PropertyEditorRegistry
java.lang.Object
com.bc.ceres.swing.binding.PropertyEditorRegistry
A registry for
PropertyEditor
.- Since:
- BEAM 4.6
- Version:
- $Revision$ $Date$
-
Method Summary
Modifier and TypeMethodDescriptionfindPropertyEditor
(PropertyDescriptor propertyDescriptor) Finds a matchingPropertyEditor
for the givenPropertyDescriptor
.static PropertyEditorRegistry
getPropertyEditor
(String className) Gets aPropertyEditor
by its class name.static void
setInstance
(PropertyEditorRegistry registry)
-
Method Details
-
getInstance
-
setInstance
-
getPropertyEditor
Gets aPropertyEditor
by its class name.- Parameters:
className
- The class name of thePropertyEditor
.- Returns:
- the value editor or
null
if no editor exist for the given class name.
-
findPropertyEditor
Finds a matchingPropertyEditor
for the givenPropertyDescriptor
.At first , if set, the property
"propertyEditor"
of the property descriptor is used. Afterwards all registeredPropertyEditor
s are tested, whether the can provide an editor. As a fallback aTextFieldEditor
is returned.- Parameters:
propertyDescriptor
- the value descriptor- Returns:
- the editor that can edit values described by the value descriptor
-