new EditorMananger()
Property editor manager. This class is used to select most suitable property editor for a certain property
in object inspector.
Methods
-
findEditorClass(objClass, propInfo) → {Class}
-
Find a suitable property editor class based on objClass and propInfo. If nothing found, null will be returned.
Parameters:
Name Type Description objClassClass propInfoObject Returns:
- Type
- Class
-
findEditorClassForType(propType, propName) → {Class}
-
Find a suitable property editor simply by property type and property name. This method is useful to find property editor for some simple type value (such as object, array element).
Parameters:
Name Type Description propTypeString propNameString Returns:
- Type
- Class
-
register(editorClass, propType, objClass, propName, matchFunc)
-
Register a property editor. Usually at least one of propType, objClass, propName and matchFunc param should be set. If nothing is set, a default editor will be registered.
Parameters:
Name Type Description editorClassClass Property editor class. propTypeString Type of property, value from DataType. Set null to match all types. objClassClass Target class. Property editor will only apply to properties in this class. Set null to match all classes. propNameString Property name. Property editor will only apply to property with this name. Set null to match all property names. matchFuncFunc A custom function to check if property editor matches on a property. The function is in the following form: match(objClass, propInfo) and should return a boolean result. -
unregister(editorClass)
-
Unregister a property editor.
Parameters:
Name Type Description editorClassClass