2
* Created on 30-nov-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.editors;
9
import org.eclipse.swt.SWT;
10
import org.eclipse.swt.widgets.Composite;
11
import org.eclipse.swt.widgets.Menu;
12
import org.herac.tuxguitar.gui.TuxGuitar;
13
import org.herac.tuxguitar.gui.clipboard.ClipBoard;
14
import org.herac.tuxguitar.gui.editors.tab.Tablature;
19
* TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
21
public class TablatureEditor {
22
private Tablature tablature;
23
private ClipBoard clipBoard;
25
public TablatureEditor() {
26
this.clipBoard = new ClipBoard();
29
public void showTablature(Composite parent) {
30
this.tablature = new Tablature(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.DOUBLE_BUFFERED);
31
this.tablature.initGUI();
32
this.tablature.setSongManager(TuxGuitar.instance().getSongManager());
33
this.tablature.reloadViewLayout();
34
this.tablature.initDefaults();
35
this.tablature.updateTablature();
36
this.tablature.initCaret();
37
this.tablature.setFocus();
38
this.initKeyActions();
42
private void initKeyActions(){
43
TuxGuitar.instance().getkeyBindingManager().appendListenersTo(this.tablature);
46
private void initMenu(){
47
Menu menu = TuxGuitar.instance().getItemManager().getPopupMenu();
48
menu.addMenuListener(getTablature().getEditorKit());
49
this.tablature.setMenu(menu);
52
public void reloadConfig(){
53
getTablature().reloadStyles();
56
public Tablature getTablature() {
57
return this.tablature;
60
public ClipBoard getClipBoard(){
61
return this.clipBoard;
b'\\ No newline at end of file'