com.l2fprod.common.propertysheet
Class PropertyEditorRegistry

java.lang.Object
  extended by com.l2fprod.common.propertysheet.PropertyEditorRegistry
All Implemented Interfaces:
PropertyEditorFactory

public class PropertyEditorRegistry
extends java.lang.Object
implements PropertyEditorFactory

Mapping between Properties, Property Types and Property Editors.


Constructor Summary
PropertyEditorRegistry()
           
 
Method Summary
 java.beans.PropertyEditor createPropertyEditor(Property property)
           
 java.beans.PropertyEditor getEditor(java.lang.Class type)
          Gets an editor for the given property type.
 java.beans.PropertyEditor getEditor(Property property)
          Gets an editor for the given property.
 void registerDefaults()
          Adds default editors.
 void registerEditor(java.lang.Class type, java.lang.Class editorClass)
           
 void registerEditor(java.lang.Class type, java.beans.PropertyEditor editor)
           
 void registerEditor(Property property, java.lang.Class editorClass)
           
 void registerEditor(Property property, java.beans.PropertyEditor editor)
           
 void unregisterEditor(java.lang.Class type)
           
 void unregisterEditor(Property property)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyEditorRegistry

public PropertyEditorRegistry()
Method Detail

createPropertyEditor

public java.beans.PropertyEditor createPropertyEditor(Property property)
Specified by:
createPropertyEditor in interface PropertyEditorFactory

getEditor

public java.beans.PropertyEditor getEditor(Property property)
Gets an editor for the given property. The lookup is as follow:

Parameters:
property -
Returns:
an editor suitable for the Property.

getEditor

public java.beans.PropertyEditor getEditor(java.lang.Class type)
Gets an editor for the given property type. The lookup is as follow:

Parameters:
type -
Returns:
an editor suitable for the Property type or null if none found

registerEditor

public void registerEditor(java.lang.Class type,
                           java.lang.Class editorClass)

registerEditor

public void registerEditor(java.lang.Class type,
                           java.beans.PropertyEditor editor)

unregisterEditor

public void unregisterEditor(java.lang.Class type)

registerEditor

public void registerEditor(Property property,
                           java.lang.Class editorClass)

registerEditor

public void registerEditor(Property property,
                           java.beans.PropertyEditor editor)

unregisterEditor

public void unregisterEditor(Property property)

registerDefaults

public void registerDefaults()
Adds default editors. This method is called by the constructor but may be called later to reset any customizations made through the registerEditor methods. Note: if overriden, super.registerDefaults() must be called before plugging custom defaults.