com.ebmwebsourcing.webdesigner.presentation.gwt.client.metamodel.properties.editors
Class PropertyEditorFactory

java.lang.Object
  extended by com.ebmwebsourcing.webdesigner.presentation.gwt.client.metamodel.properties.editors.PropertyEditorFactory
Direct Known Subclasses:
SetPropertyEditorFactory

public class PropertyEditorFactory
extends java.lang.Object

Factory to create a field in property editor.
The field is created given the type of the property value.
Important: Primitive / Generic types are already registered, but every new type has
to be registered in order to be properly rendered in the property grid.

TODO: improve / find a better way --- NOT A PRIORITY

Author:
enhan, nfleury

Constructor Summary
PropertyEditorFactory()
           
 
Method Summary
static com.gwtext.client.widgets.form.Field getEditorForProperty(DiagramProperty<?> p)
          This method performs cast check by instanceof statements
static com.gwtext.client.widgets.form.Field getFieldByClass(java.lang.Class<?> clazz)
           
static java.util.ArrayList<PropertyEditorRegistratorHandler> getRHandlers()
           
static void registerPropertyEditorRegistratorHandler(PropertyEditorRegistratorHandler handler)
          Register the handler to register a property editor ... weird huh ?
static void registerType(java.lang.Class<?> clazz, com.gwtext.client.widgets.form.Field field)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyEditorFactory

public PropertyEditorFactory()
Method Detail

getEditorForProperty

public static com.gwtext.client.widgets.form.Field getEditorForProperty(DiagramProperty<?> p)
This method performs cast check by instanceof statements

Parameters:
p -
Returns:

getFieldByClass

public static com.gwtext.client.widgets.form.Field getFieldByClass(java.lang.Class<?> clazz)

registerType

public static void registerType(java.lang.Class<?> clazz,
                                com.gwtext.client.widgets.form.Field field)

registerPropertyEditorRegistratorHandler

public static void registerPropertyEditorRegistratorHandler(PropertyEditorRegistratorHandler handler)
Register the handler to register a property editor ... weird huh ? ...

Parameters:
handler -

getRHandlers

public static java.util.ArrayList<PropertyEditorRegistratorHandler> getRHandlers()


Copyright © 2010 eBM WebSourcing. All Rights Reserved.