|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaxodraw.plugin.AbstractJaxoPlugin
net.sf.jaxodraw.plugin.JaxoExportPlugin
net.sf.jaxodraw.io.exports.JaxoExport
net.sf.jaxodraw.io.exports.JaxoExportPS
public class JaxoExportPS
The class that is responsible for exporting to postscript output: portrait, landscape or EPS are possible options. Asks for an export file name.
Nested Class Summary | |
---|---|
static class |
JaxoExportPS.Format
The export modes supported by this JaxoExport. |
Field Summary |
---|
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
JaxoExportPS(JaxoExportPS.Format psmode)
Constructor. |
Method Summary | |
---|---|
void |
commitConfiguration()
Apply the changes made in the configuration panel. |
String |
description()
Return a short description (preferably internationalized) of what this plugin does. |
protected void |
exportTo(String fileName)
Export the graph to the given nonempty file name. |
JComponent |
getConfigurationPanel()
Returns a panel that allows to configure optional parameters of this export format. |
String |
getFileExtension()
Extension to be used for plugin files. |
String |
getFileExtensionDescription()
Description to be used for plugin file extensions. |
String |
getFormatName()
The name of the plugin (export or import) format. |
JaxoExportPS.Format |
getMode()
Returns the current export mode. |
String |
getShortName()
Return a short name for this plugin. |
boolean |
isLandscape()
Returns the landscape mode. |
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(Graphics g,
PageFormat pf,
int pageIndex)
The actual printing routine required by the Printable interface. |
void |
setLandscape(boolean value)
Sets the landscape mode. |
void |
setMode(JaxoExportPS.Format 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(File file)
The class that is responsible for exporting to postscript output: portrait, landscape or EPS are possible options. |
Methods inherited from class net.sf.jaxodraw.io.exports.JaxoExport |
---|
getBuiltInFormats, getWarningForGraph, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JaxoExportPS(JaxoExportPS.Format psmode)
psmode
- PS_PS or PS_EPS.Method Detail |
---|
public final boolean isLandscape()
public void setLandscape(boolean value)
value
- True for landscape, false for portrait.public final void setMode(JaxoExportPS.Format value)
value
- The new export mode (PS_XYZ constant).public final JaxoExportPS.Format getMode()
public final String getFormatName()
getFormatName
in class AbstractJaxoPlugin
public final String getFileExtension()
getFileExtension
in class AbstractJaxoPlugin
public final String getFileExtensionDescription()
getFileExtensionDescription
in class AbstractJaxoPlugin
public String description()
description
in interface JaxoPlugin
public String pluginId()
pluginId
in interface JaxoPlugin
public String getShortName()
getShortName
in interface JaxoPlugin
protected void exportTo(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(Graphics g, PageFormat pf, int pageIndex)
print
in interface Printable
g
- The specified graphics context.pf
- The specified page format.pageIndex
- The specified page index.
protected final void writePS(File file)
file
- The export file.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 JComponent getConfigurationPanel()
getConfigurationPanel
in class JaxoExportPlugin
public final void updateLanguage()
JaxoPrefs.PREF_LANGUAGE
).
updateLanguage
in interface JaxoLocalized
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |