ExcelAccessor Bean Suite

com.ibm.excelaccessor
Class ExcelFormatModel

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

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

The ExcelFormatModel bean together with the ExcelFormat bean lets you to access and modify some of these properties from Java code. You can imagine the ExcelFormatModel bean as a two dimensional Java array. The elements of the array are ExcelFormat beans. You can fill the ExcelFormatModel bean from an Excel worksheet via the ExcelRange or ExcelCell beans, as these beans have an excelFormatModel property.

See Also:
ExcelFormat, ExcelCell, ExcelRange, Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport propertyChange
           
 
Constructor Summary
ExcelFormatModel()
          ExcelFormatModel constructor comment.
 
Method Summary
 void addExcelFormat(int row, int col, ExcelFormat pExcelFormat)
          Adds the argument ExcelFormat bean to the model to the specified position.
 void addExcelFormatListener(ExcelFormatListener newListener)
          Adds an eventlistener to the bean.
 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 fireFilledModel(ExcelFormatEvent event)
          Method to support listener events.
 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.
 void fireSavedModel(ExcelFormatEvent event)
          Method to support listener events.
 java.lang.String getAboutThisBean()
          Gets the aboutThisBean property (java.lang.String) value.
 java.awt.Color getColor(int row, int col)
          Delegates the getColor query to the ExcelFormat bean situated in the specified position.
 double getColorAsDouble(int row, int col)
          Delegates the getColorAsDouble query to the ExcelFormat bean situated in the specified position.
 int getColumnCount()
          Gets the columncount property.
 ExcelFormat getExcelFormat(int row, int col)
          Gets the ExcelFormat bean situated in the specified position.
 int getFontStyle(int row, int col)
          Delegates the getFontStyle query to the ExcelFormat bean situated in the specified position.
 java.lang.String getName(int row, int col)
          Delegates the getName query to the ExcelFormat bean situated in the specified position.
 java.lang.String getNumberFormat(int row, int col)
          Delegates the getNumberFormat query to the ExcelFormat bean situated in the specified position.
protected  java.beans.PropertyChangeSupport getPropertyChange()
          Accessor for the propertyChange field.
 int getRowCount()
          Gets the rowcount property.
 int getSize(int row, int col)
          Delegates the getSize query to the ExcelFormat bean situated in the specified position.
 int getUnderline(int row, int col)
          Delegates the getUnderline query to the ExcelFormat bean situated in the specified position.
 boolean hasListeners(java.lang.String propertyName)
          The hasListeners method was generated to support the propertyChange field.
 void initialize()
          Initializes the model.
 boolean isBold(int row, int col)
          Delegates the isBold query to the ExcelFormat bean situated in the specified position.
 boolean isInitialized()
          Checks whether the model is in initialized state.
 boolean isItalic(int row, int col)
          Delegates the isItalic query to the ExcelFormat bean situated in the specified position.
 void removeExcelFormatListener(ExcelFormatListener newListener)
          Removes a listener from the bean.
 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 setAllColor(java.awt.Color pColor)
          Sets the color property for all the ExcelFormat beans contained by the model.
 void setAllColor(double pColorValue)
          Sets the color property for all the ExcelFormat beans contained by the model.
 void setAllFontStyle(int pStyle)
          Sets the fontstyle property for all the ExcelFormat beans contained by the model.
 void setAllName(java.lang.String pName)
          Sets the name property for all the ExcelFormat beans contained by the model.
 void setAllNumberFormat(java.lang.String pNumberFormat)
          Sets the numberformat property for all the ExcelFormat beans contained by the model.
 void setAllSize(int pSize)
          Sets the size property for all the ExcelFormat beans contained by the model.
 void setAllUnderline(int pUnderline)
          Sets the underline property for all the ExcelFormat beans contained by the model.
 void setBold(int row, int col, boolean pBold)
          Delegates the setBold query to the ExcelFormat bean situated in the specified position.
 void setColor(int row, int col, java.awt.Color pColor)
          Delegates the setColor query to the ExcelFormat bean situated in the specified position.
 void setColor(int row, int col, double pColorValue)
          Delegates the setColor query to the ExcelFormat bean situated in the specified position.
 void setColumnCount(int newColumnCount)
          Sets the columncount property.
 void setFontStyle(int row, int col, int pStyle)
          Delegates the setFontStyle query to the ExcelFormat bean situated in the specified position.
 void setItalic(int row, int col, boolean pItalic)
          Delegates the setItalic query to the ExcelFormat bean situated in the specified position.
 void setName(int row, int col, java.lang.String pName)
          Delegates the setName query to the ExcelFormat bean situated in the specified position.
 void setNumberFormat(int row, int col, java.lang.String pNumberFormat)
          Delegates the setNumberFormat query to the ExcelFormat bean situated in the specified position.
 void setRowCount(int newRowCount)
          Sets the rowcount property.
 void setSize(int row, int col, int pSize)
          Delegates the setSize query to the ExcelFormat bean situated in the specified position.
 void setUnderline(int row, int col, int pUnderline)
          Delegates the setUnderline query to the ExcelFormat bean situated in the specified position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyChange

protected transient java.beans.PropertyChangeSupport propertyChange
Constructor Detail

ExcelFormatModel

public ExcelFormatModel()
ExcelFormatModel constructor comment.
Method Detail

addExcelFormat

public void addExcelFormat(int row,
                           int col,
                           ExcelFormat pExcelFormat)
                    throws ExcelAccessorException
Adds the argument ExcelFormat bean to the model to the specified position. Note that the positions start from 0 and last to rowcount-1 and columncount-1 according to the conventions of the Java arrays.
Parameters:
row - int
col - int
pExcelFormat - com.ibm.excelaccessor.ExcelFormat
Throws:
ExcelAccessorException - If the row or col argument value is out of the model dimension boundaries, the ExcelAccessorException is thrown.

addExcelFormatListener

public void addExcelFormatListener(ExcelFormatListener newListener)
Adds an eventlistener to the bean.
Parameters:
newListener - com.ibm.excelaccessor.ExcelFormatListener

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.

fireFilledModel

public void fireFilledModel(ExcelFormatEvent event)
Method to support listener events. This method is used by the ExcelCell and ExcelRange beans. You should not use it.
Parameters:
event - com.ibm.excelaccessor.event.ExcelFormatEvent

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.

fireSavedModel

public void fireSavedModel(ExcelFormatEvent event)
Method to support listener events. This method is used by the ExcelCell and ExcelRange beans. You should not use it.
Parameters:
event - com.ibm.excelaccessor.event.ExcelFormatEvent

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(int row,
                               int col)
                        throws ExcelAccessorException
Delegates the getColor query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
Returns:
java.awt.Color
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

getColorAsDouble

public double getColorAsDouble(int row,
                               int col)
                        throws ExcelAccessorException
Delegates the getColorAsDouble query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
Returns:
double
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

getColumnCount

public int getColumnCount()
Gets the columncount property.
Returns:
int The property value.

getExcelFormat

public ExcelFormat getExcelFormat(int row,
                                  int col)
                           throws ExcelAccessorException
Gets the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
Returns:
com.ibm.excelaccessor.ExcelFormat
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

getFontStyle

public int getFontStyle(int row,
                        int col)
                 throws ExcelAccessorException
Delegates the getFontStyle query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
Returns:
int
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

getName

public java.lang.String getName(int row,
                                int col)
                         throws ExcelAccessorException
Delegates the getName query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
Returns:
java.lang.String
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

getNumberFormat

public java.lang.String getNumberFormat(int row,
                                        int col)
                                 throws ExcelAccessorException
Delegates the getNumberFormat query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
Returns:
java.lang.String
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

getPropertyChange

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

getRowCount

public int getRowCount()
Gets the rowcount property.
Returns:
int

getSize

public int getSize(int row,
                   int col)
            throws ExcelAccessorException
Delegates the getSize query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
Returns:
int
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

getUnderline

public int getUnderline(int row,
                        int col)
                 throws ExcelAccessorException
Delegates the getUnderline query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
Returns:
int
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

hasListeners

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

initialize

public void initialize()
                throws ExcelAccessorException
Initializes the model.
Throws:
ExcelAccessorException - Exception is thrown when the rowcount or columncount value of the model is less than 1.

isBold

public boolean isBold(int row,
                      int col)
               throws ExcelAccessorException
Delegates the isBold query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
Returns:
boolean
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

isItalic

public boolean isItalic(int row,
                        int col)
                 throws ExcelAccessorException
Delegates the isItalic query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
Returns:
boolean
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

removeExcelFormatListener

public void removeExcelFormatListener(ExcelFormatListener newListener)
Removes a listener from the bean.
Parameters:
newListener - com.ibm.excelaccessor.ExcelFormatListener

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. This method is only for visual builder tools, and does nothing.
Parameters:
aboutThisBean - The new value for the property.
See Also:
getAboutThisBean()

setAllColor

public void setAllColor(double pColorValue)
                 throws ExcelAccessorException
Sets the color property for all the ExcelFormat beans contained by the model.
Parameters:
row - int
col - int
Throws:
ExcelAccessorException - Exception is thrown when the model is not in initialized state.

setAllColor

public void setAllColor(java.awt.Color pColor)
                 throws ExcelAccessorException
Sets the color property for all the ExcelFormat beans contained by the model.
Parameters:
row - int
col - int
Throws:
ExcelAccessorException - Exception is thrown when the model is not in initialized state.

setAllFontStyle

public void setAllFontStyle(int pStyle)
                     throws ExcelAccessorException
Sets the fontstyle property for all the ExcelFormat beans contained by the model.
Parameters:
row - int
col - int
Throws:
ExcelAccessorException - Exception is thrown when the model is not in initialized state.

setAllName

public void setAllName(java.lang.String pName)
                throws ExcelAccessorException
Sets the name property for all the ExcelFormat beans contained by the model.
Parameters:
row - int
col - int
Throws:
ExcelAccessorException - Exception is thrown when the model is not in initialized state.

setAllNumberFormat

public void setAllNumberFormat(java.lang.String pNumberFormat)
                        throws ExcelAccessorException
Sets the numberformat property for all the ExcelFormat beans contained by the model.
Parameters:
row - int
col - int
Throws:
ExcelAccessorException - Exception is thrown when the model is not in initialized state.

setAllSize

public void setAllSize(int pSize)
                throws ExcelAccessorException
Sets the size property for all the ExcelFormat beans contained by the model.
Parameters:
row - int
col - int
Throws:
ExcelAccessorException - Exception is thrown when the model is not in initialized state.

setAllUnderline

public void setAllUnderline(int pUnderline)
                     throws ExcelAccessorException
Sets the underline property for all the ExcelFormat beans contained by the model.
Parameters:
row - int
col - int
Throws:
ExcelAccessorException - Exception is thrown when the model is not in initialized state.

setBold

public void setBold(int row,
                    int col,
                    boolean pBold)
             throws ExcelAccessorException
Delegates the setBold query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
pBold - boolean
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

setColor

public void setColor(int row,
                     int col,
                     double pColorValue)
              throws ExcelAccessorException
Delegates the setColor query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
pColorValue - double
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

setColor

public void setColor(int row,
                     int col,
                     java.awt.Color pColor)
              throws ExcelAccessorException
Delegates the setColor query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
pColor - java.awt.Color
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

setColumnCount

public void setColumnCount(int newColumnCount)
Sets the columncount property.
Parameters:
newColumnCount - int

setFontStyle

public void setFontStyle(int row,
                         int col,
                         int pStyle)
                  throws ExcelAccessorException
Delegates the setFontStyle query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
pStyle - int
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

setItalic

public void setItalic(int row,
                      int col,
                      boolean pItalic)
               throws ExcelAccessorException
Delegates the setItalic query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
pItalic - boolean
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

setName

public void setName(int row,
                    int col,
                    java.lang.String pName)
             throws ExcelAccessorException
Delegates the setName query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
pName - java.lang.String
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

setNumberFormat

public void setNumberFormat(int row,
                            int col,
                            java.lang.String pNumberFormat)
                     throws ExcelAccessorException
Delegates the setNumberFormat query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
pNumberFormat - java.lang.String
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

setRowCount

public void setRowCount(int newRowCount)
Sets the rowcount property.
Parameters:
newRowCount - int

setSize

public void setSize(int row,
                    int col,
                    int pSize)
             throws ExcelAccessorException
Delegates the setSize query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
pSize - int
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

setUnderline

public void setUnderline(int row,
                         int col,
                         int pUnderline)
                  throws ExcelAccessorException
Delegates the setUnderline query to the ExcelFormat bean situated in the specified position.
Parameters:
row - int
col - int
pUnderline - int
Throws:
ExcelAccessorException - Exception is thrown when the indexes are out of the model boundaries or when the model is not in initialized state.

isInitialized

public boolean isInitialized()
Checks whether the model is in initialized state.
Returns:
boolean

ExcelAccessor Bean Suite

ExcelAccessor Bean Suite