Statistics
| Revision:

root / branches / pilotoDWG / libraries / libFMap / src / com / iver / cit / gvsig / fmap / edition / cad / cadTools / copiar.java @ 1360

History | View | Annotate | Download (1.07 KB)

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

    
3
public class copiar 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 (label.equalsIgnoreCase("punto")){
16
                                        status = 1;
17
                                        
18
                                        return com.iver.fsac.Automaton.TRANSITION_SUCCESS;
19
                                }
20
                                
21
                                if (label.equalsIgnoreCase("cancel")){
22
                                        status = -1;
23
                                        
24
                                        return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
25
                                }
26
                                
27
                                break;
28
                
29
                        case 1:
30
                                
31
                                if (label.equalsIgnoreCase("punto")){
32
                                        status = 2;
33
                                        
34
                                        return com.iver.fsac.Automaton.TRANSITION_SUCCESS;
35
                                }
36
                                
37
                                if (label.equalsIgnoreCase("cancel")){
38
                                        status = -1;
39
                                        
40
                                        return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
41
                                }
42
                                
43
                                break;
44
                
45
                        case 2:
46
                                
47
                                if (label.equalsIgnoreCase("cancel")){
48
                                        status = -1;
49
                                        
50
                                        return com.iver.fsac.Automaton.AUTOMATON_FINISHED;
51
                                }
52
                                
53
                                break;
54
                
55
                }
56
                
57
                return com.iver.fsac.Automaton.TRANSITION_FAILED;
58
        }
59
        
60
        public int getStatus(){
61
                return status;
62
        }
63
}