diff options
Diffstat (limited to 'libjava/classpath/java/beans/BeanInfo.java')
-rw-r--r-- | libjava/classpath/java/beans/BeanInfo.java | 212 |
1 files changed, 106 insertions, 106 deletions
diff --git a/libjava/classpath/java/beans/BeanInfo.java b/libjava/classpath/java/beans/BeanInfo.java index 525500a389c..3c9bf1bcdae 100644 --- a/libjava/classpath/java/beans/BeanInfo.java +++ b/libjava/classpath/java/beans/BeanInfo.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -73,109 +73,109 @@ package java.beans; **/ public interface BeanInfo { - /** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/ - int ICON_COLOR_16x16 = 1; - /** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/ - int ICON_COLOR_32x32 = 2; - /** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/ - int ICON_MONO_16x16 = 3; - /** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/ - int ICON_MONO_32x32 = 4; - - /** Get the general description of this Bean type. - ** @return the BeanDescriptor for the Bean, or null if - ** the BeanDescriptor should be obtained by - ** Introspection. - **/ - BeanDescriptor getBeanDescriptor(); - - /** Get the events this Bean type fires. - ** @return the EventDescriptors representing events this - ** Bean fires. Returns <CODE>null</CODE> if the - ** events are to be acquired by Introspection. - **/ - EventSetDescriptor[] getEventSetDescriptors(); - - /** Get the "default" event, basically the one a RAD tool - ** user is most likely to select. - ** @return the index into the getEventSetDescriptors() - ** that the user is most likely to use. Returns - ** <CODE>-1</CODE> if there is no default event. - **/ - int getDefaultEventIndex(); - - /** Get the properties (get/set method pairs) this Bean - ** type supports. - ** @return the PropertyDescriptors representing the - ** properties this Bean type supports. - ** Returns <CODE>null</CODE> if the properties - ** are to be obtained by Introspection. - **/ - PropertyDescriptor[] getPropertyDescriptors(); - - /** Get the "default" property, basically the one a RAD - ** tool user is most likely to select. - ** @return the index into the getPropertyDescriptors() - ** that the user is most likely to use. Returns - ** <CODE>-1</CODE> if there is no default event. - **/ - int getDefaultPropertyIndex(); - - /** Get the methods this Bean type supports. - ** @return the MethodDescriptors representing the - ** methods this Bean type supports. Returns - ** <CODE>null</CODE> if the methods are to be - ** obtained by Introspection. - **/ - MethodDescriptor[] getMethodDescriptors(); - - /** Get additional BeanInfos representing this Bean. - ** In this version of JavaBeans, this method is used so - ** that space and time can be saved by reading a BeanInfo - ** for each class in the hierarchy (super, super(super), - ** and so on).<P> - ** - ** The order of precedence when two pieces of BeanInfo - ** conflict (such as two PropertyDescriptors that have - ** the same name), in order from highest precedence to - ** lowest, is: - ** <OL> - ** <LI>This BeanInfo object.</LI> - ** <LI><CODE>getAdditionalBeanInfo()[getAdditionalBeanInfo().length]</CODE></LI> - ** <LI> ... </LI> - ** <LI><CODE>getAdditionalBeanInfo()[1]</CODE></LI> - ** <LI><CODE>getAdditionalBeanInfo()[0]</CODE></LI> - ** </OL><P> - ** - ** <STRONG>Spec Note:</STRONG> It is possible that - ** returning <CODE>null</CODE> from this method could - ** stop Introspection in its tracks, but it is unclear - ** from the spec whether this is the case. - ** - ** @return additional BeanInfos representing this Bean. - ** <CODE>null</CODE> may be returned (see Spec - ** Note, above). - **/ - BeanInfo[] getAdditionalBeanInfo(); - - /** Get a visual icon for this Bean. - ** A Bean does not have to support icons, and if it does - ** support icons, it does not have to support every single - ** type. Sun recommends that if you only support one - ** type, you support 16x16 color. Sun also notes that you - ** should try to use a type (like GIF) that allows for - ** transparent pixels, so that the background of the RAD - ** tool can show through.<P> - ** - ** <STRONG>Spec Note:</STRONG> If you do not support the - ** type of icon that is being asked for, but you do - ** support another type, it is unclear whether you should - ** return the other type or not. I would presume not. - ** - ** @param iconType the type of icon to get (see the - ** ICON_* constants in this class). - ** @return the icon, or null if that type of icon is - ** unsupported by this Bean. - **/ - java.awt.Image getIcon(int iconType); + /** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/ + int ICON_COLOR_16x16 = 1; + /** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/ + int ICON_COLOR_32x32 = 2; + /** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/ + int ICON_MONO_16x16 = 3; + /** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/ + int ICON_MONO_32x32 = 4; + + /** Get the general description of this Bean type. + ** @return the BeanDescriptor for the Bean, or null if + ** the BeanDescriptor should be obtained by + ** Introspection. + **/ + BeanDescriptor getBeanDescriptor(); + + /** Get the events this Bean type fires. + ** @return the EventDescriptors representing events this + ** Bean fires. Returns <CODE>null</CODE> if the + ** events are to be acquired by Introspection. + **/ + EventSetDescriptor[] getEventSetDescriptors(); + + /** Get the "default" event, basically the one a RAD tool + ** user is most likely to select. + ** @return the index into the getEventSetDescriptors() + ** that the user is most likely to use. Returns + ** <CODE>-1</CODE> if there is no default event. + **/ + int getDefaultEventIndex(); + + /** Get the properties (get/set method pairs) this Bean + ** type supports. + ** @return the PropertyDescriptors representing the + ** properties this Bean type supports. + ** Returns <CODE>null</CODE> if the properties + ** are to be obtained by Introspection. + **/ + PropertyDescriptor[] getPropertyDescriptors(); + + /** Get the "default" property, basically the one a RAD + ** tool user is most likely to select. + ** @return the index into the getPropertyDescriptors() + ** that the user is most likely to use. Returns + ** <CODE>-1</CODE> if there is no default event. + **/ + int getDefaultPropertyIndex(); + + /** Get the methods this Bean type supports. + ** @return the MethodDescriptors representing the + ** methods this Bean type supports. Returns + ** <CODE>null</CODE> if the methods are to be + ** obtained by Introspection. + **/ + MethodDescriptor[] getMethodDescriptors(); + + /** Get additional BeanInfos representing this Bean. + ** In this version of JavaBeans, this method is used so + ** that space and time can be saved by reading a BeanInfo + ** for each class in the hierarchy (super, super(super), + ** and so on).<P> + ** + ** The order of precedence when two pieces of BeanInfo + ** conflict (such as two PropertyDescriptors that have + ** the same name), in order from highest precedence to + ** lowest, is: + ** <OL> + ** <LI>This BeanInfo object.</LI> + ** <LI><CODE>getAdditionalBeanInfo()[getAdditionalBeanInfo().length]</CODE></LI> + ** <LI> ... </LI> + ** <LI><CODE>getAdditionalBeanInfo()[1]</CODE></LI> + ** <LI><CODE>getAdditionalBeanInfo()[0]</CODE></LI> + ** </OL><P> + ** + ** <STRONG>Spec Note:</STRONG> It is possible that + ** returning <CODE>null</CODE> from this method could + ** stop Introspection in its tracks, but it is unclear + ** from the spec whether this is the case. + ** + ** @return additional BeanInfos representing this Bean. + ** <CODE>null</CODE> may be returned (see Spec + ** Note, above). + **/ + BeanInfo[] getAdditionalBeanInfo(); + + /** Get a visual icon for this Bean. + ** A Bean does not have to support icons, and if it does + ** support icons, it does not have to support every single + ** type. Sun recommends that if you only support one + ** type, you support 16x16 color. Sun also notes that you + ** should try to use a type (like GIF) that allows for + ** transparent pixels, so that the background of the RAD + ** tool can show through.<P> + ** + ** <STRONG>Spec Note:</STRONG> If you do not support the + ** type of icon that is being asked for, but you do + ** support another type, it is unclear whether you should + ** return the other type or not. I would presume not. + ** + ** @param iconType the type of icon to get (see the + ** ICON_* constants in this class). + ** @return the icon, or null if that type of icon is + ** unsupported by this Bean. + **/ + java.awt.Image getIcon(int iconType); } |