csheets
Class SpreadsheetAppEvent

java.lang.Object
  extended by java.util.EventObject
      extended by csheets.SpreadsheetAppEvent
All Implemented Interfaces:
Serializable

public class SpreadsheetAppEvent
extends EventObject

A spreadsheet application event is used to notify interested parties that a workbook has been created, loaded or stored. The event provides information about the workbook in which the event occurred, and about the file in which it is stored, if any.

Author:
Einar Pehrson
See Also:
Serialized Form

Nested Class Summary
static class SpreadsheetAppEvent.Type
          The types of events that are fired from a spreadsheet application
 
Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SpreadsheetAppEvent(Object source, Workbook workbook, File file, SpreadsheetAppEvent.Type type)
          Creates a new spreadsheet application event, belonging to a workbook stored in a file.
 
Method Summary
 File getFile()
          Returns the file in which the workbook is stored.
 SpreadsheetAppEvent.Type getType()
          Returns the type of the event.
 Workbook getWorkbook()
          Returns the workbook that was affected by the event.
 
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
 

Constructor Detail

SpreadsheetAppEvent

public SpreadsheetAppEvent(Object source,
                           Workbook workbook,
                           File file,
                           SpreadsheetAppEvent.Type type)
Creates a new spreadsheet application event, belonging to a workbook stored in a file.

Parameters:
source - the source of the event
workbook - the workbook that was affected
file - the file in which the workbook is stored
type - the type of the event
Method Detail

getWorkbook

public Workbook getWorkbook()
Returns the workbook that was affected by the event.

Returns:
the affected workbook

getFile

public File getFile()
Returns the file in which the workbook is stored.

Returns:
the file in which the workbook is stored

getType

public SpreadsheetAppEvent.Type getType()
Returns the type of the event.

Returns:
the type of the event