View Javadoc
1 /* 2 * Created on 05.03.2004 3 */ 4 package org.xpcards.actions; 5 6 import java.io.FileNotFoundException; 7 8 import org.eclipse.swt.SWT; 9 import org.eclipse.swt.graphics.Cursor; 10 import org.eclipse.swt.widgets.Shell; 11 import org.xpcards.XPCards; 12 13 /*** 14 * @author galu02 15 */ 16 public class Save extends AbstractAction { 17 18 public static final String ACTION_ID = "Save"; 19 20 /*** 21 * @see org.xpcards.actions.AbstractAction#performAction() 22 */ 23 public void performAction(final Shell shell, XPCards parent, Object[] args) { 24 // if ( parent.projects() == null || !parent.projects().hasMoreElements() ){ 25 // return; 26 // } 27 28 // if (parent.getFile() == null) { 29 // parent.getAction(SaveAs.ACTION_ID).performAction(shell, parent, null); 30 // return; 31 // } 32 33 34 Cursor waitCursor = new Cursor(shell.getDisplay(), SWT.CURSOR_WAIT); 35 shell.setCursor(waitCursor); 36 37 // try { 38 // System.err.println("Save: " + parent.getFile()); 39 // parent.serializeProjectsCollection(parent.getFile()); 40 // } catch (FileNotFoundException e) { 41 // displayError( 42 // "File not found" + "\n" + parent.getFile().getName(), 43 // shell); 44 // } finally { 45 // shell.setCursor(null); 46 // waitCursor.dispose(); 47 // } 48 49 parent.setModified(true); 50 } 51 52 }

This page was automatically generated by Maven