Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 267 → Rev 268

/trunk/src/org/tela_botanica/client/vues/ArbreMotsClesFiltreVue.java
439,40 → 439,42
 
public void raz() {
// on vide tous les noeuds de l'ancien arbre
Node[] rootChild = arbreMotsCles.getRootNode().getChildNodes();
for (int i = 0; i < rootChild.length; i++) {
if(arbreInitialise) {
// on vide tous les noeuds de l'ancien arbre
Node[] rootChild = arbreMotsCles.getRootNode().getChildNodes();
for (int i = 0; i < rootChild.length; i++) {
rootChild[i].remove();
}
rootChild[i].remove();
}
arbreInitialise = false ;
// on crée une racine pour l'arbre
TreeNode root = new TreeNode("Tags");
root.setId("racine"+prefixe);
String[] usObject = { "Mots clés", "racine" };
root.setUserObject(usObject);
root.setExpandable(true);
arbreMotsCles.setRootNode(root);
arbreMotsCles.getRootNode().addListener(new TreeNodeListenerAdapter() {
 
public void onClick(Node node, EventObject e) {
if(!arbreInitialise) {
expand();
arbreInitialise = false ;
// on crée une racine pour l'arbre
TreeNode root = new TreeNode("Tags");
root.setId("racine"+prefixe);
String[] usObject = { "Mots clés", "racine" };
root.setUserObject(usObject);
root.setExpandable(true);
arbreMotsCles.setRootNode(root);
arbreMotsCles.getRootNode().addListener(new TreeNodeListenerAdapter() {
public void onClick(Node node, EventObject e) {
if(!arbreInitialise) {
expand();
}
}
}
 
public void onExpand(Node node) {
if(!arbreInitialise) {
obtenirArbreMotsCles();
arbreInitialise = true;
public void onExpand(Node node) {
if(!arbreInitialise) {
obtenirArbreMotsCles();
arbreInitialise = true;
}
}
}
});
});
}
}
 
}