Statistics
| Revision:

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

History | View | Annotate | Download (929 Bytes)

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

    
3
public class punto 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 = 1;
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
                }
46
                
47
                return com.iver.fsac.Automaton.TRANSITION_FAILED;
48
        }
49
        
50
        public int getStatus(){
51
                return status;
52
        }
53
}