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.view.ShowFretBoardAction;
15
import org.herac.tuxguitar.gui.actions.view.ShowMixerAction;
16
import org.herac.tuxguitar.gui.actions.view.ShowTransportAction;
17
import org.herac.tuxguitar.gui.items.ToolItems;
22
* TODO To change the template for this generated type comment go to
23
* Window - Preferences - Java - Code Style - Code Templates
25
public class ViewToolItems extends ToolItems{
26
public static final String NAME = "view.items";
28
private ToolBar toolBar;
29
private ToolItem showFretBoard;
30
private ToolItem showMixer;
31
private ToolItem showTransport;
33
public ViewToolItems(){
37
public void showItems(ToolBar toolBar){
38
this.toolBar = toolBar;
41
this.showFretBoard = new ToolItem(toolBar, SWT.CHECK);
42
this.showFretBoard.setImage(SystemImages.FRETBOARD_IMAGE);
43
this.showFretBoard.addSelectionListener(TuxGuitar.instance().getAction(ShowFretBoardAction.NAME));
46
this.showMixer = new ToolItem(toolBar, SWT.CHECK);
47
this.showMixer.setImage(SystemImages.MIXER_IMAGE);
48
this.showMixer.addSelectionListener(TuxGuitar.instance().getAction(ShowMixerAction.NAME));
51
this.showTransport = new ToolItem(toolBar, SWT.CHECK);
52
this.showTransport.setImage(SystemImages.TRANSPORT_IMAGE);
53
this.showTransport.addSelectionListener(TuxGuitar.instance().getAction(ShowTransportAction.NAME));
55
this.loadProperties();
60
this.showFretBoard.setSelection(TuxGuitar.instance().getFretBoardEditor().isVisible());
61
this.showMixer.setSelection(!TuxGuitar.instance().getMixer().isDisposed());
62
this.showTransport.setSelection(!TuxGuitar.instance().getTransport().isDisposed());
65
public void loadProperties(){
66
this.showFretBoard.setToolTipText(TuxGuitar.getProperty("show-fretboard"));
67
this.showMixer.setToolTipText(TuxGuitar.getProperty("show-mixer"));
68
this.showTransport.setToolTipText(TuxGuitar.getProperty("show-transport"));