Class fileIO

java.lang.Object
  |
  +--fileIO

public class fileIO
extends java.lang.Object

Contains all functionality for saving and loading the current state of the system, all operators and links, locations, parameter settings etc.


Constructor Summary
fileIO()
          No argument constructor.
fileIO(java.util.ArrayList boxes, linkData links, javax.swing.JFrame frame)
          Constructor taking details of all operatorBoxes and links in the system, so that all details can be saved correctly.
 
Method Summary
 void clearSystem()
          Clears the current system by removing all the operators and links.
 void getUrl()
          Gets the URL in the popup window
 void loadLocation(operator op, java.io.StreamTokenizer tokenizer)
          Load the location of an operator from the file, so that the layout is correct.
 void loadSystem(java.net.URL tableaudocbase)
          Popup a file load dialog box, to allow the user to select a layout to load and then load it in to the program.
 void loadURLSystem()
           
 void popUrl()
          Popup a window to allow the user to give a full URL
 void resetFile()
          Sets/resets the default file name (to prevent a new blank layout being saved overwriting a recently saved layout).
 void saveSystem(java.applet.AppletContext appcontext)
          Saves the layout of the current system to the current file name, if the current file name is the default file name then allow the user to select a more suitable name (don't save the file as the default name).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

fileIO

public fileIO()
No argument constructor.

fileIO

public fileIO(java.util.ArrayList boxes,
              linkData links,
              javax.swing.JFrame frame)
Constructor taking details of all operatorBoxes and links in the system, so that all details can be saved correctly.
Parameters:
boxes - a list of all operatorBoxes (and therefore operators) in the system
links - all links in the system
Method Detail

clearSystem

public void clearSystem()
Clears the current system by removing all the operators and links.

resetFile

public void resetFile()
Sets/resets the default file name (to prevent a new blank layout being saved overwriting a recently saved layout).

saveSystem

public void saveSystem(java.applet.AppletContext appcontext)
Saves the layout of the current system to the current file name, if the current file name is the default file name then allow the user to select a more suitable name (don't save the file as the default name).

loadLocation

public void loadLocation(operator op,
                         java.io.StreamTokenizer tokenizer)
                  throws java.io.IOException
Load the location of an operator from the file, so that the layout is correct.
Parameters:
op - the operator to be placed at the correct location
tokenizer - the input file layered stream

popUrl

public void popUrl()
Popup a window to allow the user to give a full URL

getUrl

public void getUrl()
Gets the URL in the popup window

loadURLSystem

public void loadURLSystem()

loadSystem

public void loadSystem(java.net.URL tableaudocbase)
Popup a file load dialog box, to allow the user to select a layout to load and then load it in to the program.