1
package org.herac.tuxguitar.gui.editors.chord;
3
public class ChordSettings {
5
private static ChordSettings instance;
7
private boolean emptyStringChords;
8
private float bassGrade;
9
private float fingeringGrade;
10
private float subsequentGrade;
11
private float requiredBasicsGrade;
12
private float manyStringsGrade;
13
private float goodChordSemanticsGrade;
14
private int chordsToDisplay;
15
private int howManyIncompleteChords;
16
private int chordTypeIndex;
17
private int findChordsMin;
18
private int findChordsMax;
20
private ChordSettings() {
21
this.emptyStringChords = false;
22
this.bassGrade = 200.0f;
23
this.fingeringGrade = 150.0f; // was:200
24
this.subsequentGrade = 200.0f;
25
this.requiredBasicsGrade = 150.0f;
26
this.manyStringsGrade = 100.0f;
27
this.goodChordSemanticsGrade = 200.0f;
28
this.chordsToDisplay = 30;
29
this.howManyIncompleteChords = 4;
30
this.chordTypeIndex = 0;
32
this.findChordsMax=15;
35
public static ChordSettings instance(){
36
if( instance == null ){
37
instance = new ChordSettings();
42
public float getBassGrade() {
43
return this.bassGrade;
46
public void setBassGrade(float bassGrade) {
47
this.bassGrade = bassGrade;
50
public int getChordsToDisplay() {
51
return this.chordsToDisplay;
54
public void setChordsToDisplay(int chordsToDisplay) {
55
this.chordsToDisplay = chordsToDisplay;
58
public boolean isEmptyStringChords() {
59
return this.emptyStringChords;
62
public void setEmptyStringChords(boolean emptyStringChords) {
63
this.emptyStringChords = emptyStringChords;
66
public float getFingeringGrade() {
67
return this.fingeringGrade;
70
public void setFingeringGrade(float fingeringGrade) {
71
this.fingeringGrade = fingeringGrade;
74
public float getGoodChordSemanticsGrade() {
75
return this.goodChordSemanticsGrade;
78
public void setGoodChordSemanticsGrade(float goodChordSemanticsGrade) {
79
this.goodChordSemanticsGrade = goodChordSemanticsGrade;
82
public float getManyStringsGrade() {
83
return this.manyStringsGrade;
86
public void setManyStringsGrade(float manyStringsGrade) {
87
this.manyStringsGrade = manyStringsGrade;
90
public float getRequiredBasicsGrade() {
91
return this.requiredBasicsGrade;
94
public void setRequiredBasicsGrade(float requiredBasicsGrade) {
95
this.requiredBasicsGrade = requiredBasicsGrade;
98
public float getSubsequentGrade() {
99
return this.subsequentGrade;
102
public void setSubsequentGrade(float subsequentGrade) {
103
this.subsequentGrade = subsequentGrade;
106
public int getIncompleteChords() {
107
return this.howManyIncompleteChords;
110
public void setIncompleteChords(int incomplete) {
111
this.howManyIncompleteChords = incomplete;
114
public int getFindChordsMin() {
115
return this.findChordsMin;
118
public void setFindChordsMin(int min) {
119
this.findChordsMin = min;
122
public int getFindChordsMax() {
123
return this.findChordsMax;
126
public void setFindChordsMax(int max) {
127
this.findChordsMax = max;
130
public int getChordTypeIndex() {
131
return this.chordTypeIndex;
134
public void setChordTypeIndex(int index) {
137
this.bassGrade = 200.0f;
138
this.fingeringGrade = 150.0f;
139
this.subsequentGrade = 200.0f;
140
this.requiredBasicsGrade = 150.0f;
141
this.manyStringsGrade = 100.0f;
142
this.goodChordSemanticsGrade = 200.0f;
144
case 1 : // inversions
145
this.bassGrade = -100.0f;
146
this.fingeringGrade = 150.0f;
147
this.subsequentGrade = 200.0f;
148
this.requiredBasicsGrade = 150.0f;
149
this.manyStringsGrade = 50.0f;
150
this.goodChordSemanticsGrade = 200.0f;
152
case 2 : // close-voiced
153
this.bassGrade = 50.0f;
154
this.fingeringGrade = 200.0f;
155
this.subsequentGrade = 350.0f;
156
this.requiredBasicsGrade = 150.0f;
157
this.manyStringsGrade = -100.0f;
158
this.goodChordSemanticsGrade = 200.0f;
160
case 3 : // open-voiced
161
this.bassGrade = 100.0f;
162
this.fingeringGrade = 100.0f;
163
this.subsequentGrade = -80.0f;
164
this.requiredBasicsGrade = 100.0f;
165
this.manyStringsGrade = -80.0f;
166
this.goodChordSemanticsGrade = 200.0f;
169
this.chordTypeIndex = index;