Examples of SuggestBox


Examples of com.google.gwt.user.client.ui.SuggestBox

            CompleteListener<T> completeListener) {
        super();
        this.oracle = oracle;
        this.completeListener = completeListener;

        suggestBox = new SuggestBox(oracle);
        suggestBox.addEventHandler(new SuggestionHandler() {

            public void onSuggestionSelected(SuggestionEvent event) {
                Log.debug("On Suggestion Selected! "
                        + event.getSelectedSuggestion()
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox

        oracle.add("Jill");
        oracle.add("Jeff");
        oracle.add("James");
        oracle.add("Jennifer");

        SuggestBox box = new SuggestBox(oracle);
        box.addEventHandler(new SuggestionHandler() {
            public void onSuggestionSelected(SuggestionEvent suggE) {
                String selected = suggE.getSelectedSuggestion()
                        .getReplacementString();
                // do something with selected suggestion
            }
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox

   
   
   
    oracle = new MultiWordSuggestOracle("/")
   
    box = new SuggestBox(oracle);
    box.setWidth("250px");
    hp0.add(box);
   
    box.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox

    startTime.setStyleName(style.textBoxSmall());
   
    endTime = new TextBox();
    endTime.setStyleName(style.textBoxSmall());
   
    tag = new SuggestBox(tagSuggestions);
   
    W2 = new TextBox();
    W2.setStyleName(style.textBoxSmall());
   
    W3 = new TextBox();
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox

  public RoadListing(HandlerManager eventBus) {
   
    this.eventBus = eventBus;
    polygonHash = new HashMap<String, Polygon>();
    polylineHash = new HashMap<String, TagPolyline>();
    tagSuggestBox = new SuggestBox(tagSuggestions);
    checkboxes = new ArrayList<CheckBox>();
   
    roadDetailsList = new ArrayList<RoadDetails>();
   
    roadService = GWT.create(RoadService.class);
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox

      String suggestion = option.getName()+ " - " +option.getUri();
      suggestions.put(suggestion, option);
      oracle.add(suggestion);

    }
    final SuggestBox suggestBox = new SuggestBox(oracle);
    suggestBox.setWidth(width);
    suggestBox.addEventHandler(new SuggestionHandler() {
      public void onSuggestionSelected(SuggestionEvent event) {
        String suggestion = event.getSelectedSuggestion().getReplacementString();
        Option option = suggestions.get(suggestion);
        textBox.setText(option.getName());
        optionSelected(option);
       
        _onChange();
       
        popup.hide();
      }
    });
    // Fix to issue #245:"cannot find authority abbreviation after typing a few letters"
    // just set limit of the suggest box to the number of options
    suggestBox.setLimit(options.size());
    ////////////////////////////////////////////////////////////
   
    vp.add(suggestBox);
    vp.add(listBox);
   
    waitPopup.hide();
   
    // use a timer to request for focus in the suggest-box:
    new Timer() {
      public void run() {
        suggestBox.setFocus(true);
      }
    }.schedule(700);
       
    popup.setText("Select " +attr.getLabel());
    popup.center();
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox

  /**
   * Creates a new instance.
   */
  public MainUiViewImpl() {
    // TODO: do proper suggestion
    searchKeyword = new SuggestBox();

    initWidget(uiBinder.createAndBindUi(this));

    currentYear.setInnerText(Integer.toString(new Date().getYear() + 1900));

View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox

                      "Packages (separate multiple with space or comma):");
      packagesLabel.setStylePrimaryName(RESOURCES.styles().packagesLabel());
      reposSourcePanel_.add(packagesLabel);
    
      packagesTextBox_ = new MultipleItemSuggestTextBox();
      packagesSuggestBox_ = new SuggestBox(new PackageOracle(),
                                           packagesTextBox_);
      packagesSuggestBox_.setWidth("100%");
      packagesSuggestBox_.setLimit(20);
      packagesSuggestBox_.addStyleName(RESOURCES.styles().extraBottomPad());
      reposSourcePanel_.add(packagesSuggestBox_);
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox

    public Widget asWidget() {

        if(null==oracle)
            throw new RuntimeException("oracle required!");

        this.suggestBox = new SuggestBox(oracle, textBox);

        suggestBox.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
                setModified(true);
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox

    oracle.add("Latte");
    oracle.add("Moccachino");
    oracle.add("Black Coffee + Sugar 026");
    oracle.add("Black Coffee - Sugar");

    final SuggestBox box = new SuggestBox(oracle);
    // create a listener for adding coffee icon to the column
    SelectionHandler<Suggestion> addListener = new SelectionHandler<Suggestion>() {
      public void onSelection(SelectionEvent<Suggestion> event) {
        if (cupArray.getWidgetCount() == 4) {
          Window.alert("Easy Tiger!");
          box.setText("");
          return;
        }
        cupArray.add(coffeeImages.cupIcon().createImage());
        cupArray.getElement().setTitle(box.getText());
        box.setText("");
      }
    };
    box.addSelectionHandler(addListener);

    int row = clientsFlexTable.getRowCount();
    clientsFlexTable.setText(row, 0, name);
    clientsFlexTable.setWidget(row, 1, box);
    clientsFlexTable.setWidget(row, 2, cupArray);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.