Subversion Repositories eFlore/Archives.cel-v1

Rev

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

Rev 27 Rev 28
Line 20... Line 20...
20
package org.tela_botanica.client;
20
package org.tela_botanica.client;
Line 21... Line 21...
21
 
21
 
22
 
22
 
-
 
23
// TODO : traiter latence (augmenter en fonction rapidit� saisie + texte vide)
Line 23... Line 24...
23
// TODO : traiter latence (augmenter en fonction rapidit� saisie + texte vide)
24
// TODO : traitement espace apres l'espece (%20)
24
// TODO : traitement espace apres l'espece (%20)
25
// TODO : Utiliser Suggestbox et les Associating Data Transfer Objects (DTOs) with Suggestion Objects
25
 
26
 
26
import com.google.gwt.user.client.HTTPRequest;
27
import com.google.gwt.user.client.HTTPRequest;
27
import com.google.gwt.user.client.ResponseTextHandler;
28
import com.google.gwt.user.client.ResponseTextHandler;
28
import com.google.gwt.user.client.ui.KeyboardListener;
-
 
29
import com.google.gwt.user.client.ui.ListBox;
29
import com.google.gwt.user.client.ui.KeyboardListener;
30
import com.google.gwt.user.client.ui.PopupPanel;
30
import com.google.gwt.user.client.ui.ListBox;
31
import com.google.gwt.user.client.ui.RootPanel;
31
import com.google.gwt.user.client.ui.PopupPanel;
32
import com.google.gwt.user.client.ui.TextBox;
32
import com.google.gwt.user.client.ui.TextBox;
Line 56... Line 56...
56
			  complete();
56
			  complete();
57
		  }
57
		  }
58
	  } 
58
	  } 
59
  };
59
  };
60
  protected Vector items = new Vector(); 
60
  protected Vector items = new Vector(); 
61
  protected boolean popupAdded = false;
-
 
62
  protected boolean visible = false;
61
  protected boolean visible = false;
Line 63... Line 62...
63
  
62
  
64
  /**
63
  /**
65
   * Value linked to current text
64
   * Value linked to current text
Line 280... Line 279...
280
	       // choicesPopup.hide();
279
	       // choicesPopup.hide();
281
	     // } else {
280
	     // } else {
282
	        choices.setSelectedIndex(0);
281
	        choices.setSelectedIndex(0);
283
	        choices.setVisibleItemCount(items.size());
282
	        choices.setVisibleItemCount(items.size());
Line 284... Line -...
284
	               
-
 
285
	        if(!popupAdded)
-
 
286
	        {
-
 
287
	          RootPanel.get().add(choicesPopup);
-
 
288
	          popupAdded = true;
283
	               
289
	        }
-
 
290
	        choicesPopup.show();
284
	        
291
	        visible = true;
285
	        visible = true;
292
	        choicesPopup.setPopupPosition(this.getAbsoluteLeft(),
286
	        choicesPopup.setPopupPosition(this.getAbsoluteLeft(), this.getAbsoluteTop() + this.getOffsetHeight());
293
	        this.getAbsoluteTop() + this.getOffsetHeight());
287
	        choicesPopup.setPopupPosition(this.getAbsoluteLeft(), this.getAbsoluteTop() + this.getOffsetHeight());
294
	        choicesPopup.setWidth(this.getOffsetWidth() + "px");
288
	        choicesPopup.setWidth(this.getOffsetWidth() + "px");
-
 
289
	        choices.setWidth(this.getOffsetWidth() + "px");
-
 
290
	        
-
 
291
	        choicesPopup.show();
295
	        choices.setWidth(this.getOffsetWidth() + "px");
292
 
Line 296... Line 293...
296
	    //  }
293
	    //  }
297
	
294
	
298
	    } else {
295
	    } else {