Biblioteca Java - Blame information for rev 3

Subversion Repositories:
Rev:
Rev Author Line No. Line
3 mihai 1 /*
2  * To change this license header, choose License Headers in Project Properties.
3  * To change this template file, choose Tools | Templates
4  * and open the template in the editor.
5  */
6 package designpatterns.mvc.gara;
7  
8 import java.util.Observable;
9  
10 /**
11  *
12  * @author evo2
13  */
14 public class Gara extends Observable{
15  
16     public static final int EVENIMENT_SEMAFOR_SCHIMBAT = 0;
17     public static final int EVENIMENT_SOSESTE_TREN = 1;
18  
19     private String linia1;
20     private boolean semafor;
21  
22     void setTrenLinia1(String tren){
23         linia1 = tren;
24         this.setChanged();
25         this.notifyObservers(EVENIMENT_SOSESTE_TREN);        
26     }
27  
28     void setSemafor(boolean s){
29         semafor = s;
30  
31         //notitifca view-ul ca s-a schimbat starea semaforului
32         this.setChanged();
33         this.notifyObservers(EVENIMENT_SEMAFOR_SCHIMBAT); //transmite catre view un parametru suplimentar pentru a informa
34     }
35  
36     boolean getSemafor(){      
37         return semafor;
38     }
39  
40     String getLinia1() {
41        return linia1;
42     }
43 }