org.eclipse.gef.print.PrintGraphicalViewerOperation Java Examples
The following examples show how to use
org.eclipse.gef.print.PrintGraphicalViewerOperation.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PrintImageAction.java From ermasterr with Apache License 2.0 | 6 votes |
/** * {@inheritDoc} */ @Override public void run() { GraphicalViewer viewer; viewer = getWorkbenchPart().getAdapter(GraphicalViewer.class); final PrintDialog dialog = new PrintDialog(viewer.getControl().getShell(), SWT.NULL); final PrinterData data = dialog.open(); if (data != null) { final Printer printer = new Printer(data); final PrintGraphicalViewerOperation op = new PrintERDiagramOperation(printer, viewer); op.run(getWorkbenchPart().getTitle()); } }