|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--FileIO
This is the FileIO class it handles all the interaction between the user and the filesystem.
Field Summary | |
(package private) CircuitDiagram |
circuitdiagram
The Circuit Diagram/ |
(package private) GateBuilder |
gatebuilder
The GateBuilder |
(package private) Logic |
logic
The logic space. |
(package private) Workspace |
workspace
The Workspace. |
Constructor Summary | |
FileIO(CircuitDiagram cd,
GateBuilder gb)
Nominal Constructor for FileIO class. |
|
FileIO(Logic _logic,
Workspace _workspace,
CircuitDiagram _circuitdiagram)
Deprecated. |
Method Summary | |
void |
exportMacro()
Saves a macro to a user specified file. |
java.lang.String |
importMacro()
Imports a macro from a user specified file. |
void |
importMacro(java.io.InputStream inStream)
Imports a macro from the specified inputstream. |
void |
importMacro(java.lang.String uri)
Imports a macro from a given loactions. |
static void |
main(java.lang.String[] args)
This is for testing the FileIO class directly. |
java.lang.String |
open()
This opens a file open dialog, gets the filename and then parses the file. |
java.lang.String |
openUrl()
|
void |
save(java.lang.String filename)
Opens a save dialog and saves the GBX file in the user specified location. |
void |
save(java.lang.String filename,
boolean firstTime)
Opens a save dialog and saves the GBX file in the user specified locaiton. |
java.lang.String |
saveAs(java.lang.String filename)
Saves the current workspace as a user specified name and returns the name of the saved file. |
Methods inherited from class java.lang.Object |
|
Field Detail |
Logic logic
Workspace workspace
CircuitDiagram circuitdiagram
GateBuilder gatebuilder
Constructor Detail |
public FileIO(Logic _logic, Workspace _workspace, CircuitDiagram _circuitdiagram)
_logic
- The logic part of a GateBuilder Session._workspace
- The graphics part of a GateBuilder Session._circuitdiagram
- The circuit diagram of a GateBuilder Session.public FileIO(CircuitDiagram cd, GateBuilder gb)
cd
- The circuit diagram.gb
- The gateBuilder.Method Detail |
public java.lang.String open() throws CancelException
public java.lang.String openUrl() throws CancelException
public void save(java.lang.String filename) throws CancelException
filename
- the name of the current workspace.public void save(java.lang.String filename, boolean firstTime) throws CancelException
filename
- The name of the current file to be saved.firstTime
- Whether or not this is the first time the file has been
saved.public java.lang.String saveAs(java.lang.String filename) throws CancelException
filename
- name of the current workspace.public java.lang.String importMacro() throws CancelException
public void importMacro(java.lang.String uri)
uri
- The location of the macro.public void importMacro(java.io.InputStream inStream)
inStream
- the input stream from which to get the macro.public void exportMacro() throws CancelException
public static void main(java.lang.String[] args)
args
- commandline arguments.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |