ExcelAccessor Bean Suite

com.ibm.excelaccessor.event
Class ExcelWorkbookEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.ibm.excelaccessor.event.ExcelWorkbookEvent
All Implemented Interfaces:
java.io.Serializable

public class ExcelWorkbookEvent
extends java.util.EventObject

This event is fired to signal the opening, closing or the unprotecting of the structure of the workbook.

See Also:
EventObject, ExcelWorkbookListener, Serialized Form

Field Summary
protected  int id
          The event-id indicating the type of event.
protected  boolean readOnly
          Indicates whether the file was opened in the read-only mode.
protected  boolean saveOnClose
          Indicates whether the file was saved before closing if it had been modified.
static int WORKBOOK_CLOSED
          The id for the WORKBOOK_CLOSED type of event.
static int WORKBOOK_OPENED
          The id for the WORKBOOK_OPENED type of event.
static int WORKBOOK_STRUCTURE_UNPROTECTED
          The id for the WORKBOOK_STRUCTURE_UNPROTECTED type of event.
protected  java.lang.String workbookName
          The name of the workbook affected by the operation.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ExcelWorkbookEvent(java.lang.Object source, int id, java.lang.String workbookName, boolean flag)
          Constructs a ExcelWorkbookEvent object with the specified source object, the name of the concerned workbook and the appropriate flag depending upon the type of event.
 
Method Summary
 int getId()
          Returns an id indicating the type of event.
 java.lang.String getWorkbookName()
          Returns the name of the affected workbook.
 boolean isReadOnly()
          Returns whether the file has been opened in the read only mode or not.
 boolean isSaveOnClose()
          Returns whether the file has been saved before being closed.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WORKBOOK_OPENED

public static final int WORKBOOK_OPENED
The id for the WORKBOOK_OPENED type of event.

WORKBOOK_CLOSED

public static final int WORKBOOK_CLOSED
The id for the WORKBOOK_CLOSED type of event.

WORKBOOK_STRUCTURE_UNPROTECTED

public static final int WORKBOOK_STRUCTURE_UNPROTECTED
The id for the WORKBOOK_STRUCTURE_UNPROTECTED type of event.

readOnly

protected boolean readOnly
Indicates whether the file was opened in the read-only mode. Is valid only in case of the WORKBOOK_OPENED event type.

saveOnClose

protected boolean saveOnClose
Indicates whether the file was saved before closing if it had been modified. Is valid only in case of the WORKBOOK_CLOSED event type.

workbookName

protected java.lang.String workbookName
The name of the workbook affected by the operation.

id

protected int id
The event-id indicating the type of event.
Constructor Detail

ExcelWorkbookEvent

public ExcelWorkbookEvent(java.lang.Object source,
                          int id,
                          java.lang.String workbookName,
                          boolean flag)
Constructs a ExcelWorkbookEvent object with the specified source object, the name of the concerned workbook and the appropriate flag depending upon the type of event.
Parameters:
source - The object where the event originated.
id - The id indicating the type of event.
workbookName - The name of the workbook affected.
flag - The readOnly flag in case of WORKBOOK_OPENED or the saveOnClose flag in case of WORKBOOK_CLOSED.
Method Detail

getId

public int getId()
Returns an id indicating the type of event.
Returns:
The id indicating the type of event.

getWorkbookName

public java.lang.String getWorkbookName()
Returns the name of the affected workbook.
Returns:
The name of the affected workbook.

isReadOnly

public boolean isReadOnly()
Returns whether the file has been opened in the read only mode or not. Is valid only in case of WORKBOOK_OPENED type of events.
Returns:
True if the file has been opened in the readOnly mode, false otherwise.

isSaveOnClose

public boolean isSaveOnClose()
Returns whether the file has been saved before being closed. Is valid only in case of WORKBOOK_CLOSED type of events.
Returns:
True if the file has been saved before being closed, false otherwise.

ExcelAccessor Bean Suite

ExcelAccessor Bean Suite