public class OpenInstructionHistoryFileCommand
extends java.lang.Object
Constructor and Description |
---|
OpenInstructionHistoryFileCommand() |
Modifier and Type | Method and Description |
---|---|
static void |
loadLogoFile(java.lang.String fileName,
java.io.PrintStream outAndErrStream,
java.io.BufferedReader subroutine)
Loads a .logo file as a new workspace
|
static void |
loadSerFile(java.lang.String fileName,
java.util.LinkedList<java.lang.String> instructionHistory,
java.io.PrintStream outAndErrStream,
java.lang.String parentDirectory,
TurtleField oldTurtleField)
Loads the file by executing all the commands from the linked list
and defining instance variables
Checks the directory to see if it needs to open a new workspace or
just modify the current one
Checks to see if the .ser file is an assignment history
Also checks to see if there is an image file associated with the
saved workspace
|
static void |
openFile(java.io.PrintStream outAndErrStream,
TurtleField oldTurtleField)
Opens a file that contains either a serialized
LinkedList or a .logo file
|
public static void openFile(java.io.PrintStream outAndErrStream, TurtleField oldTurtleField)
outAndErrStream
- The stream for notificationspublic static void loadLogoFile(java.lang.String fileName, java.io.PrintStream outAndErrStream, java.io.BufferedReader subroutine) throws java.io.IOException
fileName
- The name of the file so that it can be saved to lateroutAndErrStream
- The stream for notificationssubroutine
- The reader containing the instructionsjava.io.IOException
- In case there's a bad filepublic static void loadSerFile(java.lang.String fileName, java.util.LinkedList<java.lang.String> instructionHistory, java.io.PrintStream outAndErrStream, java.lang.String parentDirectory, TurtleField oldTurtleField)
fileName
- The name of the fileinstructionHistory
- The history from the fileoutAndErrStream
- The stream for notificationsturtleField
- The original turtle field in case the user loads assignments