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

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


//        }

        //Create our own SuggestOracle that queries REST endpoint
        SuggestOracle oracle = new RestSuggestOracle();
        //initialize the SuggestBox
        m_field = new SuggestBox(oracle, textfield);
        m_feedback = new FormFeedback();
       
        if (isMultivalued) {
            m_panel.addStyleName("wideTextField");       
            m_panel.addStyleName("multivalue");
View Full Code Here


  public GroupReferenceBox() {
    suggestions = new DefaultSuggestionDisplay();
    textBox = new NpTextBox();
    oracle = new AccountGroupSuggestOracle();
    suggestBox = new SuggestBox( //
        new RPCSuggestOracle(oracle), //
        textBox, //
        suggestions);
    initWidget(suggestBox);
View Full Code Here

  public AddMemberBox(final String buttonLabel, final String hint,
      final SuggestOracle suggestOracle) {
    addPanel = new FlowPanel();
    addMember = new Button(buttonLabel);
    nameTxtBox = new HintTextBox();
    nameTxt = new SuggestBox(new RPCSuggestOracle(
        suggestOracle), nameTxtBox);
    nameTxt.setStyleName(Gerrit.RESOURCES.css().addMemberTextBox());

    nameTxtBox.setVisibleLength(50);
    nameTxtBox.setHintText(hint);
View Full Code Here

    ownerPanel.setStyleName(Gerrit.RESOURCES.css().groupOwnerPanel());
    ownerPanel.add(new SmallHeading(Util.C.headingOwner()));

    ownerTxtBox = new NpTextBox();
    ownerTxtBox.setVisibleLength(60);
    ownerTxt = new SuggestBox(new RPCSuggestOracle(
        new AccountGroupSuggestOracle()), ownerTxtBox);
    ownerTxt.setStyleName(Gerrit.RESOURCES.css().groupOwnerTextBox());
    ownerPanel.add(ownerTxt);

    saveOwner = new Button(Util.C.buttonChangeGroupOwner());
View Full Code Here

    };
  }

  protected void createWidgets() {
    nameBox = new HintTextBox();
    nameTxt = new SuggestBox(new ProjectNameSuggestOracle(), nameBox);
    nameBox.setVisibleLength(50);
    nameBox.setHintText(Util.C.defaultProjectName());
    nameBox.addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(KeyPressEvent event) {
View Full Code Here

    MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
    oracle.add("Cat");
    oracle.add("Dog");
    oracle.add("Horse");
    oracle.add("Canary");
    box = new SuggestBox(oracle);
    //search button
    final Button searchButton = new Button(msg.search());
    searchButton.addClickHandler(new ClickHandler() {
     
      @Override
View Full Code Here

    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

        callback.onSuggestionsReady(request, new Response(suggestions));
      }

    };

    SuggestBox box = new SuggestBox(oracle);
    box.addSelectionHandler(new SelectionHandler<Suggestion>() {
      public void onSelection(SelectionEvent<Suggestion> event) {
        AbstractIssue issue = ((IssueSuggestion) event.getSelectedItem()).getIssue();
        int index = issues.indexOf(issue);
        issueList.setSelectedIndex(index);
        refreshIssue();
      }
    });
    box.setAnimationEnabled(false);
    return box;
  }
View Full Code Here

        refreshIssue();
      }
    });

    // Create a suggest box to search for issues
    SuggestBox suggestBox = createIssueFinder();

    // Create a button to move to the previous issue
    Image prevButton = IMAGES.prevButton().createImage();
    prevButton.setStyleName("prevButton");
    prevButton.addClickHandler(new ClickHandler() {
View Full Code Here

  }

  private Widget manuallyShowAndHide() {
    FlexTable t = new FlexTable();
    t.getFlexCellFormatter().setColSpan(0, 0, 20);
    final SuggestBox box = simpleSuggestBox();
    box.setAnimationEnabled(true);
    t.setWidget(0, 0, box);

    Button showSuggestions = new Button(
        "show suggestions, then hide after 2  seconds", new ClickHandler() {
          public void onClick(ClickEvent event) {
            box.showSuggestionList();
            new Timer() {

              @Override
              public void run() {
                box.hideSuggestionList();
              }

            }.schedule(2000);
          }
        });
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.