2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2009 - DIGITEO - Bruno JOFRET
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 package org.scilab.modules.xpad.actions;
15 import java.awt.event.ActionEvent;
16 import java.awt.event.KeyEvent;
17 import java.awt.print.PrinterJob;
19 import javax.print.attribute.HashPrintRequestAttributeSet;
20 import javax.swing.KeyStroke;
22 import org.scilab.modules.gui.menuitem.MenuItem;
23 import org.scilab.modules.gui.pushbutton.PushButton;
24 import org.scilab.modules.xpad.Xpad;
26 public class PrintPreviewAction extends DefaultAction {
28 private PrintPreviewAction(Xpad editor) {
29 super("Print Preview...", editor);
32 // public void doAction() {
36 public static MenuItem createMenu(Xpad editor) {
37 return createMenu("Print Preview...", null, new PrintPreviewAction(editor), KeyStroke.getKeyStroke(KeyEvent.VK_P, ActionEvent.CTRL_MASK+ActionEvent.SHIFT_MASK));
40 public static PushButton createButton(Xpad editor) {
41 return createButton("Print Preview...", "document-print-preview.png", new PrintPreviewAction(editor));