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 PropertyEditor
findPropertyEditor(PropertyDescriptor propertyDescriptor)
Finds a matchingPropertyEditor
for the givenPropertyDescriptor
.static PropertyEditorRegistry
getInstance()
PropertyEditor
getPropertyEditor(String className)
Gets aPropertyEditor
by its class name.static void
setInstance(PropertyEditorRegistry registry)
-
-
-
Method Detail
-
getInstance
public static PropertyEditorRegistry getInstance()
-
setInstance
public static void setInstance(PropertyEditorRegistry registry)
-
getPropertyEditor
public PropertyEditor getPropertyEditor(String className)
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
public PropertyEditor findPropertyEditor(PropertyDescriptor propertyDescriptor)
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
-
-