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

« back to all changes in this revision

Viewing changes to TuxGuitar/src/org/herac/tuxguitar/song/models/TGNote.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2008-06-19 00:30:30 UTC
  • mfrom: (1.1.1 upstream) (2.1.3 hardy)
  • Revision ID: james.westby@ubuntu.com-20080619003030-agens2gvd5m4dacu
New upstream release (Closes: #481728) also (LP: #176979, #212207)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Created on 23-nov-2005
 
3
 *
 
4
 * TODO To change the template for this generated file go to
 
5
 * Window - Preferences - Java - Code Style - Code Templates
 
6
 */
 
7
package org.herac.tuxguitar.song.models;
 
8
 
 
9
import org.herac.tuxguitar.song.factory.TGFactory;
 
10
 
 
11
/**
 
12
 * @author julian
 
13
 * 
 
14
 * TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
 
15
 */
 
16
public abstract class TGNote {
 
17
        private int value;
 
18
        private int velocity;
 
19
        private int string;
 
20
        private boolean tiedNote;
 
21
        private TGNoteEffect effect;
 
22
        private TGBeat beat;
 
23
        
 
24
        public TGNote(TGFactory factory) {
 
25
                this.value = 0;
 
26
                this.velocity = TGVelocities.DEFAULT;
 
27
                this.string = 1;
 
28
                this.tiedNote = false;
 
29
                this.effect = factory.newEffect();
 
30
        }
 
31
        
 
32
        public int getValue() {
 
33
                return this.value;
 
34
        }
 
35
        
 
36
        public void setValue(int value) {
 
37
                this.value = value;
 
38
        }
 
39
        
 
40
        public int getVelocity() {
 
41
                return this.velocity;
 
42
        }
 
43
        
 
44
        public void setVelocity(int velocity) {
 
45
                this.velocity = velocity;
 
46
        }
 
47
        
 
48
        public int getString() {
 
49
                return this.string;
 
50
        }
 
51
        
 
52
        public void setString(int string) {
 
53
                this.string = string;
 
54
        }
 
55
        
 
56
        public boolean isTiedNote() {
 
57
                return this.tiedNote;
 
58
        }
 
59
        
 
60
        public void setTiedNote(boolean tiedNote) {
 
61
                this.tiedNote = tiedNote;
 
62
        }
 
63
        
 
64
        public TGNoteEffect getEffect() {
 
65
                return this.effect;
 
66
        }
 
67
        
 
68
        public void setEffect(TGNoteEffect effect) {
 
69
                this.effect = effect;
 
70
        }
 
71
        
 
72
        public TGBeat getBeat() {
 
73
                return this.beat;
 
74
        }
 
75
        
 
76
        public void setBeat(TGBeat beat) {
 
77
                this.beat = beat;
 
78
        }
 
79
        
 
80
        public TGNote clone(TGFactory factory){
 
81
                TGNote note = factory.newNote();
 
82
                note.setValue(getValue());
 
83
                note.setVelocity(getVelocity());
 
84
                note.setString(getString());
 
85
                note.setTiedNote(isTiedNote());
 
86
                note.setEffect(getEffect().clone(factory));
 
87
                return note;
 
88
        }
 
89
        
 
90
}
 
 
b'\\ No newline at end of file'