|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--fdda.plugins.xmlwriter.ProjectWriter
SystemWriter plug-in that writes projects into XML files according to the project.dtd. Works with the components 'swing' and 'java2d'.
| Field Summary | |
(package private) static String |
PROJECT_DEFAULT_PATH
the default save path |
(package private) static String |
PROJECT_PATH_OPTION
the option for the default save path |
| Fields inherited from interface fdda.plugins.Plugin |
ALGORITHM_READER, SYSTEM_READER, SYSTEM_WRITER |
| Constructor Summary | |
ProjectWriter()
Constructor |
|
| Method Summary | |
void |
configure()
Uses a dialog to determine the default directory for saved files. |
ProjectInformation[] |
getLastSavedProjectsInformation()
Returns information about the last stored projects. |
String |
getName()
Returns the name of the plug-in. |
int |
getType()
Returns the type of the plug-in (one of the constants of this interface) |
boolean |
hasOptions()
Returns true. |
boolean |
performUI()
Shows a dialog to select the file that is written. |
boolean |
setSystemLocation(String location)
Defines where the project shall be saved (alternative to performUI). If the given location (e.g. a file path) can't be used, false is returned. The location must be a file name or path and end with ".xml". |
void |
useDialog(String component)
Tells the plug-in to use the specified dialog component for its interactions with the user. |
void |
useGraphic(String component)
Tells the plug-in that the specified graphics component is used and it should store its information. |
void |
writeProject(Project project,
ErrorHandler errorHandler)
Stores a project in a persistent storage. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static final String PROJECT_PATH_OPTION
static final String PROJECT_DEFAULT_PATH
| Constructor Detail |
public ProjectWriter()
| Method Detail |
public void useDialog(String component)
throws ComponentNotSupportedException
Plugin
useDialog in interface Plugincomponent - name of the dialog component (e.g. "swing")
ComponentNotSupportedException - if the plug-in can't use this
component
public void useGraphic(String component)
throws ComponentNotSupportedException
SystemWriter
useGraphic in interface SystemWritercomponent - identifier of the graphics component (e.g. "java2d")
ComponentNotSupportedException - if the plug-in doesn't support
the storage of the data for this componentpublic void configure()
configure in interface PluginPlugin.configure()public String getName()
Plugin
getName in interface Pluginpublic int getType()
Plugin
getType in interface Pluginpublic boolean hasOptions()
hasOptions in interface PluginPlugin.hasOptions()public boolean performUI()
performUI in interface SystemWriterSystemWriter.performUI()public boolean setSystemLocation(String location)
setSystemLocation in interface SystemWriterlocation - the location
public ProjectInformation[] getLastSavedProjectsInformation()
SystemWriter
getLastSavedProjectsInformation in interface SystemWriter
public void writeProject(Project project,
ErrorHandler errorHandler)
throws MissingOptionsException
SystemWriter
writeProject in interface SystemWriterproject - the projecterrorHandler - the error handler
MissingOptionsException - if no location was specified
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||