public class SaveFile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIRECTORY |
static java.lang.String |
DIRECTORY_SUFFIX
Default suffix of the directories paired with the save files.
|
java.lang.String |
dirname
Name of the data directory paired with the save file.
|
processing.core.PImage |
drawing
Drawing image.
|
static java.lang.String |
DRAWING |
java.lang.String |
drawingPath
Path to the drawing image.
|
java.lang.String |
filename
Name of the save file.
|
static java.lang.String |
LAYOUT |
java.lang.String |
layoutPath
Path to the saved layout.
|
static java.lang.String |
SAVE_FILE_EXT
Default extension of the save files.
|
static java.lang.String |
SAVE_TIME |
java.util.Date |
saveTime
Time when the save file was created.
|
processing.core.PImage |
thumbnail
Thumbnail image.
|
static java.lang.String |
THUMBNAIL |
java.lang.String |
thumbnailPath
Path to the thumbnail image.
|
static java.lang.String |
USER_NAME |
java.lang.String |
userName
Name of the user.
|
Constructor and Description |
---|
SaveFile() |
Modifier and Type | Method and Description |
---|---|
boolean |
load(java.lang.String filename)
Load the specified save file and retrieve the recorded data such as
user's name, time stamp as well as the paths to the thumbnail, drawing
and layout files.
|
boolean |
save(java.lang.String userName)
Create a save file for the specified user and save the current drawing
and workspace layout.
|
public static final java.lang.String USER_NAME
public static final java.lang.String SAVE_TIME
public static final java.lang.String DIRECTORY
public static final java.lang.String THUMBNAIL
public static final java.lang.String DRAWING
public static final java.lang.String LAYOUT
public static final java.lang.String SAVE_FILE_EXT
public static final java.lang.String DIRECTORY_SUFFIX
public java.lang.String filename
public java.lang.String dirname
public java.lang.String userName
public java.util.Date saveTime
public processing.core.PImage thumbnail
public processing.core.PImage drawing
public java.lang.String thumbnailPath
public java.lang.String drawingPath
public java.lang.String layoutPath
public boolean save(java.lang.String userName)
userName
- name of the userpublic boolean load(java.lang.String filename)
filename
- valid path to a save file to load