Class FileOperation

java.lang.Object
  |
  +--FileOperation

public class FileOperation
extends java.lang.Object

File manager. Handles Saves, saveAs's and restores.
Author: Neil Short.


Constructor Summary
FileOperation()
           
 
Method Summary
static void export(StickyNote note, javax.swing.JPanel jp)
          The idea here is to save a single note
static StickyNote importNote(javax.swing.JPanel jp)
          The idea here is to be able to import a single note into the database
static NoteBook0312 restore()
          Recover a saved NoteBook0312.
static NoteBook0312 restore(java.lang.String filename)
          recover a NoteBook0211 when given a filename
static java.lang.String saveAs(NoteBook0312 notebook, javax.swing.JPanel jp)
          Save the notebook, asking the user for the file name.
static java.lang.String saveNoteBook0312(NoteBook0312 notebook, javax.swing.JPanel jp)
          Quick save - as long as the notebook contains a filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileOperation

public FileOperation()
Method Detail

restore

public static NoteBook0312 restore()
Recover a saved NoteBook0312.


restore

public static NoteBook0312 restore(java.lang.String filename)
recover a NoteBook0211 when given a filename


importNote

public static StickyNote importNote(javax.swing.JPanel jp)
The idea here is to be able to import a single note into the database


saveNoteBook0312

public static java.lang.String saveNoteBook0312(NoteBook0312 notebook,
                                                javax.swing.JPanel jp)
Quick save - as long as the notebook contains a filename. If the file has no default name yet, control passes to the saveAs method.


saveAs

public static java.lang.String saveAs(NoteBook0312 notebook,
                                      javax.swing.JPanel jp)
Save the notebook, asking the user for the file name.


export

public static void export(StickyNote note,
                          javax.swing.JPanel jp)
The idea here is to save a single note