Package org.eclipse.swt.printing

Examples of org.eclipse.swt.printing.PrintDialog.open()


 
  int printMode = new PrintModeDialog(shell).open();
  if (printMode == -1)
    return;
  PrintDialog dialog = new PrintDialog(shell, SWT.NULL);
  PrinterData data = dialog.open();
  if (data != null) {
    PrintGraphicalViewerOperation op =
          new PrintGraphicalViewerOperation(new Printer(data), viewer);
    op.setPrintMode(printMode);
    op.run(selectedFile.getName());
View Full Code Here


    public static void printDialog(Shell shell, Document doc, String url,
            NamespaceHandler nsh, String jobName) {
        PrintDialog dlg = new PrintDialog(shell);
        dlg.setText(jobName);
        PrinterData data = dlg.open();
        if (data != null) {
            print(data, doc, url, nsh, jobName);
        }
    }
View Full Code Here

    public static void printDialog(Shell shell, String url,
            NamespaceHandler nsh, String jobName) {
        PrintDialog dlg = new PrintDialog(shell);
        dlg.setText(jobName);
        PrinterData data = dlg.open();
        if (data != null) {
            print(data, url, nsh, jobName);
        }
    }
View Full Code Here

    {
        NeoGraphViewPart view = (NeoGraphViewPart) getWorkbenchPart();
        // let the user select the print mode
        PrintDialog dialog = new PrintDialog(
                view.getViewer().getControl().getShell(), SWT.NULL );
        PrinterData data = dialog.open();
        if ( data != null )
        {
            // TODO This is only a temporary implementation, until the Zest
            // Graph supports true
            // scalable printing...
View Full Code Here

       * .swt.events.SelectionEvent)
       */
      @Override
      public void widgetSelected(SelectionEvent arg0) {
        PrintDialog dialog = new PrintDialog(shell);
        PrinterData data = dialog.open();
        if (data == null)
          return;
        Printer printer = new Printer(data);
        GC gc = new GC(printer);

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.