2
* Created on 17-dic-2005
4
* TODO To change the template for this generated file go to
5
* Window - Preferences - Java - Code Style - Code Templates
7
package org.herac.tuxguitar.gui.actions.file;
9
import org.eclipse.swt.SWT;
10
import org.eclipse.swt.events.TypedEvent;
11
import org.herac.tuxguitar.gui.TuxGuitar;
12
import org.herac.tuxguitar.gui.actions.Action;
13
import org.herac.tuxguitar.gui.actions.ActionLock;
18
* TODO To change the template for this generated type comment go to
19
* Window - Preferences - Java - Code Style - Code Templates
21
public class SaveFileAction extends Action{
22
public static final String NAME = "action.file.save";
24
public SaveFileAction() {
25
super(NAME, AUTO_LOCK | AUTO_UPDATE | KEY_BINDING_AVAILABLE );
28
protected int execute(TypedEvent e){
29
final String fileName = FileActionUtils.getFileName();
33
TuxGuitar.instance().loadCursor(SWT.CURSOR_WAIT);
34
new Thread(new Runnable() {
36
if(!TuxGuitar.isDisposed()){
37
FileActionUtils.save(fileName);
38
TuxGuitar.instance().loadCursor(SWT.CURSOR_ARROW);