11.6 Property Editors - Reference Documentation
Authors: Andres Almiray
Version: 1.2.0
11.6 Property Editors
Resource injection makes use of the PropertyEditor mechanism provided by thejava.beans package. The default ResourcesInjector queries PropertyEditorManager whenever a resource value must be transformed to a target type.PropertyEditorManager provides methods for registering custom PropertyEditors, it also follows a class name convention to load PropertyEditors should a custom one is not programmatically registered. Griffon applications will automatically load and register PropertyEditors from the following classpath resource: /META-INF/services/java.beans.PropertyEditor. Each line follows the format
target.type = full.qualified.classnameThe following table enumerates the default PropertyEditors loaded by Griffon at startup. Plugins such as swing and javafx may register additional editors.| Type | Editor Class |
|---|---|
| java.lang.String | griffon.core.resources.editors.StringPropertyEditor |
| java.io.File | griffon.core.resources.editors.FilePropertyEditor |
| java.net.URL | griffon.core.resources.editors.URLPropertyEditor |
| java.net.URI | griffon.core.resources.editors.URIPropertyEditor |
/META-INF/services/java.beans.PropertyEditor inside griffon-rt-1.2.0.jar) for these editors is thusjava.lang.String = griffon.core.resources.editors.StringPropertyEditor
java.io.File = griffon.core.resources.editors.FilePropertyEditor
java.net.URL = griffon.core.resources.editors.URLPropertyEditor
java.net.URI = griffon.core.resources.editors.URIPropertyEditor