Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1292 Rev 2457
Line 27... Line 27...
27
import com.gwtext.client.widgets.grid.ColumnConfig;
27
import com.gwtext.client.widgets.grid.ColumnConfig;
28
import com.gwtext.client.widgets.grid.ColumnModel;
28
import com.gwtext.client.widgets.grid.ColumnModel;
29
import com.gwtext.client.widgets.grid.GridDragData;
29
import com.gwtext.client.widgets.grid.GridDragData;
30
import com.gwtext.client.widgets.grid.GridPanel;
30
import com.gwtext.client.widgets.grid.GridPanel;
31
import com.gwtext.client.widgets.grid.Renderer;
31
import com.gwtext.client.widgets.grid.Renderer;
-
 
32
import com.gwtext.client.widgets.grid.RowSelectionModel;
32
import com.gwtext.client.widgets.grid.event.GridListenerAdapter;
33
import com.gwtext.client.widgets.grid.event.GridListenerAdapter;
-
 
34
import com.gwtext.client.widgets.grid.event.RowSelectionListenerAdapter;
33
import com.gwtext.client.widgets.menu.BaseItem;
35
import com.gwtext.client.widgets.menu.BaseItem;
34
import com.gwtext.client.widgets.menu.Item;
36
import com.gwtext.client.widgets.menu.Item;
35
import com.gwtext.client.widgets.menu.Menu;
37
import com.gwtext.client.widgets.menu.Menu;
36
import com.gwtext.client.widgets.menu.event.MenuListenerAdapter;
38
import com.gwtext.client.widgets.menu.event.MenuListenerAdapter;
37
import com.gwtext.client.core.EventObject;
39
import com.gwtext.client.core.EventObject;
Line 185... Line 187...
185
        store.load();       
187
        store.load();       
186
		setStore(store) ;
188
		setStore(store) ;
Line 187... Line 189...
187
		
189
		
Line 188... Line 190...
188
		setBottomToolbar(pgBar) ;
190
		setBottomToolbar(pgBar) ;
189
		
191
		
190
		Object[][] mode = {{"toutes les observations",false} , {"observations liées", true} };
192
		Object[][] mode = {{"toutes les observations",false} , {"observation liée", true} };
191
		storeMode = new SimpleStore(new String[] { "nom_mode", "mode" },
193
		storeMode = new SimpleStore(new String[] { "nom_mode", "mode" },
192
				mode);
194
				mode);
193
		storeMode.load();
195
		storeMode.load();
Line 220... Line 222...
220
		
222
		
221
		setAutoScroll(true) ;
223
		setAutoScroll(true) ;
222
		// on configure le drag 'n drop
224
		// on configure le drag 'n drop
Line -... Line 225...
-
 
225
		configDragAndDrop() ;
223
		configDragAndDrop() ;
226
		
Line 224... Line 227...
224
		
227
		
225
		this.addGridListener(new GridListenerAdapter() {
228
		this.addGridListener(new GridListenerAdapter() {
Line 240... Line 243...
240
				
243
				
Line 241... Line 244...
241
			}
244
			}
Line -... Line 245...
-
 
245
			
-
 
246
		}) ;
-
 
247
		
-
 
248
		// TODO: voir s'il existe un autre moyen de désactiver la multiselection
-
 
249
		// ça semble bien compliqué de faire comme ça
-
 
250
		getSelectionModel().addListener(new RowSelectionListenerAdapter() {		
-
 
251
			@Override
-
 
252
			public boolean doBeforeRowSelect(RowSelectionModel sm, int rowIndex,
-
 
253
					boolean keepExisting, Record record) {
-
 
254
				sm.clearSelections();
-
 
255
				return true;
242
			
256
			}
243
		}) ;
257
		});
Line 244... Line 258...
244
		
258
		
245
		obtenirNombreMiniListeObservations();
259
		obtenirNombreMiniListeObservations();
246
	}
260
	}
247
	
261
	
248
	/**
262
	/**
249
	 * Configure le drag 'n drop pour la liste
263
	 * Configure le drag 'n drop pour la liste
250
	 */
264
	 */
Line 251... Line 265...
251
	private void configDragAndDrop()
265
	private void configDragAndDrop()
252
	{
266
	{
Line 253... Line 267...
253
		// on choisit le texte qui sera affiché lors d'un drag 'n drop
267
		// on choisit le texte qui sera affiché lors d'un drag 'n drop