fdda.plugins
Interface SystemReader

All Superinterfaces:
Plugin
All Known Implementing Classes:
ProjectReader

public interface SystemReader
extends Plugin

Interface for plug-ins that load projects.

Author:
Jörg Rüdenauer

Field Summary
 
Fields inherited from interface fdda.plugins.Plugin
ALGORITHM_READER, SYSTEM_READER, SYSTEM_WRITER
 
Method Summary
 ProjectInformation[] getLastLoadedProjectsInformation()
          Returns information about the last loaded projects.
 void loadProject(ErrorHandler errorHandler, Project project)
          Loads a project.
 boolean performUI()
          Interacts with the user to define options for the load operation.
 boolean setSystemLocation(String location)
          Sets the storage location of the project.
 void useGraphic(String component)
          Tells the plug-in that the specified graphics component is used and it should load its information.
 
Methods inherited from interface fdda.plugins.Plugin
configure, getName, getType, hasOptions, useDialog
 

Method Detail

useGraphic

public void useGraphic(String component)
                throws ComponentNotSupportedException
Tells the plug-in that the specified graphics component is used and it should load its information.

Parameters:
component - identifier of the graphics component (e.g. "java2d")
Throws:
ComponentNotSupportedException - if the plug-in doesn't support the loading of the data for this component

performUI

public boolean performUI()
Interacts with the user to define options for the load operation. E.g a dialog to select a file could be shown. Either this method or setSystemLocation must be called before calling loadProject. If the user cancels the operation, the method returns false and loadProject mustn't be called.

Returns:
false, iff the user canceled the operation

setSystemLocation

public boolean setSystemLocation(String location)
Sets the storage location of the project. If the location can't be used by this plug-in, returns false.

Parameters:
location - the location
Returns:
true iff the location can be used

loadProject

public void loadProject(ErrorHandler errorHandler,
                        Project project)
                 throws MissingOptionsException
Loads a project. PerformUI or setSystemLocation must be called earlier to set the location. If an error occurs, the appropriate method of the error handler is called. To integrate into fdda, the method must set the preference userRoot .fdda.lastProjectLocation to the used location.

Parameters:
errorHandler - the errorHandler
project - the project that is filled with the loaded data
Throws:
MissingOptionsException - if no location was specified

getLastLoadedProjectsInformation

public ProjectInformation[] getLastLoadedProjectsInformation()
Returns information about the last loaded projects. The size of the array may vary with the plug-in.

Returns:
information about the last loaded projects


API documentation for FDDA version 0.9. Generated on 17/02/2004 14:12.