com.l2fprod.common.beans
Class BaseBeanInfo

java.lang.Object
  extended by java.beans.SimpleBeanInfo
      extended by com.l2fprod.common.beans.BaseBeanInfo
All Implemented Interfaces:
java.beans.BeanInfo
Direct Known Subclasses:
PropertySheetPage.BeanBeanInfo

public class BaseBeanInfo
extends java.beans.SimpleBeanInfo

A convenient class to build beaninfos by adding and removing properties.


Field Summary
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
BaseBeanInfo(java.lang.Class type)
           
 
Method Summary
 ExtendedPropertyDescriptor addProperty(java.lang.String propertyName)
           
protected  java.beans.PropertyDescriptor addPropertyDescriptor(java.beans.PropertyDescriptor property)
           
 java.beans.BeanDescriptor getBeanDescriptor()
           
 java.lang.String getDescription(java.lang.Object value)
          Return a text describing briefly the object.
 java.awt.Image getIcon(int kind)
          Get the icon for displaying this bean.
 java.beans.PropertyDescriptor getPropertyDescriptor(int index)
           
 int getPropertyDescriptorCount()
           
 java.beans.PropertyDescriptor[] getPropertyDescriptors()
           
 ResourceManager getResources()
           
 java.lang.String getText(java.lang.Object value)
          Return a text describing the object.
 java.lang.String getToolTipText(java.lang.Object value)
          Return a text describing the object.
 java.lang.Class getType()
           
 java.beans.PropertyDescriptor removeProperty(java.lang.String propertyName)
          Removes the first occurrence of the property named propertyName
 
Methods inherited from class java.beans.SimpleBeanInfo
getAdditionalBeanInfo, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getMethodDescriptors, loadImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseBeanInfo

public BaseBeanInfo(java.lang.Class type)
Method Detail

getType

public final java.lang.Class getType()

getResources

public ResourceManager getResources()

getBeanDescriptor

public java.beans.BeanDescriptor getBeanDescriptor()
Specified by:
getBeanDescriptor in interface java.beans.BeanInfo
Overrides:
getBeanDescriptor in class java.beans.SimpleBeanInfo

getPropertyDescriptors

public java.beans.PropertyDescriptor[] getPropertyDescriptors()
Specified by:
getPropertyDescriptors in interface java.beans.BeanInfo
Overrides:
getPropertyDescriptors in class java.beans.SimpleBeanInfo

getPropertyDescriptorCount

public int getPropertyDescriptorCount()

getPropertyDescriptor

public java.beans.PropertyDescriptor getPropertyDescriptor(int index)

addPropertyDescriptor

protected java.beans.PropertyDescriptor addPropertyDescriptor(java.beans.PropertyDescriptor property)

addProperty

public ExtendedPropertyDescriptor addProperty(java.lang.String propertyName)

removeProperty

public java.beans.PropertyDescriptor removeProperty(java.lang.String propertyName)
Removes the first occurrence of the property named propertyName

Parameters:
propertyName -
Returns:
the removed PropertyDescriptor or null if not found.

getIcon

public java.awt.Image getIcon(int kind)
Get the icon for displaying this bean.

Specified by:
getIcon in interface java.beans.BeanInfo
Overrides:
getIcon in class java.beans.SimpleBeanInfo
Parameters:
kind - Kind of icon.
Returns:
Image for bean, or null if none.

getText

public java.lang.String getText(java.lang.Object value)
Return a text describing the object.

Parameters:
value - an Object value
Returns:
a text describing the object.

getDescription

public java.lang.String getDescription(java.lang.Object value)
Return a text describing briefly the object. The text will be used whereever a explanation is needed to give to the user

Parameters:
value - an Object value
Returns:
a String value

getToolTipText

public java.lang.String getToolTipText(java.lang.Object value)
Return a text describing the object. The text will be displayed in a tooltip.

Parameters:
value - an Object value
Returns:
a String value