Examples of showSuggestions()


Examples of com.google.gwt.user.client.ui.SuggestBox.DefaultSuggestionDisplay.showSuggestions()

    // isSuggestListShowing.
    List<Suggestion> suggestions = createSuggestions("test0", "test1", "test2");
    assertFalse(display.isSuggestionListShowing());
    assertFalse(popup.isShowing());
    display.showSuggestions(box, suggestions, false, false, NULL_CALLBACK);
    assertTrue(display.isSuggestionListShowing());
    assertTrue(popup.isShowing());
    display.hideSuggestions();
    assertFalse(display.isSuggestionListShowing());
    assertFalse(popup.isShowing());
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox.DefaultSuggestionDisplay.showSuggestions()

    SuggestBox box = createSuggestBox();
    DefaultSuggestionDisplay display = (DefaultSuggestionDisplay) box.getSuggestionDisplay();

    // Show the suggestions and select the first item.
    List<Suggestion> suggestions = createSuggestions("test0", "test1", "test2");
    display.showSuggestions(box, suggestions, false, true, NULL_CALLBACK);
    assertTrue(display.isSuggestionListShowing());
    assertEquals(suggestions.get(0), display.getCurrentSelection());

    // Hide the list and ensure that nothing is selected.
    display.hideSuggestions();
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox.DefaultSuggestionDisplay.showSuggestions()

  public void testShowSuggestionsEmpty() {
    SuggestBox box = createSuggestBox();
    DefaultSuggestionDisplay display = (DefaultSuggestionDisplay) box.getSuggestionDisplay();

    // Show null suggestions.
    display.showSuggestions(box, null, false, true, NULL_CALLBACK);
    assertFalse(display.isSuggestionListShowing());

    // Show empty suggestions.
    List<Suggestion> suggestions = createSuggestions();
    display.showSuggestions(box, suggestions, false, true, NULL_CALLBACK);
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox.DefaultSuggestionDisplay.showSuggestions()

    display.showSuggestions(box, null, false, true, NULL_CALLBACK);
    assertFalse(display.isSuggestionListShowing());

    // Show empty suggestions.
    List<Suggestion> suggestions = createSuggestions();
    display.showSuggestions(box, suggestions, false, true, NULL_CALLBACK);
    assertFalse(display.isSuggestionListShowing());
  }

  @Override
  protected DefaultSuggestionDisplay createSuggestionDisplay() {
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox.SuggestionDisplay.showSuggestions()

    SuggestOracle oracle = box.getSuggestOracle();

    // Show some suggestions.
    List<Suggestion> suggestions = createSuggestions("test0", "test1", "test2",
        "test3");
    display.showSuggestions(box, suggestions, false, false, NULL_CALLBACK);
    assertNull(display.getCurrentSelection());

    display.moveSelectionDown();
    assertEquals(suggestions.get(0), display.getCurrentSelection());
    display.moveSelectionDown();
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox.SuggestionDisplay.showSuggestions()

    SuggestionDisplay display = box.getSuggestionDisplay();
    SuggestOracle oracle = box.getSuggestOracle();

    // Show some suggestions with auto select disabled.
    List<Suggestion> suggestions = createSuggestions("test0", "test1", "test2");
    display.showSuggestions(box, suggestions, false, false, NULL_CALLBACK);

    // Nothing should be selected.
    assertNull(display.getCurrentSelection());
  }
View Full Code Here

Examples of com.google.gwt.user.client.ui.SuggestBox.SuggestionDisplay.showSuggestions()

    SuggestionDisplay display = box.getSuggestionDisplay();
    SuggestOracle oracle = box.getSuggestOracle();

    // Show some suggestions with auto select enabled.
    List<Suggestion> suggestions = createSuggestions("test0", "test1", "test2");
    display.showSuggestions(box, suggestions, false, true, NULL_CALLBACK);

    // First item should be selected.
    assertEquals(suggestions.get(0), display.getCurrentSelection());
  }
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.