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

« back to all changes in this revision

Viewing changes to TuxGuitar/src/org/herac/tuxguitar/song/models/effects/TGEffectTrill.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
package org.herac.tuxguitar.song.models.effects;
 
2
 
 
3
import org.herac.tuxguitar.song.factory.TGFactory;
 
4
import org.herac.tuxguitar.song.models.TGDuration;
 
5
 
 
6
public abstract class TGEffectTrill {
 
7
        
 
8
        private int fret;
 
9
        private TGDuration duration;
 
10
        
 
11
        public TGEffectTrill(TGFactory factory) {
 
12
                this.fret = 0;
 
13
                this.duration = factory.newDuration();
 
14
        }
 
15
        
 
16
        public int getFret() {
 
17
                return this.fret;
 
18
        }
 
19
        
 
20
        public void setFret(int fret) {
 
21
                this.fret = fret;
 
22
        }
 
23
        
 
24
        public TGDuration getDuration() {
 
25
                return this.duration;
 
26
        }
 
27
        
 
28
        public void setDuration(TGDuration duration) {
 
29
                this.duration = duration;
 
30
        }
 
31
        
 
32
        public TGEffectTrill clone(TGFactory factory){
 
33
                TGEffectTrill effect = factory.newEffectTrill();
 
34
                effect.setFret(getFret());
 
35
                effect.getDuration().setValue(getDuration().getValue());
 
36
                effect.getDuration().setDotted(getDuration().isDotted());
 
37
                effect.getDuration().setDoubleDotted(getDuration().isDoubleDotted());
 
38
                effect.getDuration().getTupleto().setEnters(getDuration().getTupleto().getEnters());
 
39
                effect.getDuration().getTupleto().setTimes(getDuration().getTupleto().getTimes());
 
40
                
 
41
                return effect;
 
42
        }
 
43
        
 
44
}