Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 5 Rev 58
Line 2... Line 2...
2
 
2
 
3
import org.tela_botanica.client.image.ImageMediateur;
3
import org.tela_botanica.client.image.ImageMediateur;
4
import org.tela_botanica.client.interfaces.Filtrable;
4
import org.tela_botanica.client.interfaces.Filtrable;
Line -... Line 5...
-
 
5
import org.tela_botanica.client.interfaces.Rafraichissable;
5
import org.tela_botanica.client.interfaces.Rafraichissable;
6
 
6
 
7
import com.google.gwt.user.client.Window;
7
import com.google.gwt.user.client.ui.Label;
8
import com.google.gwt.user.client.ui.Label;
8
import com.gwtext.client.data.Node;
9
import com.gwtext.client.data.Node;
9
import com.gwtext.client.data.NodeTraversalCallback;
10
import com.gwtext.client.data.NodeTraversalCallback;
Line 102... Line 103...
102
				arbreMotsCles.setId("x-view-tree-filter");
103
				arbreMotsCles.setId("x-view-tree-filter");
103
				arbreMotsCles.setAutoWidth(false);
104
				arbreMotsCles.setAutoWidth(false);
104
				arbreMotsCles.setAutoScroll(true);
105
				arbreMotsCles.setAutoScroll(true);
105
				arbreMotsCles.setBorder(false);
106
				arbreMotsCles.setBorder(false);
Line -... Line 107...
-
 
107
 
-
 
108
				if(estInstancie)
106
 
109
				{
107
				// on crée une racine pour l'arbre
110
					// on crée une racine pour l'arbre
108
				TreeNode root = new TreeNode("Tags");
111
					TreeNode root = new TreeNode("Tags");
109
				root.setId("racine_filtre");
112
					root.setId("racine_filtre");
110
				String[] usObject = { "Mots clés", "racine" };
113
					String[] usObject = { "Mots clés", "racine" };
-
 
114
					root.setUserObject(usObject);
-
 
115
					arbreMotsCles.setRootNode(root);
111
				root.setUserObject(usObject);
116
				}
112
 
-
 
113
				arbreMotsCles.setRootNode(root);
117
					
114
				arbreMotsCles.setRootVisible(true);
118
				arbreMotsCles.setRootVisible(true);
Line 115... Line 119...
115
				arbreMotsCles.setBorder(false);
119
				arbreMotsCles.setBorder(false);
116
 
120
 
Line 172... Line 176...
172
				estInstancie = true;
176
				estInstancie = true;
173
			}
177
			}
Line 174... Line 178...
174
 
178
 
175
			// l'état du filtre est réinitialisé
179
			// l'état du filtre est réinitialisé
176
			filtreModifie = false;
-
 
177
 
180
			filtreModifie = false;
178
			show();
181
			show() ;
Line 179... Line 182...
179
		}
182
		}
180
 
183
 
Line 203... Line 206...
203
			child.setUserObject(usObj);
206
			child.setUserObject(usObj);
204
			arbreMotsCles.getNodeById(idPereFiltre).appendChild(child);
207
			arbreMotsCles.getNodeById(idPereFiltre).appendChild(child);
Line 205... Line 208...
205
 
208
 
206
			// et on ajoute le nouveau noeud à son père
209
			// et on ajoute le nouveau noeud à son père
-
 
210
			copierFilsNoeud(nd, child);
207
			copierFilsNoeud(nd, child);
211
			this.doLayout();
Line 208... Line 212...
208
		}
212
		}
209
 
213
 
210
		// si on reçoit une string
214
		// si on reçoit une string
211
		if (nouvelleDonnees instanceof String) {
215
		if (nouvelleDonnees instanceof String) {
212
			String idSupp = (String) nouvelleDonnees + "_filtre";
216
			String idSupp = (String) nouvelleDonnees + "_filtre";
213
			// c'est une suppression et si le noeud existe bien
217
			// c'est une suppression et si le noeud existe bien
214
			if (arbreMotsCles.getTree().getNodeById(idSupp) != null) {
218
			if (arbreMotsCles.getTree().getNodeById(idSupp) != null) {
215
				// on le supprime
219
				// on le supprime
-
 
220
				arbreMotsCles.getTree().getNodeById(idSupp).remove();
216
				arbreMotsCles.getTree().getNodeById(idSupp).remove();
221
			}
Line 217... Line 222...
217
			}
222
			
Line 218... Line 223...
218
		}
223
		}