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.player;
9
import org.eclipse.swt.events.TypedEvent;
10
import org.herac.tuxguitar.gui.TuxGuitar;
11
import org.herac.tuxguitar.gui.actions.Action;
12
import org.herac.tuxguitar.gui.editors.TablatureEditor;
13
import org.herac.tuxguitar.gui.helper.SyncThread;
18
* TODO To change the template for this generated type comment go to
19
* Window - Preferences - Java - Code Style - Code Templates
21
public class StopSongAction extends Action{
22
public static final String NAME = "action.player.stop";
24
public StopSongAction(TablatureEditor tablatureEditor) {
25
super(NAME,true,tablatureEditor);
28
public boolean doAction(TypedEvent e) {
29
TuxGuitar.instance().getPlayer().stop();
30
TuxGuitar.instance().getPlayer().reset();
32
getEditor().getTablature().getCaret().goToTickPosition();
38
private void redrawTablature(){
39
new SyncThread(new Runnable() {
41
if(!TuxGuitar.isDisposed()){