~ubuntu-branches/ubuntu/oneiric/tuxguitar/oneiric

« back to all changes in this revision

Viewing changes to TuxGuitar/src/org/herac/tuxguitar/gui/tools/custom/TGCustomToolManager.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2008-06-19 00:30:30 UTC
  • mto: (5.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20080619003030-h719szrhsngou7c6
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.herac.tuxguitar.gui.tools.custom;
 
2
 
 
3
import java.util.ArrayList;
 
4
import java.util.Iterator;
 
5
import java.util.List;
 
6
 
 
7
public class TGCustomToolManager {
 
8
        
 
9
        private static TGCustomToolManager instance;
 
10
        
 
11
        private List tools;
 
12
        
 
13
        public TGCustomToolManager(){
 
14
                this.tools = new ArrayList();
 
15
        }
 
16
        
 
17
        public static TGCustomToolManager instance(){
 
18
                if(instance == null){
 
19
                        instance = new TGCustomToolManager();
 
20
                }
 
21
                return instance;
 
22
        }
 
23
        
 
24
        public void addCustomTool(TGCustomTool tool){
 
25
                this.tools.add(tool);
 
26
        }
 
27
        
 
28
        public void removeCustomTool(TGCustomTool tool){
 
29
                this.tools.remove(tool);
 
30
        }
 
31
        
 
32
        public Iterator getCustomTools(){
 
33
                return this.tools.iterator();
 
34
        }
 
35
        
 
36
}