Package com.google.gwt.user.client.ui.SuggestOracle

Examples of com.google.gwt.user.client.ui.SuggestOracle.Suggestion


    }
    showSuggestions(text);
  }

  private void setNewSelection(SuggestionMenuItem menuItem) {
    Suggestion curSuggestion = menuItem.getSuggestion();
    currentText = curSuggestion.getReplacementString();
    setText(currentText);
    suggestionPopup.hide();
    fireSuggestionEvent(curSuggestion);
  }
View Full Code Here


              event.preventDefault();
            }
            break;
          case KeyCodes.KEY_ENTER:
          case KeyCodes.KEY_TAB:
            Suggestion suggestion = display.getCurrentSelection();
            if (suggestion == null) {
              display.hideSuggestions();
            } else {
              setNewSelection(suggestion);
            }
View Full Code Here

      }
    }
  }

  private void setNewSelection(SuggestionMenuItem menuItem) {
    Suggestion curSuggestion = menuItem.getSuggestion();
    currentText = curSuggestion.getReplacementString();
    box.setText(currentText);
    suggestionPopup.hide();
    fireSuggestionEvent(curSuggestion);   
  }
View Full Code Here

    }
    showSuggestions(text);
  }

  private void setNewSelection(SuggestionMenuItem menuItem) {
    Suggestion curSuggestion = menuItem.getSuggestion();
    currentText = curSuggestion.getReplacementString();
    setText(currentText);
    suggestionPopup.hide();
    fireSuggestionEvent(curSuggestion);
  }
View Full Code Here

    }
    showSuggestions(text);
  }

  private void setNewSelection(SuggestionMenuItem menuItem) {
    Suggestion curSuggestion = menuItem.getSuggestion();
    currentText = curSuggestion.getReplacementString();
    setText(currentText);
    suggestionPopup.hide();
    fireSuggestionEvent(curSuggestion);
  }
View Full Code Here

    if(!selectionJs.isEmpty())
    {
      selectionHandlerRegistration = addSelectionHandler(new SelectionHandler<Suggestion>() {
        @Override
        public void onSelection(SelectionEvent<Suggestion> event) {
          Suggestion suggestion = event.getSelectedItem();
          Map<String, String> map = new HashMap<String, String>();
          map.put("displayString", suggestion.getDisplayString());
          map.put("replacementString", suggestion.getReplacementString());
          VkStateHelper.getInstance().getEventHelper().executeEvent(selectionJs, map);
        }
      });
    }
  }
View Full Code Here

    }
    showSuggestions(text);
  }

  private void setNewSelection(SuggestionMenuItem menuItem) {
    Suggestion curSuggestion = menuItem.getSuggestion();
    currentText = curSuggestion.getReplacementString();
    setText(currentText);
    suggestionPopup.hide();
    fireSuggestionEvent(curSuggestion);
  }
View Full Code Here

          case KeyCodes.KEY_UP:
            display.moveSelectionUp();
            break;
          case KeyCodes.KEY_ENTER:
          case KeyCodes.KEY_TAB:
            Suggestion suggestion = display.getCurrentSelection();
            if (suggestion == null) {
              display.hideSuggestions();
            } else {
              setNewSelection(suggestion);
            }
View Full Code Here

          case KeyCodes.KEY_UP:
            display.moveSelectionUp();
            break;
          case KeyCodes.KEY_ENTER:
          case KeyCodes.KEY_TAB:
            Suggestion suggestion = display.getCurrentSelection();
            if (suggestion == null) {
              display.hideSuggestions();
            } else {
              setNewSelection(suggestion);
            }
View Full Code Here

      suggestionMenu.clearItems();

      Iterator suggestionsIter = suggestions.iterator();

      while (suggestionsIter.hasNext()) {
        Suggestion curSuggestion = (Suggestion) suggestionsIter.next();
        final SuggestionMenuItem menuItem =
            new SuggestionMenuItem(curSuggestion, oracle.isDisplayStringHTML());
        menuItem.setCommand(new Command() {
          public void execute() {
            SuggestBox.this.setNewSelection(menuItem);
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.SuggestOracle.Suggestion

Copyright © 2018 www.massapicom. 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.