Statistics
| Revision:

svn-gvsig-desktop / branches / pilotoDWG / libraries / libFMap / src / com / iver / cit / gvsig / fmap / edition / cad / cadTools / Circulo.java @ 1385

History | View | Annotate | Download (932 Bytes)

1
package com.iver.cit.gvsig.fmap.edition.cad.cadTools;
2

    
3
public class Circulo implements com.iver.fsac.Automaton{
4
        private int status = 0;
5

    
6
        public int transition(String label){
7
                switch (status){
8
                
9
                        case -1:
10
                                
11
                                break;
12
                
13
                        case 0:
14
                                
15
                                if ("punto".equalsIgnoreCase(label)){
16
                                        status = 1;
17
                                        
18
                                        return com.iver.fsac.Automaton.TRANSITION_SUCCESS;
19
                                }
20
                                
21
                                break;
22
                
23
                        case 1:
24
                                
25
                                if ("cancel".equalsIgnoreCase(label)){
26
                                        status = -1;
27
                                        
28
                                        return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
29
                                }
30
                                
31
                                if ("punto".equalsIgnoreCase(label)){
32
                                        status = -1;
33
                                        
34
                                        return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
35
                                }
36
                                
37
                                if ("numero".equalsIgnoreCase(label)){
38
                                        status = -1;
39
                                        
40
                                        return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
41
                                }
42
                                
43
                                break;
44
                
45
                }
46
                
47
                return com.iver.fsac.Automaton.TRANSITION_FAILED;
48
        }
49
        
50
        public int getStatus(){
51
                return status;
52
        }
53
}