3
3
import java.util.ArrayList;
4
4
import java.util.List;
6
import org.eclipse.swt.widgets.Shell;
7
import org.herac.tuxguitar.gui.system.plugins.TGPluginSetup;
6
8
import org.herac.tuxguitar.gui.system.plugins.base.TGInputStreamPlugin;
7
9
import org.herac.tuxguitar.gui.system.plugins.base.TGOutputStreamPlugin;
8
10
import org.herac.tuxguitar.gui.system.plugins.base.TGPluginList;
9
11
import org.herac.tuxguitar.io.base.TGInputStreamBase;
10
12
import org.herac.tuxguitar.io.base.TGOutputStreamBase;
12
public class GTPPluginList extends TGPluginList{
14
public class GTPPluginList extends TGPluginList implements TGPluginSetup{
14
16
protected List getPlugins() {
17
GTPSettingsUtil.instance().load();
15
19
List plugins = new ArrayList();
16
20
plugins.add(new TGInputStreamPlugin() {
17
21
protected TGInputStreamBase getInputStream() {
18
return new GP5InputStream();
21
plugins.add(new TGInputStreamPlugin() {
22
protected TGInputStreamBase getInputStream() {
23
return new GP4InputStream();
26
plugins.add(new TGInputStreamPlugin() {
27
protected TGInputStreamBase getInputStream() {
28
return new GP3InputStream();
31
plugins.add(new TGInputStreamPlugin() {
32
protected TGInputStreamBase getInputStream() {
33
return new GP2InputStream();
36
plugins.add(new TGInputStreamPlugin() {
37
protected TGInputStreamBase getInputStream() {
38
return new GP1InputStream();
41
plugins.add(new TGOutputStreamPlugin() {
42
protected TGOutputStreamBase getOutputStream() {
43
return new GP5OutputStream();
46
plugins.add(new TGOutputStreamPlugin() {
47
protected TGOutputStreamBase getOutputStream() {
48
return new GP4OutputStream();
51
plugins.add(new TGOutputStreamPlugin() {
52
protected TGOutputStreamBase getOutputStream() {
53
return new GP3OutputStream();
22
return new GP5InputStream(GTPSettingsUtil.instance().getSettings());
25
plugins.add(new TGInputStreamPlugin() {
26
protected TGInputStreamBase getInputStream() {
27
return new GP4InputStream(GTPSettingsUtil.instance().getSettings());
30
plugins.add(new TGInputStreamPlugin() {
31
protected TGInputStreamBase getInputStream() {
32
return new GP3InputStream(GTPSettingsUtil.instance().getSettings());
35
plugins.add(new TGInputStreamPlugin() {
36
protected TGInputStreamBase getInputStream() {
37
return new GP2InputStream(GTPSettingsUtil.instance().getSettings());
40
plugins.add(new TGInputStreamPlugin() {
41
protected TGInputStreamBase getInputStream() {
42
return new GP1InputStream(GTPSettingsUtil.instance().getSettings());
45
plugins.add(new TGOutputStreamPlugin() {
46
protected TGOutputStreamBase getOutputStream() {
47
return new GP5OutputStream(GTPSettingsUtil.instance().getSettings());
50
plugins.add(new TGOutputStreamPlugin() {
51
protected TGOutputStreamBase getOutputStream() {
52
return new GP4OutputStream(GTPSettingsUtil.instance().getSettings());
55
plugins.add(new TGOutputStreamPlugin() {
56
protected TGOutputStreamBase getOutputStream() {
57
return new GP3OutputStream(GTPSettingsUtil.instance().getSettings());
63
public void setupDialog(Shell parent) {
64
GTPSettingsUtil.instance().configure(parent);
59
67
public String getAuthor() {
60
68
return "Julian Casadesus <julian@casadesus.com.ar>";