public class TemplateCanvasBeanInfo extends CommonBeanInfo
CAT_APPEARANCE, CAT_BEHAVIOR, CAT_COMMON, CAT_DATA, CAT_DEPRECATED, CAT_LAYOUT, CAT_POSITION, DOUBLE_CLICK_CUSTOMIZER_KEY, DOUBLE_CLICK_HANDLER, EDIT_CLICK_HANDLER, RIGHT_CLICK_HANDLER, SECURITY_RESTRICTIONS, TAG_DROP_HANDLER_KEY, TERM_FINDER_CLASSbeanClass, BOUND_MASK, CATEGORY_KEY, CONSTRAINED_MASK, DISPLAY_ORDER_KEY, EXPERT_MASK, HIDDEN_MASK, log, NO_MASK, NOT_BINDABLE_KEY, NOT_BINDABLE_MASK, NOT_TRANSLATABLE_KEY, NOT_TRANSLATABLE_MASK, PREFERRED_MASK, PREFFERED_MASK, TRANSIENT_KEY, TRANSIENT_MASK| Constructor and Description |
|---|
TemplateCanvasBeanInfo() |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Image |
getIcon(int kind) |
protected void |
initComponentRestrictions(java.util.List<ComponentRestriction> restrictions)
Overridden to avoid the overlay option, which isn't reliable due to how repainting is handled.
|
protected void |
initDesc()
Implement this function to initialize the BeanDescriptor.
|
protected void |
initEventSets()
Called to add the event sets that this component will fire and should be handled by user scripting.
|
protected void |
initProperties()
CommonBeanInfo adds common properties, such as:
preferredSize (hidden, for serialization)
bounds (hidden, for serialization)
name
componentEnabled if the component is an EnabledEx
visible
border
toolTipText
font
foreground
background
opaque
|
protected void |
installTagDropHandler()
Called during construction to install a SQLTags drop handler for this component.
|
addCursorCode, addCursorCode, addDataQuality, addFocusEvents, addInputEventSets, addJComponentEventSets, addKeyEvents, addRotation, addVisualProps, configureTagDropHandler, createTagDropHandleraddBoundProp, addBoundProp, addEnumProp, addEnumProp, addEnumProp, addEnumProp, addEventSet, addEventSet, addEventSet, addEventSet, addMethod, addMethod, addMethod, addProp, addProp, addProp, addProp, addProp, addTransientProp, addTransientProp, addTransientProp, createProp, createProp, createProp, findProperty, getBeanDescriptor, getEventSetDescriptors, getIconPath, getIconPrefix, getIconResource, getMethodDescriptors, getPropertyDescriptors, initMethods, removeProp, setBackgroundProperty, setBackgroundProperty, setFlags, setFlags, setForegroundProperty, setForegroundProperty, toStringprotected void initDesc()
DefaultBeanInfoDefaultBeanInfo.getBeanDescriptor() to find the bean
descriptor and set it's meta props to be appropriate values for this bean.initDesc in class DefaultBeanInfoprotected void installTagDropHandler()
CommonBeanInfoCalled during construction to install a SQLTags drop handler for this component. A SQLTags drop handler is stored as a property on the BeanDescriptor with the key "tagDropHandler", and must implement TagDropHandler.
The default implementation of this function calls CommonBeanInfo.createTagDropHandler(). If that function returns a
subclass of DefaultTagDropHandler, then it will also call
CommonBeanInfo.configureTagDropHandler(DefaultTagDropHandler). If you override this function, then both
createTagDropHandler() and configureTagDropHandler() will not be used.
Typically you won't override this function. Most implementations will override
CommonBeanInfo.configureTagDropHandler(DefaultTagDropHandler) to simply set-up the default tag drop handler for the
component.
installTagDropHandler in class CommonBeanInfoprotected void initComponentRestrictions(java.util.List<ComponentRestriction> restrictions)
initComponentRestrictions in class CommonBeanInfoCommonBeanInfo.SECURITY_RESTRICTIONSprotected void initProperties()
throws java.beans.IntrospectionException
CommonBeanInfoCommonBeanInfo adds common properties, such as:
It is typical to override this function and then call super(). If you want to hide some of these functions, call removeProp with their names. After that you can add your own properties.
Remember, only properties you add here will be serialized on your component. All properties must have proper getter/setter functions. If you need a property to be serialized but not shown, use the HIDDEN_MASK. If you want to expose a read-only bound property, use HIDDEN_MASK | BOUND_MASK.
initProperties in class CommonBeanInfojava.beans.IntrospectionExceptionCommonBeanInfo.addCursorCode(),
CommonBeanInfo.addDataQuality(),
CommonBeanInfo.addVisualProps()protected void initEventSets()
throws java.beans.IntrospectionException
CommonBeanInfoCalled to add the event sets that this component will fire and should be handled by user scripting. By default this implementation adds common JComponent events scuh as propertyChange, mouse, and mouseMotion
To add a new eventSet, call DefaultBeanInfo.addEventSet(Class, String, Class, String) or one of its
overloads.
initEventSets in class CommonBeanInfojava.beans.IntrospectionExceptionpublic java.awt.Image getIcon(int kind)
getIcon in interface java.beans.BeanInfogetIcon in class DefaultBeanInfo