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.track;
9
import org.eclipse.swt.events.TypedEvent;
10
import org.herac.tuxguitar.gui.actions.Action;
11
import org.herac.tuxguitar.gui.editors.TablatureEditor;
12
import org.herac.tuxguitar.gui.editors.tab.SongTrackCoords;
17
* TODO To change the template for this generated type comment go to
18
* Window - Preferences - Java - Code Style - Code Templates
20
public class GoToTrackAction extends Action{
21
public static final String NAME = "action.track.goto";
23
public GoToTrackAction(TablatureEditor tablatureEditor) {
24
super(NAME,tablatureEditor);
27
public boolean doAction(TypedEvent e) {
28
Object data = e.widget.getData();
29
if(data instanceof SongTrackCoords){
30
SongTrackCoords trackCoords = (SongTrackCoords)data;
31
getEditor().getTablature().getCaret().update(trackCoords.getTrack().getNumber());