com.servoy.j2db.dataui
Class PropertyEditorHint
java.lang.Object
com.servoy.j2db.dataui.PropertyEditorHint
public class PropertyEditorHint
- extends Object
Class for providing a hint to Servoy Developer on which property editor to use for a bean property.
@see PropertyEditorClass for available editor classes.
@see PropertyEditorOption for available options.
Example:
public class ExampleBeanBeanInfo extends SimpleBeanInfo
{
public PropertyDescriptor[] getPropertyDescriptors()
{
try
{
PropertyDescriptor dp = new PropertyDescriptor("myDataprovider", ExampleBean.class);
PropertyEditorHint dpHint = new PropertyEditorHint(PropertyEditorClass.dataprovider);
dpHint.setOption(PropertyEditorOption.includeForm, Boolean.FALSE); // filter out form variables
dp.setValue(PropertyEditorHint.PROPERTY_EDITOR_HINT, dpHint);
....
return new PropertyDescriptor[] { dp, .... };
}
catch (IntrospectionException e)
{
Debug.error("MyBeanInfo: unexpected exception: " + e);
return null;
}
}
}
- Since:
- 5.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_EDITOR_HINT
public static final String PROPERTY_EDITOR_HINT
- Constant for configuring bean property editor hint.
- See Also:
PropertyDescriptor#setValue,
Constant Field Values
PropertyEditorHint
public PropertyEditorHint(PropertyEditorClass propertyEditorClass)
getDefaultOption
protected Object getDefaultOption(PropertyEditorOption key)
getOption
public Object getOption(PropertyEditorOption key)
getPropertyEditorClass
public PropertyEditorClass getPropertyEditorClass()
setOption
public void setOption(PropertyEditorOption key,
Object value)