Examples of PrintPreviewPanel


Examples of com.eteks.sweethome3d.swing.PrintPreviewPanel

    // Check dialog box is displayed
    JDialog printPreviewDialog = (JDialog)new BasicFinder().find(frame,
        new ClassMatcher (JDialog.class, true));
    assertTrue("Print preview dialog not showing", printPreviewDialog.isShowing());
    // Retrieve PageSetupPanel components
    PrintPreviewPanel printPreviewPanel = (PrintPreviewPanel)TestUtilities.findComponent(
        frame, PrintPreviewPanel.class);
    JToolBar toolBar =
        (JToolBar)TestUtilities.getField(printPreviewPanel, "toolBar");
    JButton previousButton = (JButton)toolBar.getComponent(0);
    final JButton nextButton = (JButton)toolBar.getComponent(1);
View Full Code Here

Examples of com.intellij.openapi.graph.view.PrintPreviewPanel

public class Graph2DPrintPreviewPanel {
  private Graph2DPrintPreviewPanel() {
  }

  public static PrintPreviewPanel createPanel(PrinterJob printJob, final Graph2DPrinter gp, PageFormat pf) {
    final PrintPreviewPanel panel = GraphManager.getGraphManager()
      .createPrintPreviewPanel(printJob, gp, gp.getPosterColumns(), gp.getPosterColumns() * gp.getPosterRows(), pf);

    final OptionHandler options = PrintUtil.createPrintOptions();

    //show custom print dialog and adopt values
    Action optionAction = new AbstractAction(PrintUtil.OPTIONS_BUTTON) {
      public void actionPerformed(ActionEvent ev) {
        if (!options.showEditor()) return;

        PrintUtil.initGraph2DPrinter(gp, options);

        panel.setPages(0, gp.getPosterColumns(), gp.getPosterColumns() * gp.getPosterRows());
      }
    };
    panel.addControlComponent(new JButton(optionAction));

    return panel;
  }
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.