Revision 1525 branches/pilotoDWG/applications/appgvSIG/src/com/iver/cit/gvsig/gui/cad/automaton/Seleccion.java
Seleccion.java | ||
---|---|---|
35 | 35 |
|
36 | 36 |
case 1: |
37 | 37 |
|
38 |
if ("punto".equalsIgnoreCase(label)){
|
|
38 |
if ("no_sel".equalsIgnoreCase(label)){
|
|
39 | 39 |
previousStatus = status; |
40 | 40 |
status = 2; |
41 | 41 |
|
42 | 42 |
return com.iver.fsac.Automaton.TRANSITION_SUCCESS; |
43 | 43 |
} |
44 | 44 |
|
45 |
if ("sel".equalsIgnoreCase(label)){ |
|
46 |
previousStatus = status; |
|
47 |
status = 0; |
|
48 |
|
|
49 |
return com.iver.fsac.Automaton.TRANSITION_SUCCESS; |
|
50 |
} |
|
51 |
|
|
52 |
if ("handler".equalsIgnoreCase(label)){ |
|
53 |
previousStatus = status; |
|
54 |
status = 4; |
|
55 |
|
|
56 |
return com.iver.fsac.Automaton.TRANSITION_SUCCESS; |
|
57 |
} |
|
58 |
|
|
45 | 59 |
if ("cancel".equalsIgnoreCase(label)){ |
46 | 60 |
previousStatus = status; |
47 | 61 |
status = -1; |
... | ... | |
53 | 67 |
|
54 | 68 |
case 2: |
55 | 69 |
|
70 |
if ("punto".equalsIgnoreCase(label)){ |
|
71 |
previousStatus = status; |
|
72 |
status = 3; |
|
73 |
|
|
74 |
return com.iver.fsac.Automaton.TRANSITION_SUCCESS; |
|
75 |
} |
|
76 |
|
|
56 | 77 |
if ("cancel".equalsIgnoreCase(label)){ |
57 | 78 |
previousStatus = status; |
58 | 79 |
status = -1; |
... | ... | |
62 | 83 |
|
63 | 84 |
break; |
64 | 85 |
|
86 |
case 3: |
|
87 |
|
|
88 |
if ("sel".equalsIgnoreCase(label)){ |
|
89 |
previousStatus = status; |
|
90 |
status = 0; |
|
91 |
|
|
92 |
return com.iver.fsac.Automaton.TRANSITION_SUCCESS; |
|
93 |
} |
|
94 |
|
|
95 |
if ("no_sel".equalsIgnoreCase(label)){ |
|
96 |
previousStatus = status; |
|
97 |
status = 0; |
|
98 |
|
|
99 |
return com.iver.fsac.Automaton.TRANSITION_SUCCESS; |
|
100 |
} |
|
101 |
|
|
102 |
if ("cancel".equalsIgnoreCase(label)){ |
|
103 |
previousStatus = status; |
|
104 |
status = -1; |
|
105 |
|
|
106 |
return com.iver.fsac.Automaton.AUTOMATON_FINISHED; |
|
107 |
} |
|
108 |
|
|
109 |
break; |
|
110 |
|
|
111 |
case 4: |
|
112 |
|
|
113 |
if ("punto".equalsIgnoreCase(label)){ |
|
114 |
previousStatus = status; |
|
115 |
status = 5; |
|
116 |
|
|
117 |
return com.iver.fsac.Automaton.TRANSITION_SUCCESS; |
|
118 |
} |
|
119 |
|
|
120 |
if ("cancel".equalsIgnoreCase(label)){ |
|
121 |
previousStatus = status; |
|
122 |
status = -1; |
|
123 |
|
|
124 |
return com.iver.fsac.Automaton.AUTOMATON_FINISHED; |
|
125 |
} |
|
126 |
|
|
127 |
break; |
|
128 |
|
|
129 |
case 5: |
|
130 |
|
|
131 |
if ("done".equalsIgnoreCase(label)){ |
|
132 |
previousStatus = status; |
|
133 |
status = 0; |
|
134 |
|
|
135 |
return com.iver.fsac.Automaton.TRANSITION_SUCCESS; |
|
136 |
} |
|
137 |
|
|
138 |
if ("cancel".equalsIgnoreCase(label)){ |
|
139 |
previousStatus = status; |
|
140 |
status = -1; |
|
141 |
|
|
142 |
return com.iver.fsac.Automaton.AUTOMATON_FINISHED; |
|
143 |
} |
|
144 |
|
|
145 |
break; |
|
146 |
|
|
65 | 147 |
} |
66 | 148 |
|
67 | 149 |
return com.iver.fsac.Automaton.TRANSITION_FAILED; |
... | ... | |
82 | 164 |
} |
83 | 165 |
|
84 | 166 |
if (status == 0){ |
85 |
return "".indexOf(c) != -1; |
|
167 |
return "c".indexOf(c) != -1;
|
|
86 | 168 |
} |
87 | 169 |
|
88 | 170 |
if (status == 1){ |
... | ... | |
93 | 175 |
return "".indexOf(c) != -1; |
94 | 176 |
} |
95 | 177 |
|
178 |
if (status == 3){ |
|
179 |
return "".indexOf(c) != -1; |
|
180 |
} |
|
96 | 181 |
|
182 |
if (status == 4){ |
|
183 |
return "".indexOf(c) != -1; |
|
184 |
} |
|
185 |
|
|
186 |
if (status == 5){ |
|
187 |
return "".indexOf(c) != -1; |
|
188 |
} |
|
189 |
|
|
190 |
|
|
97 | 191 |
return false; |
98 | 192 |
} |
99 | 193 |
|
... | ... | |
108 | 202 |
} |
109 | 203 |
|
110 | 204 |
if (status == 1){ |
111 |
return new String[]{"punto", "cancel"};
|
|
205 |
return new String[]{"no_sel", "sel", "handler", "cancel"};
|
|
112 | 206 |
} |
113 | 207 |
|
114 | 208 |
if (status == 2){ |
115 |
return new String[]{"cancel"}; |
|
209 |
return new String[]{"punto", "cancel"};
|
|
116 | 210 |
} |
117 | 211 |
|
212 |
if (status == 3){ |
|
213 |
return new String[]{"sel", "no_sel", "cancel"}; |
|
214 |
} |
|
118 | 215 |
|
216 |
if (status == 4){ |
|
217 |
return new String[]{"punto", "cancel"}; |
|
218 |
} |
|
219 |
|
|
220 |
if (status == 5){ |
|
221 |
return new String[]{"done", "cancel"}; |
|
222 |
} |
|
223 |
|
|
224 |
|
|
119 | 225 |
throw new RuntimeException("Bug!"); |
120 | 226 |
} |
121 | 227 |
|
... | ... | |
130 | 236 |
} |
131 | 237 |
|
132 | 238 |
if (status == 1){ |
133 |
return new String[]{null, "Cancelar"}; |
|
239 |
return new String[]{null, null, null, "Cancelar"};
|
|
134 | 240 |
} |
135 | 241 |
|
136 | 242 |
if (status == 2){ |
137 |
return new String[]{"Cancelar"}; |
|
243 |
return new String[]{null, "Cancelar"};
|
|
138 | 244 |
} |
139 | 245 |
|
246 |
if (status == 3){ |
|
247 |
return new String[]{null, null, "Cancelar"}; |
|
248 |
} |
|
140 | 249 |
|
250 |
if (status == 4){ |
|
251 |
return new String[]{null, "Cancelar"}; |
|
252 |
} |
|
253 |
|
|
254 |
if (status == 5){ |
|
255 |
return new String[]{null, "Cancelar"}; |
|
256 |
} |
|
257 |
|
|
258 |
|
|
141 | 259 |
throw new RuntimeException("Bug!"); |
142 | 260 |
} |
143 | 261 |
} |
Also available in: Unified diff