All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.excelaccessor.event.ExcelWorkbookEvent
java.lang.Object
|
+----java.util.EventObject
|
+----com.ibm.excelaccessor.event.ExcelWorkbookEvent
- public class ExcelWorkbookEvent
- extends EventObject
This event is fired to signal the opening, closing or the
unprotecting of the structure of the workbook.
- See Also:
- EventObject, ExcelWorkbookListener
-
WORKBOOK_CLOSED
- The id for the WORKBOOK_CLOSED type of event.
-
WORKBOOK_OPENED
- The id for the WORKBOOK_OPENED type of event.
-
WORKBOOK_STRUCTURE_UNPROTECTED
- The id for the WORKBOOK_STRUCTURE_UNPROTECTED type of event.
-
ExcelWorkbookEvent(Object, int, String, boolean)
- 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.
-
getId()
- Returns an id indicating the type of event.
-
getWorkbookName()
- Returns the name of the affected workbook.
-
isReadOnly()
- Returns whether the file has been opened in the read only
mode or not.
-
isSaveOnClose()
- Returns whether the file has been saved before being closed.
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.
ExcelWorkbookEvent
public ExcelWorkbookEvent(Object source,
int id,
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.
getId
public int getId()
- Returns an id indicating the type of event.
- Returns:
- The id indicating the type of event.
getWorkbookName
public 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.
All Packages Class Hierarchy This Package Previous Next Index