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

« back to all changes in this revision

Viewing changes to src/org/herac/tuxguitar/song/models/effects/GraceEffect.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.song.models.effects;
2
 
 
3
 
import org.herac.tuxguitar.song.models.Duration;
4
 
 
5
 
public class GraceEffect {
6
 
 
7
 
        public static final int TRANSITION_NONE = 0;
8
 
        
9
 
        public static final int TRANSITION_SLIDE = 1;
10
 
        
11
 
        public static final int TRANSITION_BEND = 2;    
12
 
        
13
 
        public static final int TRANSITION_HAMMER = 3;  
14
 
        
15
 
        private int fret;                       
16
 
        private int duration;
17
 
        private int dynamic;
18
 
        private int transition;
19
 
        private boolean onBeat;
20
 
        private boolean dead;
21
 
                
22
 
        public GraceEffect(int fret, int duration, int dynamic, int transition, boolean onBeat, boolean dead) {
23
 
                this.fret = fret;
24
 
                this.duration = duration;
25
 
                this.dynamic = dynamic;
26
 
                this.transition = transition;
27
 
                this.onBeat = onBeat;
28
 
                this.dead = dead;
29
 
        }
30
 
 
31
 
        public boolean isDead() {
32
 
                return dead;
33
 
        }
34
 
 
35
 
        public void setDead(boolean dead) {
36
 
                this.dead = dead;
37
 
        }
38
 
 
39
 
        public int getDuration() {
40
 
                return duration;
41
 
        }
42
 
 
43
 
        public void setDuration(int duration) {
44
 
                this.duration = duration;
45
 
        }
46
 
 
47
 
        public int getDynamic() {
48
 
                return dynamic;
49
 
        }
50
 
 
51
 
        public void setDynamic(int dynamic) {
52
 
                this.dynamic = dynamic;
53
 
        }
54
 
 
55
 
        public int getFret() {
56
 
                return fret;
57
 
        }
58
 
 
59
 
        public void setFret(int fret) {
60
 
                this.fret = fret;
61
 
        }
62
 
 
63
 
        public boolean isOnBeat() {
64
 
                return onBeat;
65
 
        }
66
 
 
67
 
        public void setOnBeat(boolean onBeat) {
68
 
                this.onBeat = onBeat;
69
 
        }
70
 
 
71
 
        public int getTransition() {
72
 
                return transition;
73
 
        }
74
 
 
75
 
        public void setTransition(int transition) {
76
 
                this.transition = transition;
77
 
        }
78
 
 
79
 
        public int getDurationTime(){
80
 
                return (int)(((float)Duration.QUARTER_TIME / 16.00 ) * (float)getDuration());
81
 
        }
82
 
        
83
 
        public Object clone(){
84
 
                return new GraceEffect(fret,duration,dynamic,transition,onBeat,dead);
85
 
        }
86
 
}