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.Printable;
19 import javax.swing.KeyStroke;
21 import org.scilab.modules.gui.menuitem.MenuItem;
22 import org.scilab.modules.gui.pushbutton.PushButton;
23 import org.scilab.modules.xpad.Xpad;
25 public class PrintPreviewAction extends DefaultAction {
27 private PrintPreviewAction(Xpad editor) {
28 super("Print Preview...", editor);
31 public void doAction() {
32 //Printable p = getEditor().getTextPane().getPrintable();
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));