The output from this program is the following:
Properties:
rectangular
Events:
mouseWheel
mouse
mouseMotion
component
hierarchyBounds
focus
hierarchy
propertyChange
inputMethod
key
Notice two things in the output. First, because ColorsBeanInfo overrides
getPropertyDescriptors( ) such that the only property returned is rectangular, only
the rectangular property is displayed. However, because getEventSetDescriptors( ) is
not overridden by ColorsBeanInfo, design-pattern introspection is used, and all events
are found, including those in Colors' superclass, Canvas. Remember, if you don't override
one of the "get" methods defined by SimpleBeanInfo, then the default, design-pattern
introspection is used. To observe the difference that ColorsBeanInfo makes, erase its class
file and then run IntrospectorDemo again. This time it will report more properties.
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks
Home