public class JaxoExportPS extends JaxoExport implements java.awt.print.Printable
Modifier and Type | Field and Description |
---|---|
static int |
PS_EPS
An integer specifying the postscript EPS mode.
|
static int |
PS_PS
An integer specifying the postscript portrait mode.
|
Constructor and Description |
---|
JaxoExportPS(int psmode)
Constructor.
|
Modifier and Type | Method and 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.
|
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.
|
int |
getMode()
Returns the current export mode.
|
java.lang.String |
getShortName()
Return a short name for this plugin.
|
boolean |
isLandscape()
Returns the landscape mode.
|
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.
|
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pageIndex)
The actual printing routine required by the Printable interface.
|
void |
setLandscape(boolean value)
Sets the landscape mode.
|
void |
setMode(int value)
Sets the export mode.
|
void |
updateLanguage()
Updates the component with the current language as set in the
preferences (
JaxoPrefs.PREF_LANGUAGE ). |
protected void |
writePS(java.lang.String fileName)
The class that is responsible for exporting to postscript output:
portrait, landscape or EPS are possible options.
|
getBuiltInFormats, getWarningForGraph, makeAvailableAtRuntime, version
errorDialogMessage, export, export, getCanvasSize, getColorSpaceWarningForLaTeX, getGraph, getLaTeXTextWarning, getPSTextWarning, getPSTextWarningForLaTeX, paintGraph, preview, setCanvasSize, setGraph, showErrorDialog
close, close, close, close, getClassName, getFailure, getLang, getLog, getParentComponent, getProperties, getProperty, getProperty, getShortGraphName, hasFailed, isSilent, loadProperties, pluginName, registerDictionary, setFailure, setParentComponent, setProperty, setShortGraphName, setSilent, storeProperties
public static final int PS_PS
public static final int PS_EPS
public JaxoExportPS(int psmode)
psmode
- PS_PS or PS_EPS.public final boolean isLandscape()
public void setLandscape(boolean value)
value
- True for landscape, false for portrait.public final void setMode(int value)
value
- The new export mode (PS_XYZ constant).public final int getMode()
public final java.lang.String getFormatName()
getFormatName
in class AbstractJaxoPlugin
public final java.lang.String getFileExtension()
getFileExtension
in class AbstractJaxoPlugin
public final java.lang.String getFileExtensionDescription()
getFileExtensionDescription
in class AbstractJaxoPlugin
public java.lang.String description()
description
in interface JaxoPlugin
public java.lang.String pluginId()
pluginId
in interface JaxoPlugin
public java.lang.String getShortName()
getShortName
in interface JaxoPlugin
protected void exportTo(java.lang.String fileName) throws JaxoPluginExecutionException
exportTo
in class JaxoExportPlugin
fileName
- The file to export to.JaxoPluginExecutionException
- if exporting fails.
The exception message sould be displayable in error dialogs,
so it should be an internationalized string.public final int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pageIndex)
print
in interface java.awt.print.Printable
g
- The specified graphics context.pf
- The specified page format.pageIndex
- The specified page index.protected final void writePS(java.lang.String fileName)
fileName
- The export file name.public void preview(JaxoPreview p, boolean sameWindow)
preview
in class JaxoExportPlugin
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.public void commitConfiguration()
commitConfiguration
in class JaxoExportPlugin
public javax.swing.JComponent getConfigurationPanel()
getConfigurationPanel
in class JaxoExportPlugin
public final void updateLanguage()
JaxoPrefs.PREF_LANGUAGE
).updateLanguage
in interface JaxoLocalized
Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.