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

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


    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

    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.