|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object facets.util.app.AppFileValues
public abstract class AppFileValues
Manages file history and other file values.
AppFileValues
encapsulates file-related operations that read and write
values stored in an AppValues
.
Field Summary | |
---|---|
static java.lang.String |
NATURE_FILES
Key for flag specifying file behaviour. |
static java.lang.String |
NATURE_FILES_OPENING
Key for flag specifying file behaviour. |
static java.lang.String |
NATURE_FILES_OPENING_PREVIOUS
Key for flag specifying file behaviour. |
static java.lang.String |
NATURE_FILES_RECENT_MAX
Key for flag specifying file behaviour. |
Constructor Summary | |
---|---|
AppFileValues(AppValues appValues)
Unique constructor. |
Method Summary | |
---|---|
java.io.File |
getOpeningFile(boolean mustGet)
Tries to get a suitable opening content file. |
protected java.io.File |
getOpeningOther(FileSpecifier[] specifiers)
Called from getOpeningFile(boolean) . |
protected java.io.File |
getOpeningRecent(java.lang.String[] recentPaths)
Called from getOpeningFile(boolean) . |
FileSpecifier[] |
getOpenSpecifiers()
Get FileSpecifier s specifying application content types. |
protected void |
gotNoOpening()
Called from getOpeningFile(boolean) . |
static AppFileValues |
newConsole(AppValues values,
FileSpecifier s)
Creates an AppFileValues to read input from the console. |
java.io.File[] |
recentFiles()
Returns a validated array of recently opened files. |
java.io.File |
stateGetPath()
Gets the current file search path. |
void |
statePutPath(java.io.File file)
Stores the path to be returned by stateGetPath() . |
ValueNode |
updateRecentFiles(java.io.File add)
Maintains the list returned by recentFiles() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NATURE_FILES
public static final java.lang.String NATURE_FILES_RECENT_MAX
public static final java.lang.String NATURE_FILES_OPENING
public static final java.lang.String NATURE_FILES_OPENING_PREVIOUS
Constructor Detail |
---|
public AppFileValues(AppValues appValues)
appValues
- stores values.Method Detail |
---|
public final java.io.File[] recentFiles()
updateRecentFiles(File)
public final ValueNode updateRecentFiles(java.io.File add)
recentFiles()
.
Files are guaranteed to exist, and are returned in reverse order of opening.
add
- a file to add, or null
to test the values stored
ValueNode
public final java.io.File getOpeningFile(boolean mustGet)
mustGet
- null
return not allowed
null
unless mustGet
is true
,
in which case calls gotNoOpening()
public FileSpecifier[] getOpenSpecifiers()
FileSpecifier
s specifying application content types.
FileSpecifier.ALL
protected java.io.File getOpeningRecent(java.lang.String[] recentPaths)
getOpeningFile(boolean)
.
protected java.io.File getOpeningOther(FileSpecifier[] specifiers)
getOpeningFile(boolean)
.
protected void gotNoOpening()
getOpeningFile(boolean)
.
public final java.io.File stateGetPath()
statePutPath(File)
, or else
(for Windows) the user desktop.public final void statePutPath(java.io.File file)
stateGetPath()
.
file
- must be non-null
and a directorypublic static AppFileValues newConsole(AppValues values, FileSpecifier s)
AppFileValues
to read input from the console.
values
- for reading and writings
- filter for file types to input
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |