Class 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 Details

    • JaxoImportAxodraw

      public JaxoImportAxodraw()
  • Method Details

    • 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.