Class PlotExportUtil
java.lang.Object
org.dawnsci.plotting.jreality.print.PlotExportUtil
Utility class for exporting any active plotting area either as Image file or hardcopy on a printer device
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyGraph(de.jreality.ui.viewerapp.AbstractViewerApp viewerApp) Copy the graph to the Clipboard.static org.eclipse.swt.graphics.ImagecreateImage(de.jreality.ui.viewerapp.AbstractViewerApp viewerApp, org.eclipse.swt.widgets.Display display, Plot1DGraphTable legendTable, org.eclipse.swt.printing.PrinterData printerData, int resolutionMultiplier) static voidprintGraph(org.eclipse.swt.printing.PrinterData printerData, de.jreality.ui.viewerapp.AbstractViewerApp viewerApp, org.eclipse.swt.widgets.Display display, Plot1DGraphTable legendTable, float scaling) Print the graph to a printer.static voidSave the graph with the given filename.
-
Field Details
-
FILE_TYPES
-
-
Constructor Details
-
PlotExportUtil
public PlotExportUtil()
-
-
Method Details
-
saveGraph
public static void saveGraph(String filename, String fileType, de.jreality.ui.viewerapp.AbstractViewerApp viewerApp) throws Exception Save the graph with the given filename. If the file name ends with a known extension, this is used as the file type otherwise it is the string passed in which is read from the save as dialog form normally.- Parameters:
filename- the name under which the graph should be savedfileType- type of the fileviewerApp- ViewerApp containing the current display- Throws:
FileNotFoundExceptionException
-
copyGraph
public static void copyGraph(de.jreality.ui.viewerapp.AbstractViewerApp viewerApp) throws IOException Copy the graph to the Clipboard.- Parameters:
viewerApp- ViewerApp containing the current display- Throws:
IOException
-
printGraph
public static void printGraph(org.eclipse.swt.printing.PrinterData printerData, de.jreality.ui.viewerapp.AbstractViewerApp viewerApp, org.eclipse.swt.widgets.Display display, Plot1DGraphTable legendTable, float scaling) Print the graph to a printer. This will temporary create an image with 4 times super sampling for good quality and then sends the image to the printer, afterwards deleting the image again- Parameters:
printerData- SWT specific printer objectviewerApp- ViewerApp containing the current displaydisplay- SWT display // * @param scaling factor
-
createImage
public static org.eclipse.swt.graphics.Image createImage(de.jreality.ui.viewerapp.AbstractViewerApp viewerApp, org.eclipse.swt.widgets.Display display, Plot1DGraphTable legendTable, org.eclipse.swt.printing.PrinterData printerData, int resolutionMultiplier)
-