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

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


   }

   @Test
   public void suggestBoxItems() {
      // Arrange
      SuggestBox box = new SuggestBox();
      SuggestionDisplay display = GwtReflectionUtils.getPrivateFieldValue(box, "display");
      MenuBar bar = GwtReflectionUtils.getPrivateFieldValue(display, "suggestionMenu");

      Command cmd = new Command() {
         public void execute() {
View Full Code Here


   public void click_SuggestBox() {
      // Arrange
      MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
      oracle.add("suggestion 1");
      oracle.add("suggestion 2");
      SuggestBox box = new SuggestBox(oracle);

      // Act
      Browser.fillText(box, "sug");
      Browser.click(box, 1);

      // Assert
      assertEquals("suggestion 2", box.getText());
   }
View Full Code Here

    // No new methods.  Just a parameterized UiBinder.
  }

  public PlaygroundUI(MultiWordSuggestOracle sourceSuggestions,
      MultiWordSuggestOracle policySuggestions) {
    addressField = new SuggestBox(sourceSuggestions);
    policyAddressField = new SuggestBox(policySuggestions);

    initWidget(UI_BINDER.createAndBindUi(this));
  }
View Full Code Here

    }
  }

  private void initPolicyPanel() {
    policyExamples = new MultiWordSuggestOracle();
    playgroundUI.policyAddressField = new SuggestBox(policyExamples);
    playgroundUI.policyAddressField.getTextBox().addFocusHandler(new FocusHandler() {
      public void onFocus(FocusEvent event) {
        playgroundUI.policyAddressField.showSuggestionList();
      }
    });
View Full Code Here

  @Inject
  public SearchView(final Binder binder) {
    widget = binder.createAndBindUi(this);
   
    SuggestOracle oracle = getSuggestOracle();
    rwSuggestBox = new SuggestBox(oracle);
    rwSearchButton = new Button();
    rwSearchButton.setText("search");
    searchContainer.add(rwSuggestBox);
    searchContainer.add(rwSearchButton);
   
View Full Code Here

        VerticalPanel criteria = new VerticalPanel();

        FormStyleLayout layout = new FormStyleLayout( images.systemSearch(),
                                                      "" );

        searchBox = new SuggestBox( new SuggestOracle() {
            public void requestSuggestions(Request r,
                                           Callback cb) {
                loadShortList( r.getQuery(),
                               archiveBox.getValue(),
                               r,
View Full Code Here

        this.editEvent = editEvent;

        FormStyleLayout layout = new FormStyleLayout(images.systemSearch(),
                "");

        searchBox = new SuggestBox( new SuggestOracle() {
            public void requestSuggestions(Request r,
                                           Callback cb) {
                loadShortList( r.getQuery(),
                               r,
                               cb );
View Full Code Here

  }

  void initContentOracle() {
    contentOracle = new MultiWordSuggestOracle();

    contentSuggestBox = new SuggestBox(contentOracle);
    contentSuggestBox.getElement().setId("content-box");

    // Some initial content xml strings
    contentOracle.add("");
    contentOracle.add("abcd");
View Full Code Here

        VerticalPanel searchPanel = new VerticalPanel();
        searchPanel.setStyleName("fill-layout-width");
        IndexSuggestOracle oracle = new IndexSuggestOracle(this.index);
        TextBox textBox = new TextBox();
        textBox.getElement().setAttribute("placeholder", Console.CONSTANTS.search_placeholder());
        searchBox = new SuggestBox(oracle, textBox);
        searchBox.addSelectionHandler(new SelectionHandler<SuggestOracle.Suggestion>() {
            @Override
            public void onSelection(final SelectionEvent<SuggestOracle.Suggestion> event) {
                hide();
                DocumentSuggestion suggestion = (DocumentSuggestion) event.getSelectedItem();
View Full Code Here

        textBox.setName(name);
        textBox.setTitle(title);
        textBox.setTabIndex(0);

        oracle = new PrincipalSuggestOracle(type);
        suggestBox = new SuggestBox(oracle, textBox);
        suggestBox.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
                setModified(true);
                String newValue = event.getValue();
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.SuggestBox$SuggestionPopup

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.