net.sf.jaxodraw.io.imports
Class JaxoImportAxodraw

java.lang.Object
  extended by net.sf.jaxodraw.plugin.AbstractJaxoPlugin
      extended by net.sf.jaxodraw.plugin.JaxoImportPlugin
          extended by net.sf.jaxodraw.io.imports.JaxoImport
              extended by net.sf.jaxodraw.io.imports.JaxoImportAxodraw
All Implemented Interfaces:
JaxoPlugin, JaxoLocalized

public final class JaxoImportAxodraw
extends JaxoImport

The class responsible for importing JaxoGraphs from axodraw files.

Since:
2.0

Constructor Summary
JaxoImportAxodraw()
           
 
Method Summary
 String description()
          Return a short description (preferably internationalized) of what this plugin does.
 String getFileExtension()
          Extension to be used for plugin files.
 String getFileExtensionDescription()
          Description to be used for plugin file extensions.
 String getFormatName()
          The name of the plugin (export or import) format.
 String getShortName()
          Return a short name for this plugin.
 JaxoGraph importGraph(InputStream inputStream)
          Import a graph from a Reader.
 String pluginId()
          This must return the class name of the plugin (MyPlugin.class.getName()).
 void updateLanguage()
          Updates the component with the current language as set in the preferences (JaxoPrefs.PREF_LANGUAGE).
 
Methods inherited from class net.sf.jaxodraw.io.imports.JaxoImport
getBuiltInFormats, makeAvailableAtRuntime, version
 
Methods inherited from class net.sf.jaxodraw.plugin.JaxoImportPlugin
commitConfiguration, getCharsetName, getConfigurationPanel, importGraph, importGraph, setCharsetName
 
Methods inherited from class net.sf.jaxodraw.plugin.AbstractJaxoPlugin
close, getClassName, getFailure, getLang, getLog, getParentComponent, getProperties, getProperty, getProperty, getShortGraphName, hasFailed, isSilent, loadProperties, pluginName, registerDictionary, setFailure, setParentComponent, setProperty, setShortGraphName, setSilent, storeProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxoImportAxodraw

public JaxoImportAxodraw()
Method Detail

getFormatName

public String getFormatName()
The name of the plugin (export or import) format.

Specified by:
getFormatName in class AbstractJaxoPlugin
Returns:
An (internationalized) name of the plugin format.

getFileExtension

public String getFileExtension()
Extension to be used for plugin files.

Specified by:
getFileExtension in class AbstractJaxoPlugin
Returns:
The file extension.

getFileExtensionDescription

public String getFileExtensionDescription()
Description to be used for plugin file extensions.

Specified by:
getFileExtensionDescription in class AbstractJaxoPlugin
Returns:
An (internationalized) description of the file extension.

getShortName

public String getShortName()
Return a short name for this plugin. This is used to construct names of output files, eg to get a "jaxodraw-pdf-plugin.properties" file, the short name should just be "pdf".

Returns:
The short name of this plugin.

pluginId

public String pluginId()
This must return the class name of the plugin (MyPlugin.class.getName()). It is used to uniquely identify the plugin.

Returns:
the class name of the plugins' main class.

updateLanguage

public void updateLanguage()
Updates the component with the current language as set in the preferences (JaxoPrefs.PREF_LANGUAGE).


importGraph

public JaxoGraph importGraph(InputStream inputStream)
                      throws JaxoPluginExecutionException
Import a graph from a Reader.

Specified by:
importGraph in class JaxoImportPlugin
Parameters:
inputStream - An InputStream to supply the input data.
Returns:
The imported JaxoGraph or null, if importing failed.
Throws:
JaxoPluginExecutionException - if the graph could not be imported. Note that the message of the Exception should be an internationalized String.

description

public String description()
Return a short description (preferably internationalized) of what this plugin does.

Returns:
a description.


Copyright © 2003-2011 The JaxoDraw team. All Rights Reserved.