|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.beans.SimpleBeanInfo
|
+--TimerBeanBeanInfo
TimerBean BeanInfo class: This class stores information about the TimerBean (Bean) for use by a builder tool. The builder tool looks to this class to find out information about the properties, events, and methods the TimerBean supports.
| Fields inherited from interface java.beans.BeanInfo |
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 |
| Constructor Summary | |
TimerBeanBeanInfo()
|
|
| Method Summary | |
java.awt.Image |
getIcon(int i)
This method gives the TimerBean (Bean) a custom icon in the builder tool. |
java.beans.MethodDescriptor[] |
getMethodDescriptors()
This method tells the builder tool which methods I want the user to see and have access to. |
java.beans.PropertyDescriptor[] |
getPropertyDescriptors()
This method overrides the default property descriptors. |
| Methods inherited from class java.beans.SimpleBeanInfo |
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, loadImage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TimerBeanBeanInfo()
| Method Detail |
public java.awt.Image getIcon(int i)
PRE: This method assumes that the parameter is not equal to null.
POST: This method does nothing more than return a color 16x16 image if the parameter is equal to 1 or a color 32x32 image if the parameter is equal to 2 otherwise it returns null.
getIcon in class java.beans.SimpleBeanInfoi - Type of icon requested by the Builder tool.public java.beans.PropertyDescriptor[] getPropertyDescriptors()
PRE: This method assumes that there is a String value named "timeOut" in the TimerBean class.
POST: This method does nothing more than try to create a PropertyDescriptor object for the "timeOut" value in the TimerBean class. In the process it lets the bean tool know that this is a custom property descriptor and that the TimeOutEditor class will handle the display. Afterwards, it sets the display name and returns the newly created ProperyDescriptor object.
getPropertyDescriptors in class java.beans.SimpleBeanInfopublic java.beans.MethodDescriptor[] getMethodDescriptors()
PRE: This method assumes that there are method called 'startTimer', 'stopTimer' and 'resetTImer' in the TimerBean class.
POST: This method is in charge of letting the bean tool know what methods to display to the user. It does so by first creating a Method object for each of the methods we want to display. Then finally it creates and returns a MethodDescriptor object array composed of the Method object we have just created.
getMethodDescriptors in class java.beans.SimpleBeanInfo
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||