Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 237 Rev 245
Line 35... Line 35...
35
 
35
 
36
	/**
36
	/**
37
	 * Le médiateur associé à la vue
37
	 * Le médiateur associé à la vue
38
	 */
38
	 */
-
 
39
	private ObservationMediateur oMediateur = null;
-
 
40
	
-
 
41
	/**
-
 
42
	 * Le titre du panneau
-
 
43
	 */
Line 39... Line 44...
39
	private ObservationMediateur oMediateur = null;
44
	private static String titrePanneau = "Images liées";
40
 
45
 
41
	/**
46
	/**
42
	 * Panneau conteneur pour l'image
47
	 * Panneau conteneur pour l'image
Line 112... Line 117...
112
	 * 
117
	 * 
113
	 * @param im
118
	 * @param im
114
	 *            le médiateur à associer à la vue
119
	 *            le médiateur à associer à la vue
115
	 */
120
	 */
116
	public MiniZoomImageVue(ObservationMediateur im) {
121
	public MiniZoomImageVue(ObservationMediateur im) {
117
		super("Image liées");
122
		super(titrePanneau);
118
		setId("x-view-mini-zoom-panel");
123
		setId("x-view-mini-zoom-panel");
119
		// on associe le médiateur
124
		// on associe le médiateur
120
		oMediateur = im;
125
		oMediateur = im;
Line 121... Line 126...
121
 
126
 
Line 229... Line 234...
229
	public void afficherImage()
234
	public void afficherImage()
230
	{
235
	{
231
		// c'est l'url de l'image qu'on associe à la vue
236
		// c'est l'url de l'image qu'on associe à la vue
232
		if(infosImages != null && infosImages.length != 0)
237
		if(infosImages != null && infosImages.length != 0)
233
		{
238
		{
234
			activerPanneau() ;
239
			setTitle(titrePanneau+"         "+(index+1)+" / "+infosImages.length);
-
 
240
			
235
			getImage().setUrl(convertirIdEnUrl(infosImages[index][0]));
241
			getImage().setUrl(convertirIdEnUrl(infosImages[index][0]));
236
			imageWidth = Integer.parseInt(infosImages[index][1]);
242
			imageWidth = Integer.parseInt(infosImages[index][1]);
237
			imageHeight = Integer.parseInt(infosImages[index][2]);
243
			imageHeight = Integer.parseInt(infosImages[index][2]);
238
			verifierEtRetaillerImage();
244
			verifierEtRetaillerImage();
-
 
245
			activerPanneau(true);
239
		} else {
246
		} else {
-
 
247
			setTitle(titrePanneau);
240
			getImage().setUrl("ill_liaison.png");
248
			getImage().setUrl("ill_liaison.png");
241
			imageWidth = getImage().getWidth();
249
			imageWidth = getImage().getWidth();
242
			imageHeight = getImage().getHeight();
250
			imageHeight = getImage().getHeight();
243
			if(imgZoom.isVisible()) {
251
			if(imgZoom.isVisible()) {
244
				agrandirImage();
252
				agrandirImage();
245
			}
253
			}
-
 
254
			activerPanneau(false);
-
 
255
		}
-
 
256
		
-
 
257
		if(infosImages != null && infosImages.length > 1) {
-
 
258
			prev.setEnabled(true);
-
 
259
			suiv.setEnabled(true);
-
 
260
		} else {
246
			prev.setEnabled(false);
261
			prev.setEnabled(false);
247
			suiv.setEnabled(false);
262
			suiv.setEnabled(false);
248
		}
263
		}
249
	}
264
	}
Line 250... Line 265...
250
 
265
 
251
	/**
266
	/**
252
	 * Active visuellement le panneau et les boutons
267
	 * Active visuellement le panneau et les boutons
253
	 */
268
	 */
-
 
269
	public void activerPanneau(boolean activer) {
254
	public void activerPanneau() {
270
		if(activer) {
-
 
271
			this.getEl().unmask();
255
		prev.setEnabled(true);
272
		} else {
-
 
273
			this.getEl().mask();
256
		suiv.setEnabled(true);
274
		}
Line 257... Line 275...
257
	}
275
	}
258
 
276
 
259
	/**
277
	/**