API java : SimpleBeanInfo


java.beans
Class SimpleBeanInfo

java.lang.Object
  extended by java.beans.SimpleBeanInfo
All Implemented Interfaces:
BeanInfo

public class SimpleBeanInfo
extends Object
implements BeanInfo

This is a support class to make it easier for people to provide BeanInfo classes.

It defaults to providing "noop" information, and can be selectively overriden to provide more explicit information on chosen topics. When the introspector sees the "noop" values, it will apply low level introspection and design patterns to automatically analyze the target bean.


Field Summary
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
SimpleBeanInfo()
           
 
Method Summary
 BeanInfo[] getAdditionalBeanInfo()
          Claim there are no other relevant BeanInfo objects.
 BeanDescriptor getBeanDescriptor()
          Deny knowledge about the class and customizer of the bean.
 int getDefaultEventIndex()
          Deny knowledge of a default event.
 int getDefaultPropertyIndex()
          Deny knowledge of a default property.
 EventSetDescriptor[] getEventSetDescriptors()
          Deny knowledge of event sets.
 Image getIcon(int iconKind)
          Claim there are no icons available.
 MethodDescriptor[] getMethodDescriptors()
          Deny knowledge of methods.
 PropertyDescriptor[] getPropertyDescriptors()
          Deny knowledge of properties.
 Image loadImage(String resourceName)
          This is a utility method to help in loading icon images.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleBeanInfo

public SimpleBeanInfo()
Method Detail

getBeanDescriptor

public BeanDescriptor getBeanDescriptor()
Deny knowledge about the class and customizer of the bean. You can override this if you wish to provide explicit info.

Specified by:
getBeanDescriptor in interface BeanInfo
Returns:
A BeanDescriptor providing overall information about the bean, such as its displayName, its customizer, etc. May return null if the information should be obtained by automatic analysis.

getPropertyDescriptors

public PropertyDescriptor[] getPropertyDescriptors()
Deny knowledge of properties. You can override this if you wish to provide explicit property info.

Specified by:
getPropertyDescriptors in interface BeanInfo
Returns:
An array of PropertyDescriptors describing the editable properties supported by this bean. May return null if the information should be obtained by automatic analysis.

If a property is indexed, then its entry in the result array will belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor. A client of getPropertyDescriptors can use "instanceof" to check if a given PropertyDescriptor is an IndexedPropertyDescriptor.


getDefaultPropertyIndex

public int getDefaultPropertyIndex()
Deny knowledge of a default property. You can override this if you wish to define a default property for the bean.

Specified by:
getDefaultPropertyIndex in interface BeanInfo
Returns:
Index of default property in the PropertyDescriptor array returned by getPropertyDescriptors.

Returns -1 if there is no default property.


getEventSetDescriptors

public EventSetDescriptor[] getEventSetDescriptors()
Deny knowledge of event sets. You can override this if you wish to provide explicit event set info.

Specified by:
getEventSetDescriptors in interface BeanInfo
Returns:
An array of EventSetDescriptors describing the kinds of events fired by this bean. May return null if the information should be obtained by automatic analysis.

getDefaultEventIndex

public int getDefaultEventIndex()
Deny knowledge of a default event. You can override this if you wish to define a default event for the bean.

Specified by:
getDefaultEventIndex in interface BeanInfo
Returns:
Index of default event in the EventSetDescriptor array returned by getEventSetDescriptors.

Returns -1 if there is no default event.


getMethodDescriptors

public MethodDescriptor[] getMethodDescriptors()
Deny knowledge of methods. You can override this if you wish to provide explicit method info.

Specified by:
getMethodDescriptors in interface BeanInfo
Returns:
An array of MethodDescriptors describing the externally visible methods supported by this bean. May return null if the information should be obtained by automatic analysis.

getAdditionalBeanInfo

public BeanInfo[] getAdditionalBeanInfo()
Claim there are no other relevant BeanInfo objects. You may override this if you want to (for example) return a BeanInfo for a base class.

Specified by:
getAdditionalBeanInfo in interface BeanInfo
Returns:
an array of BeanInfo objects. May return null.

getIcon

public Image getIcon(int iconKind)
Claim there are no icons available. You can override this if you want to provide icons for your bean.

Specified by:
getIcon in interface BeanInfo
Parameters:
iconKind - The kind of icon requested. This should be one of the constant values ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, or ICON_MONO_32x32.
Returns:
An image object representing the requested icon. May return null if no suitable icon is available.

loadImage

public Image loadImage(String resourceName)
This is a utility method to help in loading icon images. It takes the name of a resource file associated with the current object's class file and loads an image object from that file. Typically images will be GIFs.

Parameters:
resourceName - A pathname relative to the directory holding the class file of the current class. For example, "wombat.gif".
Returns:
an image object. May be null if the load failed.

Ces informations proviennent du site de http://java.sun.com

Remarques

Contenu

Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :

Quels sont les motivations de cette démarche?

Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.

Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.

Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.

Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.

Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.

Réseaux sociaux

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.

 

Nuage de mots clés

6 mots clés dont 0 définis manuellement (plus d'information...).

Avertissement

Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.

 

Astuce pour imprimer les couleurs des cellules de tableaux : http://www.gaudry.be/ast-rf-450.html
Aucun commentaire pour cette page

© Ce document issu de l′infobrol est enregistré sous le certificat Cyber PrInterDeposit Digital Numbertection. Enregistrement IDDN n° 5329-1525
Document créé le 30/08/06 02:56, dernière modification le Vendredi 17 Juin 2011, 12:12
Source du document imprimé : http://www.gaudry.be/java-api-rf-java/beans/SimpleBeanInfo.html Document affiché 1 fois ce mois de Juin.
St.Gaudry©07.01.02
Outils (masquer)
||
Recherche (afficher)
Recherche :

Utilisateur (masquer)
Apparence (afficher)
Stats (afficher)
15832 documents
452 astuces.
549 niouzes.
3099 definitions.
447 membres.
8115 messages.

Document genere en :
0,80 seconde

Mises à jour :
Mises à jour du site
Citation (masquer)
Connaître son ignorance est la meilleure part de la connaissance.

Proverbe chinois
 
l'infobrol
Nous sommes le Vendredi 01 Juin 2012, 15:06, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)