Examples of GraphicalViewer


Examples of org.eclipse.gef.GraphicalViewer

* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
public void run(IAction action) {
  int style = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().getStyle();
  Shell shell = new Shell((style & SWT.MIRRORED) != 0 ? SWT.RIGHT_TO_LEFT : SWT.NONE);
  GraphicalViewer viewer = new ScrollingGraphicalViewer();
  viewer.createControl(shell);
  viewer.setEditDomain(new DefaultEditDomain(null));
  viewer.setRootEditPart(new ScalableFreeformRootEditPart());
  viewer.setEditPartFactory(new GraphicalPartFactory());
  viewer.setContents(getContents());
  viewer.flush();
 
  int printMode = new PrintModeDialog(shell).open();
  if (printMode == -1)
    return;
  PrintDialog dialog = new PrintDialog(shell, SWT.NULL);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.