|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsheets.CleanSheets
public class CleanSheets
CleanSheets - the main class of the application. The class manages workbooks, performs I/O operations and provides support for notifying listeners when workbooks are created, loaded or saved.
| Nested Class Summary | |
|---|---|
static class |
CleanSheets.EventDispatcher
A utility for dispatching events on the AWT event dispatching thread. |
| Constructor Summary | |
|---|---|
CleanSheets()
Creates the CleanSheets application. |
|
| Method Summary | |
|---|---|
void |
addSpreadsheetAppListener(SpreadsheetAppListener listener)
Registers the given listener on the spreadsheet application. |
void |
create()
Creates a new workbook. |
void |
exit()
Exits the application. |
File |
getFile(Workbook workbook)
Returns the file in which the given workbook is stored. |
Properties |
getUserProperties()
Returns the current user properties. |
Workbook |
getWorkbook(File file)
Returns the workbook that is stored in the given file, if it is already open. |
Workbook[] |
getWorkbooks()
Returns the workbooks that are open. |
boolean |
isFileOpen(File file)
Returns whether the given file is open, and a workbook thereby loaded from it or saved to it. |
boolean |
isWorkbookStored(Workbook workbook)
Returns whether a file has been specified for the given workbook, either when it was loaded or when it was last saved. |
void |
load(File file)
Loads a workbook from the given file. |
static void |
main(String[] args)
Starts CleanSheets from the command-line. |
void |
removeSpreadsheetAppListener(SpreadsheetAppListener listener)
Removes the given listener from the spreadsheet application. |
void |
save(Workbook workbook)
Saves the given workbook to the file from which it was loaded, or to which it was most recently saved. |
void |
saveAs(Workbook workbook,
File file)
Saves the given workbook to the given file. |
void |
unload(Workbook workbook)
Unloads the given workbook. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CleanSheets()
| Method Detail |
|---|
public static void main(String[] args)
args - the command-line arguments (not used)public Properties getUserProperties()
public void exit()
public void create()
public void load(File file)
throws IOException,
ClassNotFoundException
file - the file in which the workbook is stored
IOException - if the file could not be loaded correctly
ClassNotFoundExceptionpublic void unload(Workbook workbook)
workbook - the workbook to unload
public void save(Workbook workbook)
throws IOException
workbook - the workbook to save
IOException - if the file could not be saved correctly
public void saveAs(Workbook workbook,
File file)
throws IOException
workbook - the workbook to savefile - the file to which the workbook should be saved
IOException - if the file could not be saved correctlypublic Workbook[] getWorkbooks()
public File getFile(Workbook workbook)
public boolean isWorkbookStored(Workbook workbook)
public Workbook getWorkbook(File file)
file - the file to look for
public boolean isFileOpen(File file)
file - the file to look for
public void addSpreadsheetAppListener(SpreadsheetAppListener listener)
listener - the listener to be addedpublic void removeSpreadsheetAppListener(SpreadsheetAppListener listener)
listener - the listener to be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||