auto-indent with bugs
[scilab.git] / scilab / modules / xpad / src / java / org / scilab / modules / xpad / actions / PrintPreviewAction.java
index 8ce2a0a..d5165da 100644 (file)
@@ -14,15 +14,31 @@ package org.scilab.modules.xpad.actions;
 
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
+import java.awt.print.Printable;
 
 import javax.swing.KeyStroke;
 
+import org.scilab.modules.gui.menuitem.MenuItem;
+import org.scilab.modules.gui.pushbutton.PushButton;
 import org.scilab.modules.xpad.Xpad;
 
 public class PrintPreviewAction extends DefaultAction {
 
-    public PrintPreviewAction(Xpad editor) {
+    private PrintPreviewAction(Xpad editor) {
        super("Print Preview...", editor);
     }
     
+    public void doAction() {
+       //Printable p = getEditor().getTextPane().getPrintable();
+
+    }
+
+    public static MenuItem createMenu(Xpad editor) {
+       return createMenu("Print Preview...", null, new PrintPreviewAction(editor), KeyStroke.getKeyStroke(KeyEvent.VK_P, ActionEvent.CTRL_MASK+ActionEvent.SHIFT_MASK));
+    }
+    
+    public static PushButton createButton(Xpad editor) {
+       return createButton("Print Preview...", "document-print-preview.png", new PrintPreviewAction(editor));
+    }
+    
 }