Subversion Repositories eFlore/Applications.coel

Rev

Rev 353 | Rev 377 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 353 Rev 361
Line 77... Line 77...
77
			}  
77
			}  
78
		});
78
		});
79
		supprimer.setIconStyle(ComposantClass.ICONE_SUPPRIMER);
79
		supprimer.setIconStyle(ComposantClass.ICONE_SUPPRIMER);
80
		toolBar.add(supprimer);
80
		toolBar.add(supprimer);
Line 81... Line -...
81
		
-
 
82
		
81
		
Line 83... Line -...
83
		setTopComponent(toolBar);
-
 
84
		
-
 
85
		
82
		setTopComponent(toolBar);
Line 86... Line 83...
86
 
83
		
87
		List<TableColumn> columns = new ArrayList<TableColumn>();
84
		List<TableColumn> columns = new ArrayList<TableColumn>();
88
		
85
		
Line 97... Line 94...
97
		
94
		
98
		table = new Table(cm);
95
		table = new Table(cm);
99
		table.setSelectionMode(SelectionMode.MULTI);
96
		table.setSelectionMode(SelectionMode.MULTI);
Line 100... Line -...
100
		table.setBorders(false);
-
 
101
		
97
		table.setBorders(false);
Line 102... Line -...
102
		
-
 
103
		table.setHorizontalScroll(true);
98
		
Line 104... Line 99...
104
		
99
		table.setHorizontalScroll(true);
Line 105... Line 100...
105
		
100
		
106
		add(table);
101
		add(table);
Line 107... Line -...
107
 
-
 
108
		store = new ListStore<Personne>();
102
 
109
 
103
		store = new ListStore<Personne>();
110
		binder = new TableBinder<Personne>(table, store);
104
 
111
		binder.setAutoSelect(true);
105
		binder = new TableBinder<Personne>(table, store);
112
		
106
		binder.setAutoSelect(true);
113
		
107
		
114
		binder.addSelectionChangedListener(new SelectionChangedListener<Personne>() {
108
		binder.addSelectionChangedListener(new SelectionChangedListener<Personne>() {
Line 115... Line -...
115
		public void selectionChanged(SelectionChangedEvent<Personne> event) {
-
 
116
				Personne p = (Personne) event.getSelectedItem();
109
		public void selectionChanged(SelectionChangedEvent<Personne> event) {
117
				personneSelectionnee = p;
-
 
118
				clicListe(p);
-
 
119
			}
-
 
120
		});
-
 
121
		
-
 
122
		
-
 
123
		setLayout(new FitLayout());
-
 
124
		
-
 
125
	}
-
 
126
 
110
				Personne p = (Personne) event.getSelectedItem();
Line 127... Line 111...
127
	public ListStore<Personne> getStore() {
111
				personneSelectionnee = p;
128
		return store;
112
				clicListe(p);
129
	}
113
			}
Line 147... Line 131...
147
			}
131
			}
Line 148... Line 132...
148
			
132
			
149
			store.removeAll();
133
			store.removeAll();
Line 150... Line 134...
150
			store.add(liste);
134
			store.add(liste);
-
 
135
 
-
 
136
			if (listePersonnes.size() > 0) {
Line -... Line 137...
-
 
137
				table.getSelectionModel().select(0);
151
 
138
			}
152
			// Mise à jour du panneau central
-
 
153
			
-
 
154
			((LayoutContainer) Registry.get(RegistreId.PANNEAU_CENTRE)).layout();
139
			
155
			
-
 
156
			
140
			// Mise à jour du panneau central
157
		} else if (nouvellesDonnees instanceof Information)	{
141
			((LayoutContainer) Registry.get(RegistreId.PANNEAU_CENTRE)).layout();
158
			
-
 
159
			Information info = (Information) nouvellesDonnees;
-
 
160
			Info.display("Erreur", info.getMessages().toString());
142
		} else if (nouvellesDonnees instanceof Information)	{
161
			
143
			Information info = (Information) nouvellesDonnees;
162
			
144
			Info.display("Erreur", info.getMessages().toString());
163
		}else {
145
		} else {
164
			GWT.log("Pas de correspondance" + nouvellesDonnees.getClass() + " dans la méthode rafraichir() de la classe "+this.getClass(), null);
146
			GWT.log("Pas de correspondance" + nouvellesDonnees.getClass() + " dans la méthode rafraichir() de la classe "+this.getClass(), null);
165
		}
147
		}