Package net.sf.jaxodraw.io.exports
Class JaxoExportLatexPS
- java.lang.Object
-
- net.sf.jaxodraw.plugin.AbstractJaxoPlugin
-
- net.sf.jaxodraw.plugin.JaxoExportPlugin
-
- net.sf.jaxodraw.io.exports.JaxoExport
-
- net.sf.jaxodraw.io.exports.JaxoExportLatexPS
-
- All Implemented Interfaces:
JaxoPlugin
,JaxoLocalized
public class JaxoExportLatexPS extends JaxoExport
Create a postscript file from a Latex source file via Latex - dvips.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description JaxoExportLatexPS()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commitConfiguration()
Apply the changes made in the configuration panel.java.lang.String
description()
Return a short description (preferably internationalized) of what this plugin does.protected void
exportTo(java.lang.String fileName)
Export the graph to the given nonempty file name.int
exportToWithStatus(java.lang.String fileName)
Tries to export a postscript file to the given file.javax.swing.JComponent
getConfigurationPanel()
Returns a panel that allows to configure optional parameters of this export format.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.java.lang.String
getWarningForGraph()
Returns a warning if the current graph contains a LaTeX text.java.lang.String
pluginId()
This must return the class name of the plugin (MyPlugin.class.getName()).void
preview(JaxoPreview p, boolean sameWindow)
Show a preview.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.exports.JaxoExport
getBuiltInFormats, makeAvailableAtRuntime, version
-
Methods inherited from class net.sf.jaxodraw.plugin.JaxoExportPlugin
errorDialogMessage, export, export, getCanvasSize, getColorSpaceWarningForLaTeX, getGraph, getLaTeXTextWarning, getPSTextWarning, getPSTextWarningForLaTeX, paintGraph, preview, setCanvasSize, setGraph, showErrorDialog
-
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 final 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 final java.lang.String getFileExtension()
Extension to be used for plugin files.- Specified by:
getFileExtension
in classAbstractJaxoPlugin
- Returns:
- The file extension.
-
getFileExtensionDescription
public final 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.
-
description
public java.lang.String description()
Return a short description (preferably internationalized) of what this plugin does.- Returns:
- a description.
-
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.
-
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.
-
getWarningForGraph
public java.lang.String getWarningForGraph()
Returns a warning if the current graph contains a LaTeX text.- Overrides:
getWarningForGraph
in classJaxoExport
- Returns:
- An (internationalized) warning.
-
exportTo
protected final void exportTo(java.lang.String fileName) throws JaxoPluginExecutionException
Export the graph to the given nonempty file name.- Specified by:
exportTo
in classJaxoExportPlugin
- Parameters:
fileName
- The file to export to.- Throws:
JaxoPluginExecutionException
- if exporting fails. The exception message sould be displayable in error dialogs, so it should be an internationalized string.
-
exportToWithStatus
public final int exportToWithStatus(java.lang.String fileName)
Tries to export a postscript file to the given file.- Parameters:
fileName
- The name of the file to be exported.- Returns:
- Return status of the LaTex export, the latex or the dvips command; zero if everything went fine.
-
preview
public void preview(JaxoPreview p, boolean sameWindow)
Show a preview.- Specified by:
preview
in classJaxoExportPlugin
- Parameters:
p
- The JaxoPreview to show.sameWindow
- If false, a new window will be opened for the preview. If true, and if a preview window for the current format is open already, the same window will be used for the preview. Not all implementations may support this feature.
-
commitConfiguration
public void commitConfiguration()
Apply the changes made in the configuration panel.- Specified by:
commitConfiguration
in classJaxoExportPlugin
-
getConfigurationPanel
public javax.swing.JComponent getConfigurationPanel()
Returns a panel that allows to configure optional parameters of this export format.- Specified by:
getConfigurationPanel
in classJaxoExportPlugin
- Returns:
- Null by default, no options to configure.
-
updateLanguage
public final void updateLanguage()
Updates the component with the current language as set in the preferences (JaxoPrefs.PREF_LANGUAGE
).
-
-