Overview Package Class Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

diva.gui
Class AbstractStoragePolicy

java.lang.Object
 extended bydiva.gui.AbstractStoragePolicy
All Implemented Interfaces:
StoragePolicy
Direct Known Subclasses:
BasicStoragePolicy, DefaultStoragePolicy

public abstract class AbstractStoragePolicy
extends java.lang.Object
implements StoragePolicy

It is nice if storage policies suggest good pathnames. Usually the file they last opened. This abstract class provides such functionality.

Version:
$Id: AbstractStoragePolicy.java,v 1.10 2005年07月08日 19:55:10 cxh Exp $
Author:
Steve Neuendorffer

Constructor Summary
AbstractStoragePolicy()
Method Summary
java.lang.String getDirectory()
Return a reasonable directory for file choosers to use.
void setDirectory(java.io.File file)
Set the current browsed directory to that given in the file.
void setDirectory(java.lang.String directory)
Set the current browsed directory to that given directory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface diva.gui.StoragePolicy
close, open, open, open, save, saveAs

Constructor Detail

AbstractStoragePolicy

public AbstractStoragePolicy()
Method Detail

getDirectory

public java.lang.String getDirectory()
Return a reasonable directory for file choosers to use. If a directory has been set using setDirectory, then use that. Otherwise use the user's current working directory. If all else fails, then use user's home directory. If THAT fails, then just dump them into the root of the file system.


setDirectory

public void setDirectory(java.io.File file)
Set the current browsed directory to that given in the file.


setDirectory

public void setDirectory(java.lang.String directory)
Set the current browsed directory to that given directory. The directory is assumed to exist.


Overview Package Class Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

AltStyle によって変換されたページ (->オリジナル) /