ExcelAccessor Bean Suite

com.ibm.excelaccessor
Class ExcelFormat

java.lang.Object
  |
  +--com.ibm.excelaccessor.ExcelFormat
All Implemented Interfaces:
java.io.Serializable

public class ExcelFormat
extends java.lang.Object
implements java.io.Serializable

This bean represents some format-related properties of a cell. For accessing this properties, the ExcelFormatModel and the ExcelRange or ExcelCell beans must be used, too.

See Also:
ExcelFormatModel, ExcelCell, ExcelRange, Serialized Form

Field Summary
static int DOUBLE
          This ID can be used for setting the underline property to DOUBLE according to the Ms Excel.
static int DOUBLE_ACCOUNTING
          This ID can be used for setting the underline property to DOUBLE_ACCOUNTING according to the Ms Excel.
static int NONE
          This ID can be used for setting the underline property to NONE according to the Ms Excel.
protected  java.beans.PropertyChangeSupport propertyChange
           
static int SINGLE
          This ID can be used for setting the underline property to SINGLE according to the Ms Excel.
static int SINGLE_ACCOUNTING
          This ID can be used for setting the underline property to SINGLE_ACCOUNTING according to the Ms Excel.
 
Constructor Summary
ExcelFormat()
          ExcelFormat constructor.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          The addPropertyChangeListener method was generated to support the propertyChange field.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          The addPropertyChangeListener method was generated to support the propertyChange field.
 void firePropertyChange(java.beans.PropertyChangeEvent evt)
          The firePropertyChange method was generated to support the propertyChange field.
 void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
          The firePropertyChange method was generated to support the propertyChange field.
 void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
          The firePropertyChange method was generated to support the propertyChange field.
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          The firePropertyChange method was generated to support the propertyChange field.
 java.lang.String getAboutThisBean()
          Gets the aboutThisBean property (java.lang.String) value.
 java.awt.Color getColor()
          Gets the color property (java.awt.Color) value.
 double getColorAsDouble()
          Gets the color property as a double value.
 int getFontStyle()
          Gets the fontstyle property.
 java.lang.String getName()
          Gets the name property (java.lang.String) value.
 java.lang.String getNumberFormat()
          Gets the numberformat property (java.lang.String) value.
protected  java.beans.PropertyChangeSupport getPropertyChange()
          Accessor for the propertyChange field.
 int getSize()
          Gets the size property (int) value.
 int getUnderline()
          Gets the underline property (int) value.
 boolean hasListeners(java.lang.String propertyName)
          The hasListeners method was generated to support the propertyChange field.
 boolean isBold()
          Checks whether the font style of the appropriate cell is bold.
 boolean isItalic()
          Checks whether the font style of the appropriate cell is italic.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          The removePropertyChangeListener method was generated to support the propertyChange field.
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          The removePropertyChangeListener method was generated to support the propertyChange field.
 void setAboutThisBean(java.lang.String aboutThisBean)
          Sets the aboutThisBean property (java.lang.String) value.
 void setBold(boolean bold)
          Sets the bold property (boolean) value of the font.
 void setColor(java.awt.Color pColor)
          Sets the color property (java.awt.Color) value.
 void setColor(double pColor)
          Sets the color property of the bean as a double value.
 void setFontStyle(int pStyle)
          Sets the fontstyle property.
 void setItalic(boolean italic)
          Sets the italic property (boolean) value of the font.
 void setName(java.lang.String pName)
          Sets the name property (java.lang.String) value.
 void setNumberFormat(java.lang.String pNumberFormat)
          Sets the numberformat property.
 void setSize(int pSize)
          Sets the size property (int) value.
 void setUnderline(int pUnderline)
          Sets the underline property (int) value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
This ID can be used for setting the underline property to NONE according to the Ms Excel.

SINGLE

public static final int SINGLE
This ID can be used for setting the underline property to SINGLE according to the Ms Excel.

DOUBLE

public static final int DOUBLE
This ID can be used for setting the underline property to DOUBLE according to the Ms Excel.

SINGLE_ACCOUNTING

public static final int SINGLE_ACCOUNTING
This ID can be used for setting the underline property to SINGLE_ACCOUNTING according to the Ms Excel.

DOUBLE_ACCOUNTING

public static final int DOUBLE_ACCOUNTING
This ID can be used for setting the underline property to DOUBLE_ACCOUNTING according to the Ms Excel.

propertyChange

protected transient java.beans.PropertyChangeSupport propertyChange
Constructor Detail

ExcelFormat

public ExcelFormat()
ExcelFormat constructor.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
The addPropertyChangeListener method was generated to support the propertyChange field.

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
The addPropertyChangeListener method was generated to support the propertyChange field.

firePropertyChange

public void firePropertyChange(java.beans.PropertyChangeEvent evt)
The firePropertyChange method was generated to support the propertyChange field.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               int oldValue,
                               int newValue)
The firePropertyChange method was generated to support the propertyChange field.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
The firePropertyChange method was generated to support the propertyChange field.

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               boolean oldValue,
                               boolean newValue)
The firePropertyChange method was generated to support the propertyChange field.

getAboutThisBean

public java.lang.String getAboutThisBean()
Gets the aboutThisBean property (java.lang.String) value.
Returns:
The aboutThisBean property value.
See Also:
setAboutThisBean(java.lang.String)

getColor

public java.awt.Color getColor()
Gets the color property (java.awt.Color) value.
Returns:
The color property value.
See Also:
setColor(double)

getColorAsDouble

public double getColorAsDouble()
Gets the color property as a double value.
Returns:
double
See Also:
setColor(double)

getFontStyle

public int getFontStyle()
Gets the fontstyle property.
Returns:
int
See Also:
setFontStyle(int)

getName

public java.lang.String getName()
Gets the name property (java.lang.String) value.
Returns:
The name property value.
See Also:
setName(java.lang.String)

getNumberFormat

public java.lang.String getNumberFormat()
Gets the numberformat property (java.lang.String) value. This property is the same as the format property of the ExcelRange and ExcelCell. Do not use in the future the format property of the ExcelRange and ExcelCell, because it may be removed.
Returns:
The numberformat property value.
See Also:
setNumberFormat(java.lang.String)

getPropertyChange

protected java.beans.PropertyChangeSupport getPropertyChange()
Accessor for the propertyChange field.

getSize

public int getSize()
Gets the size property (int) value.
Returns:
The size property value.
See Also:
setSize(int)

getUnderline

public int getUnderline()
Gets the underline property (int) value.
Returns:
The underline property value.
See Also:
setUnderline(int)

hasListeners

public boolean hasListeners(java.lang.String propertyName)
The hasListeners method was generated to support the propertyChange field.

isBold

public boolean isBold()
Checks whether the font style of the appropriate cell is bold.
Returns:
boolean
See Also:
setBold(boolean)

isItalic

public boolean isItalic()
Checks whether the font style of the appropriate cell is italic.
Returns:
boolean
See Also:
setItalic(boolean)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
The removePropertyChangeListener method was generated to support the propertyChange field.

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
The removePropertyChangeListener method was generated to support the propertyChange field.

setAboutThisBean

public void setAboutThisBean(java.lang.String aboutThisBean)
Sets the aboutThisBean property (java.lang.String) value. Note that this method does nothing.
Parameters:
aboutThisBean - The new value for the property.
See Also:
getAboutThisBean()

setBold

public void setBold(boolean bold)
Sets the bold property (boolean) value of the font.
Parameters:
bold - The new value for the property.
See Also:
isBold()

setColor

public void setColor(double pColor)
Sets the color property of the bean as a double value. The double value can be derived from the RGB color model, that is value = 1*R + 256*G + 256*256*B, where the R, G and B letters conform to the red, green and blue components. The legal values of components are the decimal numbers from the range [0, … , 255]. As the Excel allows only 40 colors to a font, the Excel COM rounds your color values to the closest value it supports.
Parameters:
pColor - double

setColor

public void setColor(java.awt.Color pColor)
Sets the color property (java.awt.Color) value. As the Excel allows only 40 colors to a font, the Excel COM rounds your color values to the closest value it supports.
Parameters:
color - The new value for the property.
See Also:
getColor()

setFontStyle

public void setFontStyle(int pStyle)
Sets the fontstyle property. The legal values are java.awt.Font.PLAIN, java.awt.Font.BOLD, java.awt.Font.ITALIC
Parameters:
int - The new value for the property.
See Also:
getFontStyle()

setItalic

public void setItalic(boolean italic)
Sets the italic property (boolean) value of the font.
Parameters:
boolean - The new value for the property.
See Also:
isItalic()

setName

public void setName(java.lang.String pName)
Sets the name property (java.lang.String) value. Note that the font supply of the Excel is richer than the Java's, and the Excel font names and the Java font names are different. A suitable mapping can be the following:
JavaExcel
MonospacedCourier New
DialogArial
DialoginputArial
SerifMs Serif
Parameters:
pName - The new value for the property.
See Also:
getName()

setNumberFormat

public void setNumberFormat(java.lang.String pNumberFormat)
Sets the numberformat property.
Parameters:
pNumberFormat - The new value for the property.
See Also:
getNumberFormat()

setSize

public void setSize(int pSize)
Sets the size property (int) value.
Parameters:
size - The new value for the property.
See Also:
getSize()

setUnderline

public void setUnderline(int pUnderline)
Sets the underline property (int) value. The legal values are NONE, SINGLE, DOUBLE, SINGLE_ACCOUNTING and DOUBLE_ACCOUNTING.
Parameters:
pUnderline - The new value for the property.
See Also:
getUnderline()

ExcelAccessor Bean Suite

ExcelAccessor Bean Suite