Revision 1498

View differences:

branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Equidistancia.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
29 33
				
30 34
				if ("cancel".equalsIgnoreCase(label)){
31 35
					previousStatus = status;
32
					status = 4;
36
					status = -1;
33 37
					
34 38
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
35 39
				}
......
47 51
				
48 52
				if ("cancel".equalsIgnoreCase(label)){
49 53
					previousStatus = status;
50
					status = 4;
54
					status = -1;
51 55
					
52 56
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
53 57
				}
......
65 69
				
66 70
				if ("cancel".equalsIgnoreCase(label)){
67 71
					previousStatus = status;
68
					status = 4;
72
					status = -1;
69 73
					
70 74
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
71 75
				}
......
78 82
					previousStatus = status;
79 83
					status = 4;
80 84
					
81
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
85
					return com.iver.fsac.Automaton.TRANSITION_SUCCESS;
82 86
				}
83 87
				
84 88
				if ("cancel".equalsIgnoreCase(label)){
85 89
					previousStatus = status;
86
					status = 4;
90
					status = -1;
87 91
					
88 92
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
89 93
				}
......
101 105
				
102 106
				if ("cancel".equalsIgnoreCase(label)){
103 107
					previousStatus = status;
104
					status = 4;
108
					status = -1;
105 109
					
106 110
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
107 111
				}
......
123 127
	
124 128
	public boolean checkState(char c){
125 129
		
130
		if (status == -1){
131
			return "".indexOf(c) != -1;
132
		}
133
		
126 134
		if (status == 0){
127 135
			return "".indexOf(c) != -1;
128 136
		}
......
149 157
	
150 158
	public String[] getCurrentTransitions(){
151 159
		
160
		if (status == -1){
161
			return new String[]{};
162
		}
163
		
152 164
		if (status == 0){
153 165
			return new String[]{"punto", "numero", "cancel"};
154 166
		}
......
175 187
	
176 188
	public String[] getCurrentTransitionDescriptions(){
177 189
		
190
		if (status == -1){
191
			return new String[]{};
192
		}
193
		
178 194
		if (status == 0){
179 195
			return new String[]{null, null, "Cancelar"};
180 196
		}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Arco.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
40 44
				
41 45
				if ("cancel".equalsIgnoreCase(label)){
42 46
					previousStatus = status;
43
					status = 4;
47
					status = -1;
44 48
					
45 49
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
46 50
				}
......
58 62
				
59 63
				if ("cancel".equalsIgnoreCase(label)){
60 64
					previousStatus = status;
61
					status = 4;
65
					status = -1;
62 66
					
63 67
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
64 68
				}
......
69 73
				
70 74
				if ("cancel".equalsIgnoreCase(label)){
71 75
					previousStatus = status;
72
					status = 4;
76
					status = -1;
73 77
					
74 78
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
75 79
				}
76 80
				
77 81
				break;
78 82
		
79
			case 4:
80
				
81
				break;
82
		
83 83
		}
84 84
		
85 85
		return com.iver.fsac.Automaton.TRANSITION_FAILED;
......
95 95
	
96 96
	public boolean checkState(char c){
97 97
		
98
		if (status == -1){
99
			return "".indexOf(c) != -1;
100
		}
101
		
98 102
		if (status == 0){
99 103
			return "".indexOf(c) != -1;
100 104
		}
......
111 115
			return "".indexOf(c) != -1;
112 116
		}
113 117
		
114
		if (status == 4){
115
			return "".indexOf(c) != -1;
116
		}
117 118
		
118
		
119 119
		return false;
120 120
	}
121 121
	
122 122
	public String[] getCurrentTransitions(){
123 123
		
124
		if (status == -1){
125
			return new String[]{};
126
		}
127
		
124 128
		if (status == 0){
125 129
			return new String[]{"punto", "cancel"};
126 130
		}
......
137 141
			return new String[]{"cancel"};
138 142
		}
139 143
		
140
		if (status == 4){
141
			return new String[]{};
142
		}
143 144
		
144
		
145 145
		throw new RuntimeException("Bug!");
146 146
	}
147 147
	
148 148
	public String[] getCurrentTransitionDescriptions(){
149 149
		
150
		if (status == -1){
151
			return new String[]{};
152
		}
153
		
150 154
		if (status == 0){
151 155
			return new String[]{null, "Cancelar"};
152 156
		}
......
163 167
			return new String[]{"Cancelar"};
164 168
		}
165 169
		
166
		if (status == 4){
167
			return new String[]{};
168
		}
169 170
		
170
		
171 171
		throw new RuntimeException("Bug!");
172 172
	}
173 173
}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Poligono.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("numero".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
40 44
				
41 45
				if ("cancel".equalsIgnoreCase(label)){
42 46
					previousStatus = status;
43
					status = 4;
47
					status = -1;
44 48
					
45 49
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
46 50
				}
......
60 64
					previousStatus = status;
61 65
					status = 4;
62 66
					
63
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
67
					return com.iver.fsac.Automaton.TRANSITION_SUCCESS;
64 68
				}
65 69
				
66 70
				if ("cancel".equalsIgnoreCase(label)){
67 71
					previousStatus = status;
68
					status = 4;
72
					status = -1;
69 73
					
70 74
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
71 75
				}
......
76 80
				
77 81
				if ("cancel".equalsIgnoreCase(label)){
78 82
					previousStatus = status;
79
					status = 4;
83
					status = -1;
80 84
					
81 85
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
82 86
				}
......
87 91
				
88 92
				if ("cancel".equalsIgnoreCase(label)){
89 93
					previousStatus = status;
90
					status = 4;
94
					status = -1;
91 95
					
92 96
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
93 97
				}
......
109 113
	
110 114
	public boolean checkState(char c){
111 115
		
116
		if (status == -1){
117
			return "".indexOf(c) != -1;
118
		}
119
		
112 120
		if (status == 0){
113 121
			return "".indexOf(c) != -1;
114 122
		}
......
135 143
	
136 144
	public String[] getCurrentTransitions(){
137 145
		
146
		if (status == -1){
147
			return new String[]{};
148
		}
149
		
138 150
		if (status == 0){
139 151
			return new String[]{"numero", "cancel"};
140 152
		}
......
161 173
	
162 174
	public String[] getCurrentTransitionDescriptions(){
163 175
		
176
		if (status == -1){
177
			return new String[]{};
178
		}
179
		
164 180
		if (status == 0){
165 181
			return new String[]{null, null};
166 182
		}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Linea.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
47 51
				
48 52
				if ("cancel".equalsIgnoreCase(label)){
49 53
					previousStatus = status;
50
					status = 4;
54
					status = -1;
51 55
					
52 56
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
53 57
				}
......
67 71
					previousStatus = status;
68 72
					status = 4;
69 73
					
70
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
74
					return com.iver.fsac.Automaton.TRANSITION_SUCCESS;
71 75
				}
72 76
				
73 77
				if ("cancel".equalsIgnoreCase(label)){
74 78
					previousStatus = status;
75
					status = 4;
79
					status = -1;
76 80
					
77 81
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
78 82
				}
......
90 94
				
91 95
				if ("cancel".equalsIgnoreCase(label)){
92 96
					previousStatus = status;
93
					status = 4;
97
					status = -1;
94 98
					
95 99
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
96 100
				}
......
108 112
				
109 113
				if ("cancel".equalsIgnoreCase(label)){
110 114
					previousStatus = status;
111
					status = 4;
115
					status = -1;
112 116
					
113 117
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
114 118
				}
......
133 137
				
134 138
				if ("cancel".equalsIgnoreCase(label)){
135 139
					previousStatus = status;
136
					status = 4;
140
					status = -1;
137 141
					
138 142
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
139 143
				}
......
155 159
	
156 160
	public boolean checkState(char c){
157 161
		
162
		if (status == -1){
163
			return "".indexOf(c) != -1;
164
		}
165
		
158 166
		if (status == 0){
159 167
			return "".indexOf(c) != -1;
160 168
		}
......
185 193
	
186 194
	public String[] getCurrentTransitions(){
187 195
		
196
		if (status == -1){
197
			return new String[]{};
198
		}
199
		
188 200
		if (status == 0){
189 201
			return new String[]{"punto", "cancel"};
190 202
		}
......
215 227
	
216 228
	public String[] getCurrentTransitionDescriptions(){
217 229
		
230
		if (status == -1){
231
			return new String[]{};
232
		}
233
		
218 234
		if (status == 0){
219 235
			return new String[]{null, "Cancelar"};
220 236
		}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Spline.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
47 51
				
48 52
				if ("cancel".equalsIgnoreCase(label)){
49 53
					previousStatus = status;
50
					status = 4;
54
					status = -1;
51 55
					
52 56
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
53 57
				}
......
58 62
				
59 63
				if ("cancel".equalsIgnoreCase(label)){
60 64
					previousStatus = status;
61
					status = 4;
65
					status = -1;
62 66
					
63 67
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
64 68
				}
65 69
				
66 70
				break;
67 71
		
68
			case 4:
69
				
70
				break;
71
		
72 72
		}
73 73
		
74 74
		return com.iver.fsac.Automaton.TRANSITION_FAILED;
......
84 84
	
85 85
	public boolean checkState(char c){
86 86
		
87
		if (status == -1){
88
			return "".indexOf(c) != -1;
89
		}
90
		
87 91
		if (status == 0){
88 92
			return "".indexOf(c) != -1;
89 93
		}
......
96 100
			return "".indexOf(c) != -1;
97 101
		}
98 102
		
99
		if (status == 4){
100
			return "".indexOf(c) != -1;
101
		}
102 103
		
103
		
104 104
		return false;
105 105
	}
106 106
	
107 107
	public String[] getCurrentTransitions(){
108 108
		
109
		if (status == -1){
110
			return new String[]{};
111
		}
112
		
109 113
		if (status == 0){
110 114
			return new String[]{"punto", "cancel"};
111 115
		}
......
118 122
			return new String[]{"cancel"};
119 123
		}
120 124
		
121
		if (status == 4){
122
			return new String[]{};
123
		}
124 125
		
125
		
126 126
		throw new RuntimeException("Bug!");
127 127
	}
128 128
	
129 129
	public String[] getCurrentTransitionDescriptions(){
130 130
		
131
		if (status == -1){
132
			return new String[]{};
133
		}
134
		
131 135
		if (status == 0){
132 136
			return new String[]{null, null};
133 137
		}
......
140 144
			return new String[]{null};
141 145
		}
142 146
		
143
		if (status == 4){
144
			return new String[]{};
145
		}
146 147
		
147
		
148 148
		throw new RuntimeException("Bug!");
149 149
	}
150 150
}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Unir_partir.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
40 44
				
41 45
				if ("cancel".equalsIgnoreCase(label)){
42 46
					previousStatus = status;
43
					status = 4;
47
					status = -1;
44 48
					
45 49
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
46 50
				}
......
51 55
				
52 56
				if ("cancel".equalsIgnoreCase(label)){
53 57
					previousStatus = status;
54
					status = 4;
58
					status = -1;
55 59
					
56 60
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
57 61
				}
58 62
				
59 63
				break;
60 64
		
61
			case 4:
62
				
63
				break;
64
		
65 65
		}
66 66
		
67 67
		return com.iver.fsac.Automaton.TRANSITION_FAILED;
......
77 77
	
78 78
	public boolean checkState(char c){
79 79
		
80
		if (status == -1){
81
			return "".indexOf(c) != -1;
82
		}
83
		
80 84
		if (status == 0){
81 85
			return "".indexOf(c) != -1;
82 86
		}
......
89 93
			return "".indexOf(c) != -1;
90 94
		}
91 95
		
92
		if (status == 4){
93
			return "".indexOf(c) != -1;
94
		}
95 96
		
96
		
97 97
		return false;
98 98
	}
99 99
	
100 100
	public String[] getCurrentTransitions(){
101 101
		
102
		if (status == -1){
103
			return new String[]{};
104
		}
105
		
102 106
		if (status == 0){
103 107
			return new String[]{"punto", "cancel"};
104 108
		}
......
111 115
			return new String[]{"cancel"};
112 116
		}
113 117
		
114
		if (status == 4){
115
			return new String[]{};
116
		}
117 118
		
118
		
119 119
		throw new RuntimeException("Bug!");
120 120
	}
121 121
	
122 122
	public String[] getCurrentTransitionDescriptions(){
123 123
		
124
		if (status == -1){
125
			return new String[]{};
126
		}
127
		
124 128
		if (status == 0){
125 129
			return new String[]{null, null};
126 130
		}
......
133 137
			return new String[]{null};
134 138
		}
135 139
		
136
		if (status == 4){
137
			return new String[]{};
138
		}
139 140
		
140
		
141 141
		throw new RuntimeException("Bug!");
142 142
	}
143 143
}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Explotar.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
47 51
				
48 52
				if ("cancel".equalsIgnoreCase(label)){
49 53
					previousStatus = status;
50
					status = 4;
54
					status = -1;
51 55
					
52 56
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
53 57
				}
......
58 62
				
59 63
				if ("cancel".equalsIgnoreCase(label)){
60 64
					previousStatus = status;
61
					status = 4;
65
					status = -1;
62 66
					
63 67
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
64 68
				}
65 69
				
66 70
				break;
67 71
		
68
			case 4:
69
				
70
				break;
71
		
72 72
		}
73 73
		
74 74
		return com.iver.fsac.Automaton.TRANSITION_FAILED;
......
84 84
	
85 85
	public boolean checkState(char c){
86 86
		
87
		if (status == -1){
88
			return "".indexOf(c) != -1;
89
		}
90
		
87 91
		if (status == 0){
88 92
			return "".indexOf(c) != -1;
89 93
		}
......
96 100
			return "".indexOf(c) != -1;
97 101
		}
98 102
		
99
		if (status == 4){
100
			return "".indexOf(c) != -1;
101
		}
102 103
		
103
		
104 104
		return false;
105 105
	}
106 106
	
107 107
	public String[] getCurrentTransitions(){
108 108
		
109
		if (status == -1){
110
			return new String[]{};
111
		}
112
		
109 113
		if (status == 0){
110 114
			return new String[]{"punto", "cancel"};
111 115
		}
......
118 122
			return new String[]{"cancel"};
119 123
		}
120 124
		
121
		if (status == 4){
122
			return new String[]{};
123
		}
124 125
		
125
		
126 126
		throw new RuntimeException("Bug!");
127 127
	}
128 128
	
129 129
	public String[] getCurrentTransitionDescriptions(){
130 130
		
131
		if (status == -1){
132
			return new String[]{};
133
		}
134
		
131 135
		if (status == 0){
132 136
			return new String[]{null, "Cancelar"};
133 137
		}
......
140 144
			return new String[]{"Cancelar"};
141 145
		}
142 146
		
143
		if (status == 4){
144
			return new String[]{};
145
		}
146 147
		
147
		
148 148
		throw new RuntimeException("Bug!");
149 149
	}
150 150
}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Circulo.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
47 51
				
48 52
				if ("cancel".equalsIgnoreCase(label)){
49 53
					previousStatus = status;
50
					status = 4;
54
					status = -1;
51 55
					
52 56
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
53 57
				}
......
58 62
				
59 63
				if ("cancel".equalsIgnoreCase(label)){
60 64
					previousStatus = status;
61
					status = 4;
65
					status = -1;
62 66
					
63 67
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
64 68
				}
......
69 73
				
70 74
				if ("cancel".equalsIgnoreCase(label)){
71 75
					previousStatus = status;
72
					status = 4;
76
					status = -1;
73 77
					
74 78
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
75 79
				}
76 80
				
77 81
				break;
78 82
		
79
			case 4:
80
				
81
				break;
82
		
83 83
		}
84 84
		
85 85
		return com.iver.fsac.Automaton.TRANSITION_FAILED;
......
95 95
	
96 96
	public boolean checkState(char c){
97 97
		
98
		if (status == -1){
99
			return "".indexOf(c) != -1;
100
		}
101
		
98 102
		if (status == 0){
99 103
			return "".indexOf(c) != -1;
100 104
		}
......
111 115
			return "".indexOf(c) != -1;
112 116
		}
113 117
		
114
		if (status == 4){
115
			return "".indexOf(c) != -1;
116
		}
117 118
		
118
		
119 119
		return false;
120 120
	}
121 121
	
122 122
	public String[] getCurrentTransitions(){
123 123
		
124
		if (status == -1){
125
			return new String[]{};
126
		}
127
		
124 128
		if (status == 0){
125 129
			return new String[]{"punto", "cancel"};
126 130
		}
......
137 141
			return new String[]{"cancel"};
138 142
		}
139 143
		
140
		if (status == 4){
141
			return new String[]{};
142
		}
143 144
		
144
		
145 145
		throw new RuntimeException("Bug!");
146 146
	}
147 147
	
148 148
	public String[] getCurrentTransitionDescriptions(){
149 149
		
150
		if (status == -1){
151
			return new String[]{};
152
		}
153
		
150 154
		if (status == 0){
151 155
			return new String[]{null, "Cancelar"};
152 156
		}
......
163 167
			return new String[]{"Cancelar"};
164 168
		}
165 169
		
166
		if (status == 4){
167
			return new String[]{};
168
		}
169 170
		
170
		
171 171
		throw new RuntimeException("Bug!");
172 172
	}
173 173
}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Rectangulo.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
47 51
				
48 52
				if ("cancel".equalsIgnoreCase(label)){
49 53
					previousStatus = status;
50
					status = 4;
54
					status = -1;
51 55
					
52 56
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
53 57
				}
......
60 64
					previousStatus = status;
61 65
					status = 4;
62 66
					
63
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
67
					return com.iver.fsac.Automaton.TRANSITION_SUCCESS;
64 68
				}
65 69
				
66 70
				if ("cancel".equalsIgnoreCase(label)){
67 71
					previousStatus = status;
68
					status = 4;
72
					status = -1;
69 73
					
70 74
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
71 75
				}
......
76 80
				
77 81
				if ("cancel".equalsIgnoreCase(label)){
78 82
					previousStatus = status;
79
					status = 4;
83
					status = -1;
80 84
					
81 85
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
82 86
				}
......
87 91
				
88 92
				if ("cancel".equalsIgnoreCase(label)){
89 93
					previousStatus = status;
90
					status = 4;
94
					status = -1;
91 95
					
92 96
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
93 97
				}
......
109 113
	
110 114
	public boolean checkState(char c){
111 115
		
116
		if (status == -1){
117
			return "".indexOf(c) != -1;
118
		}
119
		
112 120
		if (status == 0){
113 121
			return "".indexOf(c) != -1;
114 122
		}
......
135 143
	
136 144
	public String[] getCurrentTransitions(){
137 145
		
146
		if (status == -1){
147
			return new String[]{};
148
		}
149
		
138 150
		if (status == 0){
139 151
			return new String[]{"punto", "cancel"};
140 152
		}
......
161 173
	
162 174
	public String[] getCurrentTransitionDescriptions(){
163 175
		
176
		if (status == -1){
177
			return new String[]{};
178
		}
179
		
164 180
		if (status == 0){
165 181
			return new String[]{null, null};
166 182
		}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Seleccion.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
40 44
				
41 45
				if ("cancel".equalsIgnoreCase(label)){
42 46
					previousStatus = status;
43
					status = 4;
47
					status = -1;
44 48
					
45 49
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
46 50
				}
......
51 55
				
52 56
				if ("cancel".equalsIgnoreCase(label)){
53 57
					previousStatus = status;
54
					status = 4;
58
					status = -1;
55 59
					
56 60
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
57 61
				}
58 62
				
59 63
				break;
60 64
		
61
			case 4:
62
				
63
				break;
64
		
65 65
		}
66 66
		
67 67
		return com.iver.fsac.Automaton.TRANSITION_FAILED;
......
77 77
	
78 78
	public boolean checkState(char c){
79 79
		
80
		if (status == -1){
81
			return "".indexOf(c) != -1;
82
		}
83
		
80 84
		if (status == 0){
81 85
			return "".indexOf(c) != -1;
82 86
		}
......
89 93
			return "".indexOf(c) != -1;
90 94
		}
91 95
		
92
		if (status == 4){
93
			return "".indexOf(c) != -1;
94
		}
95 96
		
96
		
97 97
		return false;
98 98
	}
99 99
	
100 100
	public String[] getCurrentTransitions(){
101 101
		
102
		if (status == -1){
103
			return new String[]{};
104
		}
105
		
102 106
		if (status == 0){
103 107
			return new String[]{"punto", "cancel"};
104 108
		}
......
111 115
			return new String[]{"cancel"};
112 116
		}
113 117
		
114
		if (status == 4){
115
			return new String[]{};
116
		}
117 118
		
118
		
119 119
		throw new RuntimeException("Bug!");
120 120
	}
121 121
	
122 122
	public String[] getCurrentTransitionDescriptions(){
123 123
		
124
		if (status == -1){
125
			return new String[]{};
126
		}
127
		
124 128
		if (status == 0){
125 129
			return new String[]{null, null};
126 130
		}
......
133 137
			return new String[]{null};
134 138
		}
135 139
		
136
		if (status == 4){
137
			return new String[]{};
138
		}
139 140
		
140
		
141 141
		throw new RuntimeException("Bug!");
142 142
	}
143 143
}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Girar.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
47 51
				
48 52
				if ("cancel".equalsIgnoreCase(label)){
49 53
					previousStatus = status;
50
					status = 4;
54
					status = -1;
51 55
					
52 56
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
53 57
				}
......
58 62
				
59 63
				if ("cancel".equalsIgnoreCase(label)){
60 64
					previousStatus = status;
61
					status = 4;
65
					status = -1;
62 66
					
63 67
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
64 68
				}
......
69 73
				
70 74
				if ("cancel".equalsIgnoreCase(label)){
71 75
					previousStatus = status;
72
					status = 4;
76
					status = -1;
73 77
					
74 78
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
75 79
				}
76 80
				
77 81
				break;
78 82
		
79
			case 4:
80
				
81
				break;
82
		
83 83
		}
84 84
		
85 85
		return com.iver.fsac.Automaton.TRANSITION_FAILED;
......
95 95
	
96 96
	public boolean checkState(char c){
97 97
		
98
		if (status == -1){
99
			return "".indexOf(c) != -1;
100
		}
101
		
98 102
		if (status == 0){
99 103
			return "".indexOf(c) != -1;
100 104
		}
......
111 115
			return "".indexOf(c) != -1;
112 116
		}
113 117
		
114
		if (status == 4){
115
			return "".indexOf(c) != -1;
116
		}
117 118
		
118
		
119 119
		return false;
120 120
	}
121 121
	
122 122
	public String[] getCurrentTransitions(){
123 123
		
124
		if (status == -1){
125
			return new String[]{};
126
		}
127
		
124 128
		if (status == 0){
125 129
			return new String[]{"punto", "cancel"};
126 130
		}
......
137 141
			return new String[]{"cancel"};
138 142
		}
139 143
		
140
		if (status == 4){
141
			return new String[]{};
142
		}
143 144
		
144
		
145 145
		throw new RuntimeException("Bug!");
146 146
	}
147 147
	
148 148
	public String[] getCurrentTransitionDescriptions(){
149 149
		
150
		if (status == -1){
151
			return new String[]{};
152
		}
153
		
150 154
		if (status == 0){
151 155
			return new String[]{null, "Cancelar"};
152 156
		}
......
163 167
			return new String[]{"Cancelar"};
164 168
		}
165 169
		
166
		if (status == 4){
167
			return new String[]{};
168
		}
169 170
		
170
		
171 171
		throw new RuntimeException("Bug!");
172 172
	}
173 173
}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Punto.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
40 44
				
41 45
				if ("cancel".equalsIgnoreCase(label)){
42 46
					previousStatus = status;
43
					status = 4;
47
					status = -1;
44 48
					
45 49
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
46 50
				}
47 51
				
48 52
				break;
49 53
		
50
			case 4:
51
				
52
				break;
53
		
54 54
		}
55 55
		
56 56
		return com.iver.fsac.Automaton.TRANSITION_FAILED;
......
66 66
	
67 67
	public boolean checkState(char c){
68 68
		
69
		if (status == -1){
70
			return "".indexOf(c) != -1;
71
		}
72
		
69 73
		if (status == 0){
70 74
			return "".indexOf(c) != -1;
71 75
		}
......
74 78
			return "c".indexOf(c) != -1;
75 79
		}
76 80
		
77
		if (status == 4){
78
			return "".indexOf(c) != -1;
79
		}
80 81
		
81
		
82 82
		return false;
83 83
	}
84 84
	
85 85
	public String[] getCurrentTransitions(){
86 86
		
87
		if (status == -1){
88
			return new String[]{};
89
		}
90
		
87 91
		if (status == 0){
88 92
			return new String[]{"punto", "cancel"};
89 93
		}
......
92 96
			return new String[]{"punto", "cancel"};
93 97
		}
94 98
		
95
		if (status == 4){
96
			return new String[]{};
97
		}
98 99
		
99
		
100 100
		throw new RuntimeException("Bug!");
101 101
	}
102 102
	
103 103
	public String[] getCurrentTransitionDescriptions(){
104 104
		
105
		if (status == -1){
106
			return new String[]{};
107
		}
108
		
105 109
		if (status == 0){
106 110
			return new String[]{null, null};
107 111
		}
......
110 114
			return new String[]{null, null};
111 115
		}
112 116
		
113
		if (status == 4){
114
			return new String[]{};
115
		}
116 117
		
117
		
118 118
		throw new RuntimeException("Bug!");
119 119
	}
120 120
}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Alargar.java
11 11
	public int transition(String label){
12 12
		switch (status){
13 13
		
14
			case -1:
15
				
16
				break;
17
		
14 18
			case 0:
15 19
				
16 20
				if ("punto".equalsIgnoreCase(label)){
......
22 26
				
23 27
				if ("cancel".equalsIgnoreCase(label)){
24 28
					previousStatus = status;
25
					status = 4;
29
					status = -1;
26 30
					
27 31
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
28 32
				}
......
47 51
				
48 52
				if ("cancel".equalsIgnoreCase(label)){
49 53
					previousStatus = status;
50
					status = 4;
54
					status = -1;
51 55
					
52 56
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
53 57
				}
......
65 69
				
66 70
				if ("cancel".equalsIgnoreCase(label)){
67 71
					previousStatus = status;
68
					status = 4;
72
					status = -1;
69 73
					
70 74
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
71 75
				}
......
83 87
				
84 88
				if ("cancel".equalsIgnoreCase(label)){
85 89
					previousStatus = status;
86
					status = 4;
90
					status = -1;
87 91
					
88 92
					return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
89 93
				}
90 94
				
91 95
				break;
92 96
		
93
			case 4:
94
				
95
				break;
96
		
97 97
		}
98 98
		
99 99
		return com.iver.fsac.Automaton.TRANSITION_FAILED;
......
109 109
	
110 110
	public boolean checkState(char c){
111 111
		
112
		if (status == -1){
113
			return "".indexOf(c) != -1;
114
		}
115
		
112 116
		if (status == 0){
113 117
			return "".indexOf(c) != -1;
114 118
		}
......
125 129
			return "".indexOf(c) != -1;
126 130
		}
127 131
		
128
		if (status == 4){
129
			return "".indexOf(c) != -1;
130
		}
131 132
		
132
		
133 133
		return false;
134 134
	}
135 135
	
136 136
	public String[] getCurrentTransitions(){
137 137
		
138
		if (status == -1){
139
			return new String[]{};
140
		}
141
		
138 142
		if (status == 0){
139 143
			return new String[]{"punto", "cancel"};
140 144
		}
......
151 155
			return new String[]{"punto", "cancel"};
152 156
		}
153 157
		
154
		if (status == 4){
155
			return new String[]{};
156
		}
157 158
		
158
		
159 159
		throw new RuntimeException("Bug!");
160 160
	}
161 161
	
162 162
	public String[] getCurrentTransitionDescriptions(){
163 163
		
164
		if (status == -1){
165
			return new String[]{};
166
		}
167
		
164 168
		if (status == 0){
165 169
			return new String[]{null, "Cancelar"};
166 170
		}
......
177 181
			return new String[]{null, "Cancelar"};
178 182
		}
179 183
		
180
		if (status == 4){
181
			return new String[]{};
182
		}
183 184
		
184
		
185 185
		throw new RuntimeException("Bug!");
186 186
	}
187 187
}
branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Estirar.java
11 11
	public int transition(String label){
12 12
		switch (status){
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff