Package org.graffiti.managers
Interface IOManager
- All Superinterfaces:
PluginManagerListener
- All Known Implementing Classes:
DefaultIOManager
public interface IOManager extends PluginManagerListener
Handles the editor's IO serializers.
- Version:
- $Revision: 1.9.4.1.2.1 $
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IOManager.IOManagerListener
Interfaces an io manager listener. -
Method Summary
Modifier and Type Method Description void
addInputSerializer(InputSerializer i)
Registers the given input serializer.void
addListener(IOManager.IOManagerListener ioManagerListener)
Adds the givenIOManagerListener
to the list of io manager listeners.void
addOutputSerializer(OutputSerializer o)
Registers the given output serializer.InputSerializer
createInputSerializer(InputStream is, String ext)
Creates an instance of an input serializer from the given extension.JFileChooser
createOpenFileChooser()
Modifies the given file chooser by registering file extensions from the input serializers.OutputSerializer
createOutputSerializer(String ext)
Creates an instance of an output serializer from the given extension.OutputSerializer
createOutputSerializer(String ext, String fileTypeDescription)
Creates an instance of an output serializer from the given extension and file type description.JFileChooser
createSaveFileChooser()
Creates and returns a file open chooser dialog with the registered file extensions from the output serializers.JFileChooser
createSaveFileChooser(Graph g)
Creates and returns a file open chooser dialog with the registered file extensions from the output serializers and checking, if output serializer is capable of writing the graph.Set<String>
getGraphFileExtensions()
boolean
hasInputSerializer()
Returnstrue
, if the io manager has a registered input manager.boolean
hasOutputSerializer()
Returnstrue
, if the io manager has a registered output manager.boolean
removeListener(IOManager.IOManagerListener l)
Returnstrue
, if the given io manager listener was in the list of listeners and could be removed.Methods inherited from interface org.graffiti.managers.pluginmgr.PluginManagerListener
pluginAdded
-
Method Details
-
addInputSerializer
Registers the given input serializer.- Parameters:
i
- the new serializer to add.
-
addListener
Adds the givenIOManagerListener
to the list of io manager listeners.- Parameters:
ioManagerListener
- the listener to add.
-
addOutputSerializer
Registers the given output serializer.- Parameters:
o
- the new serializer to add.
-
createInputSerializer
InputSerializer createInputSerializer(InputStream is, String ext) throws IllegalAccessException, InstantiationException, FileNotFoundExceptionCreates an instance of an input serializer from the given extension.- Returns:
- DOCUMENT ME!
- Throws:
FileNotFoundException
IllegalAccessException
InstantiationException
-
createOpenFileChooser
JFileChooser createOpenFileChooser()Modifies the given file chooser by registering file extensions from the input serializers.- Returns:
- DOCUMENT ME!
-
createOutputSerializer
OutputSerializer createOutputSerializer(String ext) throws IllegalAccessException, InstantiationExceptionCreates an instance of an output serializer from the given extension.- Returns:
- DOCUMENT ME!
- Throws:
IllegalAccessException
InstantiationException
-
createOutputSerializer
OutputSerializer createOutputSerializer(String ext, String fileTypeDescription) throws IllegalAccessException, InstantiationExceptionCreates an instance of an output serializer from the given extension and file type description.- Returns:
- the output serializer
- Throws:
IllegalAccessException
InstantiationException
-
createSaveFileChooser
JFileChooser createSaveFileChooser()Creates and returns a file open chooser dialog with the registered file extensions from the output serializers. Returns all available output serializers, not checking, if output serializer is capable of writing the graph- Returns:
- DOCUMENT ME!
-
createSaveFileChooser
Creates and returns a file open chooser dialog with the registered file extensions from the output serializers and checking, if output serializer is capable of writing the graph.- Parameters:
g
- The graph to test for output serializer compatibility- Returns:
- the FilechooserDialog object
-
hasInputSerializer
boolean hasInputSerializer()Returnstrue
, if the io manager has a registered input manager.- Returns:
true
, if the io manager has a registered input manager.
-
hasOutputSerializer
boolean hasOutputSerializer()Returnstrue
, if the io manager has a registered output manager.- Returns:
true
, if the io manager has a registered output manager.
-
removeListener
Returnstrue
, if the given io manager listener was in the list of listeners and could be removed.- Parameters:
l
- the io manager listener to remove.- Returns:
- DOCUMENT ME!
-
getGraphFileExtensions
-