Subversion Repositories eFlore/Archives.cel-v2

Rev

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

Rev 38 Rev 47
Line 2... Line 2...
2
 
2
 
3
 
3
 
Line 4... Line -...
4
import org.tela_botanica.client.image.ImageMediateur;
-
 
5
import org.tela_botanica.client.interfaces.Rafraichissable;
-
 
6
 
4
import org.tela_botanica.client.image.ImageMediateur;
7
 
5
import org.tela_botanica.client.interfaces.Rafraichissable;
8
import com.google.gwt.core.client.JavaScriptObject;
-
 
9
import com.google.gwt.user.client.DOM;
6
 
10
import com.google.gwt.user.client.Event;
7
import com.google.gwt.user.client.DOM;
11
import com.google.gwt.user.client.Window;
-
 
12
import com.google.gwt.user.client.ui.ClickListener;
-
 
13
import com.google.gwt.user.client.ui.Image;
-
 
14
import com.google.gwt.user.client.ui.LoadListener;
8
import com.google.gwt.user.client.Event;
15
import com.google.gwt.user.client.ui.MouseWheelListener;
9
import com.google.gwt.user.client.ui.ClickListener;
16
import com.google.gwt.user.client.ui.MouseWheelVelocity;
-
 
17
import com.google.gwt.user.client.ui.Widget;
-
 
18
import com.gwtext.client.core.RegionPosition;
10
import com.google.gwt.user.client.ui.Image;
19
import com.gwtext.client.widgets.BoxComponent;
11
import com.google.gwt.user.client.ui.Widget;
20
import com.gwtext.client.widgets.Button;
12
import com.gwtext.client.core.RegionPosition;
21
import com.gwtext.client.widgets.Component;
-
 
22
import com.gwtext.client.widgets.Container;
-
 
23
import com.gwtext.client.widgets.Panel;
13
import com.gwtext.client.widgets.Component;
24
import com.gwtext.client.widgets.event.ContainerListenerAdapter;
14
import com.gwtext.client.widgets.Container;
25
import com.gwtext.client.widgets.event.PanelListener;
15
import com.gwtext.client.widgets.Panel;
26
import com.gwtext.client.widgets.event.PanelListenerAdapter;
-
 
27
import com.gwtext.client.widgets.layout.BorderLayout;
-
 
Line 28... Line 16...
28
import com.gwtext.client.widgets.layout.BorderLayoutData;
16
import com.gwtext.client.widgets.event.PanelListenerAdapter;
29
import com.gwtext.client.widgets.layout.FitLayout;
17
import com.gwtext.client.widgets.layout.BorderLayout;
30
import com.gwtext.client.widgets.layout.VerticalLayout;
18
import com.gwtext.client.widgets.layout.BorderLayoutData;
31
 
19
 
Line 97... Line 85...
97
		// on associe le médiateur
85
		// on associe le médiateur
98
		iMediateur = im ;
86
		iMediateur = im ;
Line 99... Line 87...
99
		
87
		
100
		// on crée un image qui gère le double clic
88
		// on crée un image qui gère le double clic
-
 
89
		image = new Image() {
101
		image = new Image() {
90
			
102
			public void onBrowserEvent(Event event) {
91
			public void onBrowserEvent(Event event) {
103
				// lors du double clic
92
				// lors du double clic
Line 104... Line 93...
104
				if (Event.ONDBLCLICK == DOM.eventGetType(event)) {
93
				if (Event.ONDBLCLICK == DOM.eventGetType(event)) {
Line 129... Line 118...
129
		
118
		
130
		this.add(prev,new BorderLayoutData(RegionPosition.WEST));
119
		this.add(prev,new BorderLayoutData(RegionPosition.WEST));
131
		this.add(imageConteneur,new BorderLayoutData(RegionPosition.CENTER));
120
		this.add(imageConteneur,new BorderLayoutData(RegionPosition.CENTER));
Line -... Line 121...
-
 
121
		this.add(suiv,new BorderLayoutData(RegionPosition.EAST));
-
 
122
		
132
		this.add(suiv,new BorderLayoutData(RegionPosition.EAST));
123
		imageConteneur.setMaskDisabled(true) ;
133
		
124
		
134
		// on ajoute les listeners
125
		// on ajoute les listeners
Line 135... Line 126...
135
		ajouterListeners();
126
		ajouterListeners();
Line 215... Line 206...
215
		
206
		
216
		// gestion du redimensionnement
207
		// gestion du redimensionnement
Line 217... Line 208...
217
		this.addListener(new PanelListenerAdapter() {
208
		this.addListener(new PanelListenerAdapter() {
-
 
209
			
218
			
210
			// lors d'un redimensionnement de l'application
219
			// lors d'un redimensionnement de l'application
211
			
220
			public void onBodyResize(Panel panel,java.lang.String width,java.lang.String height)
212
			public void onBodyResize(Panel panel,java.lang.String width,java.lang.String height)
221
			{
213
			{
222
				// on vérifie et on retaille l'image
214
				// on vérifie et on retaille l'image
Line 226... Line 218...
226
		
218
		
227
		// gestion du redimensionnement lors de l'affichage du conteneur
219
		// gestion du redimensionnement lors de l'affichage du conteneur
Line 228... Line 220...
228
		imageConteneur.addListener(new PanelListenerAdapter() {
220
		imageConteneur.addListener(new PanelListenerAdapter() {
-
 
221
			
229
			
222
			// avant de finir d'afficher
230
			// avant de finir d'afficher
223
			
231
			public void onAfterLayout(Container self)
224
			public void onAfterLayout(Container self)
232
			{
225
			{
233
				// on redimensionne
226
				// on redimensionne
Line 351... Line 344...
351
		int[] taille = {imageHeight,imageWidth} ;
344
		int[] taille = {imageHeight,imageWidth} ;
Line 352... Line 345...
352
		
345
		
353
		return taille ;
346
		return taille ;
Line -... Line 347...
-
 
347
	}
-
 
348
 
-
 
349
	public Panel getImageConteneur() {
-
 
350
		
-
 
351
		return imageConteneur ;
-
 
352
		
354
	}
353
	}