Package net.sf.jaxodraw.io.imports
Class JaxoImportAxodraw
- java.lang.Object
-
- net.sf.jaxodraw.plugin.AbstractJaxoPlugin
-
- net.sf.jaxodraw.plugin.JaxoImportPlugin
-
- net.sf.jaxodraw.io.imports.JaxoImport
-
- 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
Constructors Constructor Description JaxoImportAxodraw()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
description()
Return a short description (preferably internationalized) of what this plugin does.java.lang.String
getFileExtension()
Extension to be used for plugin files.java.lang.String
getFileExtensionDescription()
Description to be used for plugin file extensions.java.lang.String
getFormatName()
The name of the plugin (export or import) format.java.lang.String
getShortName()
Return a short name for this plugin.JaxoGraph
importGraph(java.io.InputStream inputStream)
Import a graph from a Reader.java.lang.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
-
-
-
-
Method Detail
-
getFormatName
public java.lang.String getFormatName()
The name of the plugin (export or import) format.- Specified by:
getFormatName
in classAbstractJaxoPlugin
- Returns:
- An (internationalized) name of the plugin format.
-
getFileExtension
public java.lang.String getFileExtension()
Extension to be used for plugin files.- Specified by:
getFileExtension
in classAbstractJaxoPlugin
- Returns:
- The file extension.
-
getFileExtensionDescription
public java.lang.String getFileExtensionDescription()
Description to be used for plugin file extensions.- Specified by:
getFileExtensionDescription
in classAbstractJaxoPlugin
- Returns:
- An (internationalized) description of the file extension.
-
getShortName
public java.lang.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 java.lang.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(java.io.InputStream inputStream) throws JaxoPluginExecutionException
Import a graph from a Reader.- Specified by:
importGraph
in classJaxoImportPlugin
- 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 java.lang.String description()
Return a short description (preferably internationalized) of what this plugin does.- Returns:
- a description.
-
-