2
* Created on 02-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.items.tool;
9
import org.eclipse.swt.SWT;
10
import org.eclipse.swt.widgets.ToolBar;
11
import org.eclipse.swt.widgets.ToolItem;
12
import org.herac.tuxguitar.gui.SystemImages;
13
import org.herac.tuxguitar.gui.TuxGuitar;
14
import org.herac.tuxguitar.gui.actions.marker.AddMarkerAction;
15
import org.herac.tuxguitar.gui.actions.marker.GoFirstMarkerAction;
16
import org.herac.tuxguitar.gui.actions.marker.GoLastMarkerAction;
17
import org.herac.tuxguitar.gui.actions.marker.GoNextMarkerAction;
18
import org.herac.tuxguitar.gui.actions.marker.GoPreviousMarkerAction;
19
import org.herac.tuxguitar.gui.actions.marker.ListMarkersAction;
20
import org.herac.tuxguitar.gui.items.ToolItems;
24
* TODO To change the template for this generated type comment go to
25
* Window - Preferences - Java - Code Style - Code Templates
27
public class MarkerToolItems extends ToolItems{
28
public static final String NAME = "marker.items";
30
private ToolBar toolBar;
32
private ToolItem list;
33
private ToolItem first;
34
private ToolItem last;
35
private ToolItem previous;
36
private ToolItem next;
38
public MarkerToolItems(){
42
public void showItems(ToolBar toolBar){
43
this.toolBar = toolBar;
45
this.add = new ToolItem(toolBar, SWT.PUSH);
46
this.add.setImage(SystemImages.MARKER_ADD);
47
this.add.addSelectionListener(TuxGuitar.instance().getAction(AddMarkerAction.NAME));
50
this.list = new ToolItem(toolBar, SWT.PUSH);
51
this.list.setImage(SystemImages.MARKER_LIST);
52
this.list.addSelectionListener(TuxGuitar.instance().getAction(ListMarkersAction.NAME));
55
new ToolItem(toolBar, SWT.SEPARATOR);
58
this.first = new ToolItem(toolBar, SWT.PUSH);
59
this.first.setImage(SystemImages.MARKER_FIRST);
60
this.first.addSelectionListener(TuxGuitar.instance().getAction(GoFirstMarkerAction.NAME));
63
this.previous = new ToolItem(toolBar, SWT.PUSH);
64
this.previous.setImage(SystemImages.MARKER_PREVIOUS);
65
this.previous.addSelectionListener(TuxGuitar.instance().getAction(GoPreviousMarkerAction.NAME));
68
this.next = new ToolItem(toolBar, SWT.PUSH);
69
this.next.setImage(SystemImages.MARKER_NEXT);
70
this.next.addSelectionListener(TuxGuitar.instance().getAction(GoNextMarkerAction.NAME));
73
this.last = new ToolItem(toolBar, SWT.PUSH);
74
this.last.setImage(SystemImages.MARKER_LAST);
75
this.last.addSelectionListener(TuxGuitar.instance().getAction(GoLastMarkerAction.NAME));
77
this.loadProperties();
85
public void loadProperties(){
86
this.add.setToolTipText(TuxGuitar.getProperty("marker.add"));
87
this.list.setToolTipText(TuxGuitar.getProperty("marker.list"));
88
this.first.setToolTipText(TuxGuitar.getProperty("marker.first"));
89
this.last.setToolTipText(TuxGuitar.getProperty("marker.last"));
90
this.previous.setToolTipText(TuxGuitar.getProperty("marker.previous"));
91
this.next.setToolTipText(TuxGuitar.getProperty("marker.next"));