ElegantJ PDF Library Java API Specification v1.1

com.elegantj.beaninfo.awt
Class SimpleBeanInfo

java.lang.Object
  extended byjava.beans.SimpleBeanInfo
      extended bycom.elegantj.beaninfo.awt.SimpleBeanInfo
All Implemented Interfaces:
java.beans.BeanInfo
Direct Known Subclasses:
PDFBeanInfo

public abstract class SimpleBeanInfo
extends java.beans.SimpleBeanInfo

Simple BeanInfo Abstract class provides the utility methods to set/get the properties. It's subclass should override the methods : getPropertyDescriptors(), getBeanDescriptor().


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
 java.beans.PropertyDescriptor[] add(java.beans.PropertyDescriptor[] array1, java.beans.PropertyDescriptor[] array2)
          Adds the property descriptors array.
abstract  java.beans.BeanDescriptor getBeanDescriptor()
          Denies knowledge about the class and customizer of the bean
 java.awt.Image getIcon(int iconKind)
          This method returns an image object that can be used to represent the bean in toolboxes, toolbars, etc.
protected  java.beans.IndexedPropertyDescriptor getIndexedPropertyDescriptor(java.lang.String strProperty)
          Gets the indexed property descriptor with specified property name
 java.beans.PropertyDescriptor getPropertyDescriptor(java.beans.PropertyDescriptor[] array, java.lang.String propName)
          Gets the property descriptor from the array by specified property name.
protected  java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.String strProperty)
          Gets the property descriptor with specified property name
 java.beans.PropertyDescriptor[] getPropertyDescriptors()
          Denies knowledge of properties.
protected  java.beans.PropertyDescriptor getReadOnlyPropertyDescriptor(java.lang.String strProperty)
          Gets the read only property descriptor with specified property name
protected  java.beans.PropertyDescriptor getWriteOnlyPropertyDescriptor(java.lang.String strProperty)
          Gets the write only property descriptor with specified property name
 java.beans.PropertyDescriptor[] removePropertyDescriptor(java.beans.PropertyDescriptor[] array, java.lang.String propName)
          Removes the property descriptor from the array by specified property name.
 java.beans.PropertyDescriptor[] removePropertyDescriptors(java.beans.PropertyDescriptor[] array, java.lang.String[] propNames)
          Removes the property descriptors from the array by specified property names.
 
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

SimpleBeanInfo

public SimpleBeanInfo()
Method Detail

add

public java.beans.PropertyDescriptor[] add(java.beans.PropertyDescriptor[] array1,
                                           java.beans.PropertyDescriptor[] array2)
Adds the property descriptors array.

Parameters:
array1 - the array of property descriptor
array2 - the array of property descriptor
Returns:
the combined array of property descriptor

getPropertyDescriptor

public java.beans.PropertyDescriptor getPropertyDescriptor(java.beans.PropertyDescriptor[] array,
                                                           java.lang.String propName)
Gets the property descriptor from the array by specified property name.

Parameters:
array - the array of property descriptor
propName - the name of the property
Returns:
the property descriptor which name is propName if found in the array, otherwise null

removePropertyDescriptor

public java.beans.PropertyDescriptor[] removePropertyDescriptor(java.beans.PropertyDescriptor[] array,
                                                                java.lang.String propName)
Removes the property descriptor from the array by specified property name.

Parameters:
array - the array of property descriptor
propName - the name of the property
Returns:
the property descriptor array which name is propName if found in the array, otherwise null

removePropertyDescriptors

public java.beans.PropertyDescriptor[] removePropertyDescriptors(java.beans.PropertyDescriptor[] array,
                                                                 java.lang.String[] propNames)
Removes the property descriptors from the array by specified property names.

Parameters:
array - the array of property descriptor
propNames - the names of the properties
Returns:
the property descriptor array which names in propNames if found in the array, otherwise null

getPropertyDescriptor

protected final java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.String strProperty)
Gets the property descriptor with specified property name

Parameters:
strProperty - the name of the property
Returns:
the property descriptor with the specified name

getIndexedPropertyDescriptor

protected final java.beans.IndexedPropertyDescriptor getIndexedPropertyDescriptor(java.lang.String strProperty)
Gets the indexed property descriptor with specified property name

Parameters:
strProperty - the name of the property
Returns:
the indexed property descriptor with the specified name

getReadOnlyPropertyDescriptor

protected final java.beans.PropertyDescriptor getReadOnlyPropertyDescriptor(java.lang.String strProperty)
Gets the read only property descriptor with specified property name

Parameters:
strProperty - the name of the property
Returns:
the read only property descriptor with the specified name

getWriteOnlyPropertyDescriptor

protected final java.beans.PropertyDescriptor getWriteOnlyPropertyDescriptor(java.lang.String strProperty)
Gets the write only property descriptor with specified property name

Parameters:
strProperty - the name of the property
Returns:
the write only property descriptor with the specified name

getPropertyDescriptors

public java.beans.PropertyDescriptor[] getPropertyDescriptors()
Denies knowledge of properties.

Returns:
An array of PropertyDescriptor 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. A subclass of this class should override this method

getBeanDescriptor

public abstract java.beans.BeanDescriptor getBeanDescriptor()
Denies knowledge about the class and customizer of the bean

Returns:
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 A subclass of this class should override this method

getIcon

public java.awt.Image getIcon(int iconKind)
This method returns an image object that can be used to represent the bean in toolboxes, toolbars, etc. Icon images will be GIFs, override this method to return other formats. We recommend that icons have a "transparent" background so they can be rendered onto an existing background. There are four possible flavors of icons (16x16 color, 32x32 color, 16x16 mono, 32x32 mono). If a bean choses to only support a single icon we recommend supporting 16x16 color. Each icon has the name as "Bean Name"+"Icon" (as Text) +"Icon Type", as an example Test bean has the 16x16 color icon called as "TestIconColor16.gif". If only one icon is specified it has the name as "Bean Name" + "Icon" (as Text) as an example "TestIcon.gif".

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.

ElegantJ PDF Library Java API Specification v1.1

For any feedback, suggestion, or query, please revert back to support@elegantjpdf.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjpdf.com
All Rights Reserved.