Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1600 Rev 1601
Line 45... Line 45...
45
import com.gwtext.client.widgets.grid.CellMetadata;
45
import com.gwtext.client.widgets.grid.CellMetadata;
46
import com.gwtext.client.widgets.grid.ColumnConfig;
46
import com.gwtext.client.widgets.grid.ColumnConfig;
47
import com.gwtext.client.widgets.grid.ColumnModel;
47
import com.gwtext.client.widgets.grid.ColumnModel;
48
import com.gwtext.client.widgets.grid.GridPanel;
48
import com.gwtext.client.widgets.grid.GridPanel;
49
import com.gwtext.client.widgets.grid.Renderer;
49
import com.gwtext.client.widgets.grid.Renderer;
-
 
50
import com.gwtext.client.widgets.grid.event.GridHeaderListenerAdapter;
50
import com.gwtext.client.widgets.grid.event.GridListenerAdapter;
51
import com.gwtext.client.widgets.grid.event.GridListenerAdapter;
51
import com.gwtext.client.widgets.grid.event.GridRowListenerAdapter;
52
import com.gwtext.client.widgets.grid.event.GridRowListenerAdapter;
52
import com.gwtext.client.widgets.tree.TreeDragData;
53
import com.gwtext.client.widgets.tree.TreeDragData;
53
import com.gwtext.client.widgets.tree.TreeNode;
54
import com.gwtext.client.widgets.tree.TreeNode;
Line 122... Line 123...
122
 
123
 
Line 123... Line 124...
123
	private SortDir directionTri;
124
	private SortDir directionTri;
Line -... Line 125...
-
 
125
 
-
 
126
	private String champTri;
124
 
127
	
125
	private String champTri;
128
	private boolean triActif;
126
	
129
	
127
	/**
130
	/**
128
	 * Constructeur sans arguments (privé car ne doit pas être utilisé)
131
	 * Constructeur sans arguments (privé car ne doit pas être utilisé)
Line 210... Line 213...
210
		this.setEnableColumnResize(true);
213
		this.setEnableColumnResize(true);
Line 211... Line 214...
211
		
214
		
212
		// creation du store		
215
		// creation du store		
213
		RecordDef rd = new RecordDef(getDefinitionChamps());
216
		RecordDef rd = new RecordDef(getDefinitionChamps());
214
		st = new Store(rd);
217
		st = new Store(rd);
215
		
218
 
Line 216... Line 219...
216
		// on associe le store
219
		// on associe le store
217
		
220
		
218
		this.setStore(st);
221
		this.setStore(st);
Line 320... Line 323...
320
	/**
323
	/**
321
	 * Ajoute les listeners pour la gestion des évènements
324
	 * Ajoute les listeners pour la gestion des évènements
322
	 */
325
	 */
323
	private void ajouterListeners() {
326
	private void ajouterListeners() {
Line -... Line 327...
-
 
327
		
-
 
328
		this.addGridHeaderListener(new GridHeaderListenerAdapter() {		
-
 
329
			@Override
-
 
330
			public void onHeaderClick(GridPanel grid, int colIndex, EventObject e) {
-
 
331
				triActif = true;
-
 
332
			}
-
 
333
		});
324
		
334
		
Line 325... Line 335...
325
		this.addGridRowListener(new GridRowListenerAdapter() {
335
		this.addGridRowListener(new GridRowListenerAdapter() {
326
			
336
			
327
			// gestion du clic sur une ligne
337
			// gestion du clic sur une ligne
Line 811... Line 821...
811
		
821
		
812
		return pageEncours;
822
		return pageEncours;
Line 813... Line 823...
813
	}
823
	}
-
 
824
	
814
	
825
	private void enregistrerEtatTri() {
815
	private void enregistrerEtatTri() {
826
		if(triActif) {
-
 
827
			this.directionTri = st.getSortState().getDirection();
816
		this.directionTri = st.getSortState().getDirection();
828
			this.champTri = st.getSortState().getField();
Line 817... Line 829...
817
		this.champTri = st.getSortState().getField();
829
		}
Line 818... Line 830...
818
	}
830
	}