Class JaxoExportPS
java.lang.Object
net.sf.jaxodraw.plugin.AbstractJaxoPlugin
net.sf.jaxodraw.plugin.JaxoExportPlugin
net.sf.jaxodraw.io.exports.JaxoExport
net.sf.jaxodraw.io.exports.JaxoExportPS
- All Implemented Interfaces:
Printable, JaxoPlugin, JaxoLocalized
The class that is responsible for exporting to postscript output: portrait,
landscape or EPS are possible options. Asks for an export file name.
- Since:
- 2.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe export modes supported by this JaxoExport. -
Field Summary
Fields inherited from interface Printable
NO_SUCH_PAGE, PAGE_EXISTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApply the changes made in the configuration panel.Return a short description (preferably internationalized) of what this plugin does.protected voidExport the graph to the given nonempty file name.Returns a panel that allows to configure optional parameters of this export format.final StringExtension to be used for plugin files.final StringDescription to be used for plugin file extensions.final StringThe name of the plugin (export or import) format.final JaxoExportPS.FormatgetMode()Returns the current export mode.Return a short name for this plugin.final booleanReturns the landscape mode.pluginId()This must return the class name of the plugin (MyPlugin.class.getName()).voidpreview(JaxoPreview p, boolean sameWindow) Show a preview.final intprint(Graphics g, PageFormat pf, int pageIndex) The actual printing routine required by the Printable interface.voidsetLandscape(boolean value) Sets the landscape mode.final voidsetMode(JaxoExportPS.Format value) Sets the export mode.final voidUpdates the component with the current language as set in the preferences (JaxoPrefs.PREF_LANGUAGE).protected final voidThe class that is responsible for exporting to postscript output: portrait, landscape or EPS are possible options.Methods inherited from class JaxoExport
getBuiltInFormats, getWarningForGraph, makeAvailableAtRuntime, versionMethods inherited from class JaxoExportPlugin
errorDialogMessage, export, export, getCanvasSize, getColorSpaceWarningForLaTeX, getGraph, getLaTeXTextWarning, getPSTextWarning, getPSTextWarningForLaTeX, paintGraph, preview, setCanvasSize, setGraph, showErrorDialogMethods inherited from class AbstractJaxoPlugin
close, getClassName, getFailure, getLang, getLog, getParentComponent, getProperties, getProperty, getProperty, getShortGraphName, hasFailed, isSilent, loadProperties, pluginName, registerDictionary, setFailure, setParentComponent, setProperty, setShortGraphName, setSilent, storeProperties
-
Constructor Details
-
JaxoExportPS
-
-
Method Details
-
isLandscape
public final boolean isLandscape()Returns the landscape mode.- Returns:
- True for landscape, false for portrait..
-
setLandscape
public void setLandscape(boolean value) Sets the landscape mode.- Parameters:
value- True for landscape, false for portrait.
-
setMode
Sets the export mode.- Parameters:
value- The new export mode (PS_XYZ constant).
-
getMode
Returns the current export mode.- Returns:
- The current export mode.
-
getFormatName
The name of the plugin (export or import) format.- Specified by:
getFormatNamein classAbstractJaxoPlugin- Returns:
- An (internationalized) name of the plugin format.
-
getFileExtension
Extension to be used for plugin files.- Specified by:
getFileExtensionin classAbstractJaxoPlugin- Returns:
- The file extension.
-
getFileExtensionDescription
Description to be used for plugin file extensions.- Specified by:
getFileExtensionDescriptionin classAbstractJaxoPlugin- Returns:
- An (internationalized) description of the file extension.
-
description
Return a short description (preferably internationalized) of what this plugin does.- Specified by:
descriptionin interfaceJaxoPlugin- Returns:
- a description.
-
pluginId
This must return the class name of the plugin (MyPlugin.class.getName()). It is used to uniquely identify the plugin.- Specified by:
pluginIdin interfaceJaxoPlugin- Returns:
- the class name of the plugins' main class.
-
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".- Specified by:
getShortNamein interfaceJaxoPlugin- Returns:
- The short name of this plugin.
-
exportTo
Export the graph to the given nonempty file name.- Specified by:
exportToin 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.
-
print
The actual printing routine required by the Printable interface. -
writePS
The class that is responsible for exporting to postscript output: portrait, landscape or EPS are possible options. The export file name is given by fileName.- Parameters:
file- The export file.
-
preview
Show a preview.- Specified by:
previewin 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:
commitConfigurationin classJaxoExportPlugin
-
getConfigurationPanel
Returns a panel that allows to configure optional parameters of this export format.- Specified by:
getConfigurationPanelin classJaxoExportPlugin- Returns:
- A panel to configure the postscript orientation.
-
updateLanguage
public final void updateLanguage()Updates the component with the current language as set in the preferences (JaxoPrefs.PREF_LANGUAGE).- Specified by:
updateLanguagein interfaceJaxoLocalized
-