~teemu-heinamaki/ubuntu/maverick/tuxguitar/merge-from-debian

« back to all changes in this revision

Viewing changes to TuxGuitar-gtp/src/org/herac/tuxguitar/io/gtp/GTPPluginList.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2009-04-25 19:49:27 UTC
  • mfrom: (1.1.3 upstream) (2.1.7 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090425194927-pblqed0zxp0pmyeq
Tags: 1.1-1
* New Upstream Release (Closes: #489859) (LP: #366476)
* Merged patch : tuxguitar_1.0.dak-1ubuntu1.patch
* debian/README.txt
  - suggests to install tuxguitar-jsa

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
import java.util.ArrayList;
4
4
import java.util.List;
5
5
 
 
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;
11
13
 
12
 
public class GTPPluginList extends TGPluginList{
 
14
public class GTPPluginList extends TGPluginList implements TGPluginSetup{
13
15
        
14
16
        protected List getPlugins() {
 
17
                GTPSettingsUtil.instance().load();
 
18
                
15
19
                List plugins = new ArrayList();
16
20
                plugins.add(new TGInputStreamPlugin() {
17
21
                        protected TGInputStreamBase getInputStream() {
18
 
                                return new GP5InputStream();
19
 
                        }
20
 
                });
21
 
                plugins.add(new TGInputStreamPlugin() {
22
 
                        protected TGInputStreamBase getInputStream() {
23
 
                                return new GP4InputStream();
24
 
                        }
25
 
                });
26
 
                plugins.add(new TGInputStreamPlugin() {
27
 
                        protected TGInputStreamBase getInputStream() {
28
 
                                return new GP3InputStream();
29
 
                        }
30
 
                });
31
 
                plugins.add(new TGInputStreamPlugin() {
32
 
                        protected TGInputStreamBase getInputStream() {
33
 
                                return new GP2InputStream();
34
 
                        }
35
 
                });
36
 
                plugins.add(new TGInputStreamPlugin() {
37
 
                        protected TGInputStreamBase getInputStream() {
38
 
                                return new GP1InputStream();
39
 
                        }
40
 
                });
41
 
                plugins.add(new TGOutputStreamPlugin() {
42
 
                        protected TGOutputStreamBase getOutputStream() {
43
 
                                return new GP5OutputStream();
44
 
                        }
45
 
                });
46
 
                plugins.add(new TGOutputStreamPlugin() {
47
 
                        protected TGOutputStreamBase getOutputStream() {
48
 
                                return new GP4OutputStream();
49
 
                        }
50
 
                });
51
 
                plugins.add(new TGOutputStreamPlugin() {
52
 
                        protected TGOutputStreamBase getOutputStream() {
53
 
                                return new GP3OutputStream();
 
22
                                return new GP5InputStream(GTPSettingsUtil.instance().getSettings());
 
23
                        }
 
24
                });
 
25
                plugins.add(new TGInputStreamPlugin() {
 
26
                        protected TGInputStreamBase getInputStream() {
 
27
                                return new GP4InputStream(GTPSettingsUtil.instance().getSettings());
 
28
                        }
 
29
                });
 
30
                plugins.add(new TGInputStreamPlugin() {
 
31
                        protected TGInputStreamBase getInputStream() {
 
32
                                return new GP3InputStream(GTPSettingsUtil.instance().getSettings());
 
33
                        }
 
34
                });
 
35
                plugins.add(new TGInputStreamPlugin() {
 
36
                        protected TGInputStreamBase getInputStream() {
 
37
                                return new GP2InputStream(GTPSettingsUtil.instance().getSettings());
 
38
                        }
 
39
                });
 
40
                plugins.add(new TGInputStreamPlugin() {
 
41
                        protected TGInputStreamBase getInputStream() {
 
42
                                return new GP1InputStream(GTPSettingsUtil.instance().getSettings());
 
43
                        }
 
44
                });
 
45
                plugins.add(new TGOutputStreamPlugin() {
 
46
                        protected TGOutputStreamBase getOutputStream() {
 
47
                                return new GP5OutputStream(GTPSettingsUtil.instance().getSettings());
 
48
                        }
 
49
                });
 
50
                plugins.add(new TGOutputStreamPlugin() {
 
51
                        protected TGOutputStreamBase getOutputStream() {
 
52
                                return new GP4OutputStream(GTPSettingsUtil.instance().getSettings());
 
53
                        }
 
54
                });
 
55
                plugins.add(new TGOutputStreamPlugin() {
 
56
                        protected TGOutputStreamBase getOutputStream() {
 
57
                                return new GP3OutputStream(GTPSettingsUtil.instance().getSettings());
54
58
                        }
55
59
                });
56
60
                return plugins;
57
61
        }
58
62
        
 
63
        public void setupDialog(Shell parent) {
 
64
                GTPSettingsUtil.instance().configure(parent);
 
65
        }
 
66
        
59
67
        public String getAuthor() {
60
68
                return "Julian Casadesus <julian@casadesus.com.ar>";
61
69
        }