Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1292 Rev 1837
Line 1... Line 1...
1
package org.tela_botanica.client.vues.image;
1
package org.tela_botanica.client.vues.image;
Line 2... Line 2...
2
 
2
 
Line -... Line 3...
-
 
3
import org.tela_botanica.client.interfaces.Rafraichissable;
3
import org.tela_botanica.client.interfaces.Rafraichissable;
4
 
4
 
5
import com.google.gwt.core.client.JavaScriptObject;
5
import com.google.gwt.user.client.Window;
6
import com.google.gwt.user.client.Window;
6
import com.gwtext.client.core.EventObject;
7
import com.gwtext.client.core.EventObject;
7
import com.gwtext.client.data.Node;
8
import com.gwtext.client.data.Node;
-
 
9
import com.gwtext.client.data.NodeTraversalCallback;
-
 
10
import com.gwtext.client.data.Tree;
-
 
11
import com.gwtext.client.dd.DD;
-
 
12
import com.gwtext.client.dd.DragData;
8
import com.gwtext.client.data.NodeTraversalCallback;
13
import com.gwtext.client.dd.DragDrop;
9
import com.gwtext.client.data.Tree;
14
import com.gwtext.client.widgets.BoxComponent;
-
 
15
import com.gwtext.client.widgets.Button;
10
import com.gwtext.client.widgets.Button;
16
import com.gwtext.client.widgets.Component;
11
import com.gwtext.client.widgets.Component;
17
import com.gwtext.client.widgets.Container;
12
import com.gwtext.client.widgets.Panel;
18
import com.gwtext.client.widgets.Panel;
13
import com.gwtext.client.widgets.Toolbar;
19
import com.gwtext.client.widgets.Toolbar;
-
 
20
import com.gwtext.client.widgets.ToolbarButton;
-
 
21
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-
 
22
import com.gwtext.client.widgets.event.ContainerListener;
14
import com.gwtext.client.widgets.ToolbarButton;
23
import com.gwtext.client.widgets.event.PanelListener;
15
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
24
import com.gwtext.client.widgets.event.WindowListener;
-
 
25
import com.gwtext.client.widgets.event.WindowListenerAdapter;
16
import com.gwtext.client.widgets.event.WindowListenerAdapter;
26
import com.gwtext.client.widgets.form.TextField;
-
 
27
import com.gwtext.client.widgets.layout.FitLayout;
-
 
28
import com.gwtext.client.widgets.layout.HorizontalLayout;
17
import com.gwtext.client.widgets.form.TextField;
29
import com.gwtext.client.widgets.layout.RowLayout;
-
 
30
import com.gwtext.client.widgets.layout.RowLayoutData;
18
import com.gwtext.client.widgets.layout.HorizontalLayout;
31
import com.gwtext.client.widgets.layout.VerticalLayout;
19
import com.gwtext.client.widgets.layout.VerticalLayout;
32
import com.gwtext.client.widgets.tree.DropNodeCallback;
20
import com.gwtext.client.widgets.tree.MultiSelectionModel;
33
import com.gwtext.client.widgets.tree.MultiSelectionModel;
21
import com.gwtext.client.widgets.tree.TreeEditor;
34
import com.gwtext.client.widgets.tree.TreeEditor;
22
import com.gwtext.client.widgets.tree.TreeNode;
35
import com.gwtext.client.widgets.tree.TreeNode;
-
 
36
import com.gwtext.client.widgets.tree.TreePanel;
23
import com.gwtext.client.widgets.tree.TreePanel;
37
import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
Line 24... Line 38...
24
import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
38
import com.gwtext.client.widgets.tree.event.TreePanelListener;
25
import com.gwtext.client.widgets.tree.event.TreePanelListenerAdapter;
39
import com.gwtext.client.widgets.tree.event.TreePanelListenerAdapter;
26
 
40
 
Line 101... Line 115...
101
	 * Booléen d'évènement qui sert à savoir si les mots clés ont bien été reçu
115
	 * Booléen d'évènement qui sert à savoir si les mots clés ont bien été reçu
102
	 */
116
	 */
103
	private boolean motsCleInitialises;
117
	private boolean motsCleInitialises;
Line 104... Line 118...
104
 
118
	
-
 
119
	/**
-
 
120
	 * panneau intermédiaire contenant l'arbre
-
 
121
	 */
-
 
122
	private Panel panelIntermediaire;
-
 
123
 
105
	/**
124
	/**
106
	 * Constructeur avec paramètre
125
	 * Constructeur avec paramètre
107
	 * 
126
	 * 
108
	 * @param im
127
	 * @param im
109
	 *            le médiateur à associer
128
	 *            le médiateur à associer
110
	 */
129
	 */
Line 111... Line 130...
111
	public FenetreGestionMotsCles() {
130
	public FenetreGestionMotsCles() {
112
				
131
				
113
		// on crée le panel
132
		// on crée le panel
Line 114... Line 133...
114
		setTitle("Mots clés");
133
		setTitle("Mots clés");
115
		this.setLayoutData(new VerticalLayout());
134
		this.setLayoutData(new RowLayout());
116
 
135
 
117
		// on crée le conteneur de l'arbre
136
		// on crée le conteneur de l'arbre
Line 159... Line 178...
159
		te = new TreeEditor(arbreMotsCles, tfEdit);
178
		te = new TreeEditor(arbreMotsCles, tfEdit);
160
		valider = new Button("Appliquer");
179
		valider = new Button("Appliquer");
161
		annuler = new Button("Annuler");
180
		annuler = new Button("Annuler");
162
		arbreMotsCles.add(te);
181
		arbreMotsCles.add(te);
Line 163... Line 182...
163
		
182
		
164
		Panel panelIntermediaire = new Panel();
183
		panelIntermediaire = new Panel();
-
 
184
		panelIntermediaire.setLayout(new FitLayout());
-
 
185
		panelIntermediaire.setAutoScroll(true);
-
 
186
		panelIntermediaire.setWidth("100%");
-
 
187
		arbreMotsCles.setWidth("100%");
Line 165... Line 188...
165
		panelIntermediaire.setLayoutData(new VerticalLayout());
188
		arbreMotsCles.setHeight("100%");
166
		
189
		
167
		Panel panelBoutons = new Panel();
190
		Panel panelBoutons = new Panel();
Line 168... Line 191...
168
		panelBoutons.setLayout(new HorizontalLayout(130));
191
		panelBoutons.setLayout(new HorizontalLayout(130));
169
		panelBoutons.setWidth("100%");
192
		panelBoutons.setWidth("100%");
170
 
193
 
171
		// on met en forme le layout
194
		// on met en forme le layout
Line 172... Line 195...
172
		panelIntermediaire.add(arbreMotsCles);
195
		panelIntermediaire.add(arbreMotsCles);
173
		panelBoutons.add(annuler);
196
		panelBoutons.add(annuler);
174
		panelBoutons.add(valider);
197
		panelBoutons.add(valider);
-
 
198
		
Line 175... Line 199...
175
		
199
		this.add(panelIntermediaire, new RowLayoutData());
176
		this.add(panelIntermediaire);
200
		this.add(panelBoutons, new RowLayoutData(30));
177
		this.add(panelBoutons);
201
		arbreMotsCles.setHeight("100%");
178
		arbreMotsCles.setHeight("338px");
202
		arbreMotsCles.setAutoScroll(true);
Line 238... Line 262...
238
	/**
262
	/**
239
	 * Ajoute les listeners nécessaires pour la gestion des évènements
263
	 * Ajoute les listeners nécessaires pour la gestion des évènements
240
	 */
264
	 */
241
	private void ajouterListeners() {
265
	private void ajouterListeners() {
Line -... Line 266...
-
 
266
		
-
 
267
		this.addListener(new WindowListenerAdapter() {			
-
 
268
			@Override
-
 
269
			public void onResize(com.gwtext.client.widgets.Window source, int width,
-
 
270
					int height) {
-
 
271
					panelIntermediaire.setHeight(getHeight() - 80);		
-
 
272
			}
-
 
273
		});
242
						
274
						
-
 
275
		arbreMotsCles.addListener(new TreePanelListenerAdapter() {
-
 
276
			@Override
-
 
277
			public void onAfterLayout(Container self) {
-
 
278
				panelIntermediaire.setHeight(getHeight() - 80);		
Line 243... Line 279...
243
		arbreMotsCles.addListener(new TreePanelListenerAdapter() {
279
			}
244
			
280
			
245
			@Override
281
			@Override
246
			public void onExpandNode(TreeNode node) {		
282
			public void onExpandNode(TreeNode node) {