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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2007-02-04 01:41:23 UTC
  • Revision ID: james.westby@ubuntu.com-20070204014123-9pv7okph0iaiqkvw
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

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 java.io.Serializable;
 
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 class Note implements Component,Serializable{
 
17
    private int value;
 
18
    private long start;
 
19
    private Duration duration;
 
20
    private int velocity;
 
21
    private int string;
 
22
    private boolean tiedNote;
 
23
    private NoteEffect effect;
 
24
    private long startWithRepetitions;
 
25
    
 
26
    public Note(int value, long start, Duration duration, int velocity,int string,boolean tiedNote,NoteEffect effect) {
 
27
        this.value = value;
 
28
        this.start = start;
 
29
        this.duration = duration;
 
30
        this.velocity = velocity;
 
31
        this.string = string;
 
32
        this.tiedNote = tiedNote;
 
33
        this.effect = effect;
 
34
        this.startWithRepetitions = this.start;
 
35
    }
 
36
 
 
37
    public long getStart() {
 
38
        return start;
 
39
    }
 
40
 
 
41
    public void setStart(long start) {
 
42
        this.start = start;
 
43
    }
 
44
 
 
45
    public int getValue() {
 
46
        return value;
 
47
    }
 
48
 
 
49
    public void setValue(int value) {
 
50
        this.value = value;
 
51
    }
 
52
 
 
53
    public Duration getDuration() {
 
54
        return duration;
 
55
    }
 
56
 
 
57
    public void setDuration(Duration duration) {
 
58
        this.duration = duration;
 
59
    }
 
60
 
 
61
    public int getVelocity() {
 
62
        return velocity;
 
63
    }
 
64
 
 
65
    public void setVelocity(int velocity) {
 
66
        this.velocity = velocity;
 
67
    }
 
68
 
 
69
    public int getString() {
 
70
        return string;
 
71
    }
 
72
 
 
73
    public void setString(int string) {
 
74
        this.string = string;
 
75
    }
 
76
    
 
77
    public boolean isTiedNote() {
 
78
        return tiedNote;
 
79
    }
 
80
    
 
81
    public void setTiedNote(boolean tiedNote) {
 
82
        this.tiedNote = tiedNote;
 
83
    }
 
84
    
 
85
 
 
86
 
 
87
        public NoteEffect getEffect() {
 
88
        return effect;
 
89
    }
 
90
    public void setEffect(NoteEffect effect) {
 
91
        this.effect = effect;
 
92
    }
 
93
    public long getStartWithRepetitions() {
 
94
        return startWithRepetitions;
 
95
    }
 
96
    public void setStartWithRepetitions(long startWithRepetitions) {
 
97
        this.startWithRepetitions = startWithRepetitions;
 
98
    }    
 
99
    
 
100
    public Object clone(){
 
101
        return new Note(getValue(),getStart(),(Duration)getDuration().clone(),getVelocity(),getString(),isTiedNote(),(NoteEffect)getEffect().clone());
 
102
    }
 
103
}
 
 
b'\\ No newline at end of file'