Subversion Repositories eFlore/Archives.cel-v2

Rev

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

Rev 28 Rev 31
Line 9... Line 9...
9
import org.tela_botanica.client.modeles.ListeImageCarnet;
9
import org.tela_botanica.client.modeles.ListeImageCarnet;
Line 10... Line 10...
10
 
10
 
11
import com.google.gwt.core.client.JavaScriptObject;
11
import com.google.gwt.core.client.JavaScriptObject;
12
import com.google.gwt.user.client.Window;
12
import com.google.gwt.user.client.Window;
-
 
13
import com.gwtext.client.core.EventObject;
-
 
14
import com.gwtext.client.core.Ext;
-
 
15
import com.gwtext.client.core.ExtElement;
13
import com.gwtext.client.core.EventObject;
16
import com.gwtext.client.core.JsObject;
14
import com.gwtext.client.data.ArrayReader;
17
import com.gwtext.client.data.ArrayReader;
15
import com.gwtext.client.data.FieldDef;
18
import com.gwtext.client.data.FieldDef;
16
import com.gwtext.client.data.IntegerFieldDef;
19
import com.gwtext.client.data.IntegerFieldDef;
17
import com.gwtext.client.data.MemoryProxy;
20
import com.gwtext.client.data.MemoryProxy;
18
import com.gwtext.client.data.Record;
21
import com.gwtext.client.data.Record;
19
import com.gwtext.client.data.RecordDef;
22
import com.gwtext.client.data.RecordDef;
20
import com.gwtext.client.data.Store;
23
import com.gwtext.client.data.Store;
21
import com.gwtext.client.data.StoreMgr;
24
import com.gwtext.client.data.StoreMgr;
-
 
25
import com.gwtext.client.data.StringFieldDef;
22
import com.gwtext.client.data.StringFieldDef;
26
import com.gwtext.client.util.JavaScriptObjectHelper;
23
import com.gwtext.client.widgets.BoxComponent;
27
import com.gwtext.client.widgets.BoxComponent;
24
import com.gwtext.client.widgets.Component;
28
import com.gwtext.client.widgets.Component;
25
import com.gwtext.client.widgets.Container;
29
import com.gwtext.client.widgets.Container;
26
import com.gwtext.client.widgets.Panel;
30
import com.gwtext.client.widgets.Panel;
Line 67... Line 71...
67
 
71
 
68
	// données locales
72
	// données locales
69
	// store qui gère les données de la liste d'images
73
	// store qui gère les données de la liste d'images
70
	private Store			st				= null;
74
	private Store			st				= null;
-
 
75
	private ColumnConfig	cl				= null;
-
 
76
	
Line 71... Line 77...
71
	private ColumnConfig	cl				= null;
77
	private pageToolBarVue bt = null ;
Line 72... Line 78...
72
 
78
 
Line 73... Line 79...
73
	public ListeImageVue(ImageMediateur im) {
79
	public ListeImageVue(ImageMediateur im) {
Line 74... Line 80...
74
 
80
 
-
 
81
		super();
-
 
82
 
-
 
83
		this.setId("listeImageGrid");
Line 75... Line 84...
75
		super();
84
 
76
 
85
		this.iMediateur = im;
77
		this.setId("listeImageGrid");
86
		
78
 
87
		bt = new pageToolBarVue(im);		
79
		this.iMediateur = im;
88
		this.setBottomToolbar(bt) ;
80
 
89
 
Line 81... Line 90...
81
		numImage = new ColumnConfig("numéro", "num_image", 100, true);
90
		numImage = new ColumnConfig("numéro", "num_image", 30, true);
82
		datImage = new ColumnConfig("date", "dat_image", 120, true);
91
		datImage = new ColumnConfig("date", "dat_image", 120, true);
83
		lieImage = new ColumnConfig("lieu", "lie_image", 120, true);
92
		lieImage = new ColumnConfig("lieu", "lie_image", 120, true);
Line 95... Line 104...
95
								+ "\" title='" + ImgNum + "'> </div>";
104
								+ "\" title='" + ImgNum + "'> </div>";
96
					}
105
					}
Line 97... Line 106...
97
 
106
 
Line 98... Line 107...
98
				});
107
				});
99
 
108
 
100
		ColumnConfig[] cm = { numImage, datImage, lieImage, appImage, urlImage };
109
		ColumnConfig[] cm = {numImage, urlImage, datImage, lieImage, appImage};
101
		modeleColonnes = new ColumnModel(cm);
110
		modeleColonnes = new ColumnModel(cm);
102
		this.setColumnModel(modeleColonnes);
111
		this.setColumnModel(modeleColonnes);
-
 
112
		this.setAutoScroll(true);
Line 103... Line 113...
103
		this.setAutoScroll(true);
113
		this.setAutoWidth(true);
104
		this.setAutoWidth(true);
114
		this.setEnableColumnResize(true);
105
 
115
 
106
		// creation du store
116
		// creation du store
Line 116... Line 126...
116
		RecordDef rd = new RecordDef(defTab);
126
		RecordDef rd = new RecordDef(defTab);
117
		st = new Store(rd);
127
		st = new Store(rd);
118
		this.setStore(st);
128
		this.setStore(st);
119
		this.getView().setAutoFill(true);
129
		this.getView().setAutoFill(true);
Line 120... Line -...
120
 
-
 
121
		// this.setLoadMask(true) ;
130
 
Line 122... Line 131...
122
		this.setLoadMask("chargement");
131
		this.setLoadMask("chargement");
Line 123... Line 132...
123
 
132
 
Line 231... Line 240...
231
		if (nouvelleDonnees instanceof Store) {
240
		if (nouvelleDonnees instanceof Store) {
Line 232... Line 241...
232
 
241
 
233
			st = (Store) nouvelleDonnees;
242
			st = (Store) nouvelleDonnees;
234
			st.load();
243
			st.load();
-
 
244
			this.reconfigure(st, this.getColumnModel());
235
			this.reconfigure(st, this.getColumnModel());
245
					
Line 236... Line 246...
236
		}
246
		}
237
 
247
 
238
		if (repandreRafraichissement) {
248
		if (repandreRafraichissement) {
Line 246... Line 256...
246
		if (isEstInstancie()) {
256
		if (isEstInstancie()) {
247
			getSelectionModel().clearSelections();
257
			getSelectionModel().clearSelections();
248
			getSelectionModel().selectRecords(sel);
258
			getSelectionModel().selectRecords(sel);
249
		}
259
		}
250
	}
260
	}
-
 
261
	
-
 
262
	public pageToolBarVue getToolBarVue()
-
 
263
	{
-
 
264
		return bt ;
-
 
265
	}
Line 251... Line 266...
251
 
266
 
252
	/**
267
	/**
253
	 * @param estInstancie
268
	 * @param estInstancie
254
	 *            the estInstancie to set
269
	 *            the estInstancie to set