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

Examples of com.google.gwt.user.client.ui.MultiWordSuggestOracle$WordBounds


    return buffer.toString();
  }
  @Override
  public void buildWidget(JSONObject jsonObj, Widget parent) {
    VkSuggestBox suggestBox = (VkSuggestBox)parent;
    MultiWordSuggestOracle oracle = (MultiWordSuggestOracle)suggestBox.getSuggestOracle();
    JSONArray suggestionArray = jsonObj.get("suggestions").isArray();
    suggestBox.getSuggestions().clear();
    addAttributes(jsonObj, parent);
    for(int i = 0; i < suggestionArray.size(); i++)
    {
      String suggestion = suggestionArray.get(i).isString().stringValue();
      oracle.add(suggestion);
      suggestBox.getSuggestions().add(suggestion);
    }
  }
View Full Code Here


      tb.setWidth("300px");
      VkDesignerUtil.showAddTextAttributeDialog("Please edit the suggestion", tb
        , new IDialogCallback() {
          @Override
          public void save(String js) {
            MultiWordSuggestOracle oracle = (MultiWordSuggestOracle)widget.getSuggestOracle();
            oracle.add(tb.getText());
            widget.getSuggestions().add(tb.getText());
          }
        });
    }
    else if(attributeName.equals(REMOVE_SUGGESTION))
    {
      final ListBox listBox = new ListBox();
      listBox.setWidth("200px");
      int i = 0;
      for (Iterator<String> iterator = widget.getSuggestions().iterator(); iterator.hasNext();)
        listBox.addItem(iterator.next(),Integer.toString(i++));
      VkDesignerUtil.showAddListDialog("Pick a suggestion to delete", listBox
        , new IDialogCallback() {
          @Override
          public void save(String js) {
            MultiWordSuggestOracle oracle = (MultiWordSuggestOracle)widget.getSuggestOracle();
            oracle.clear();
            widget.getSuggestions().remove(listBox.getSelectedIndex());
            for (Iterator<String> iterator = widget.getSuggestions().iterator(); iterator.hasNext();)
              oracle.add(iterator.next());
          }
        });
    }
    else if(attributeName.equals(EDIT_SUGGESTION))
    {
      final ListBox listBox = new ListBox();
      listBox.setWidth("200px");
      int i = 0;
      for (Iterator<String> iterator = widget.getSuggestions().iterator(); iterator.hasNext();)
        listBox.addItem(iterator.next(),Integer.toString(i++));
      VkDesignerUtil.showAddListDialog("Pick a suggestion to delete", listBox
        , new IDialogCallback() {
          @Override
          public void save(String js) {
            final TextBox tb = new TextBox();
            tb.setText(widget.getSuggestions().get(listBox.getSelectedIndex()));
            tb.setWidth("300px");
            VkDesignerUtil.showAddTextAttributeDialog("Please edit the suggestion", tb
              , new IDialogCallback() {
                @Override
                public void save(String js) {
                  MultiWordSuggestOracle oracle = (MultiWordSuggestOracle)widget.getSuggestOracle();
                  oracle.clear();
                  widget.getSuggestions().remove(listBox.getSelectedIndex());
                  widget.getSuggestions().add(listBox.getSelectedIndex(), tb.getText());
                  for (Iterator<String> iterator = widget.getSuggestions().iterator(); iterator.hasNext();)
                    oracle.add(iterator.next());
                }
            });
          }
      });
    }
View Full Code Here

        .getInnerHTML());
    list.remove(displayItem);
  }

  private MultiWordSuggestOracle getSuggestions() {
    MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
    oracle.add("Amy Kesic");
    oracle.add("Jason Weston");
    oracle.add("Dave Johnson");
    oracle.add("Paul Hammant");
    oracle.add("Jesse Kuhnert");
    oracle.add("Ben Alex");
    oracle.add("Tom Bender");
    oracle.add("Alexandru Popescu");
    oracle.add("Kaveh Arabfakhry");
    oracle.add("Steven Hong");
    oracle.add("Jason van Zyl");
    oracle.add("Alex Vauthey");
    oracle.add("Kiran Karnati");
    oracle.add("Kalpana Nagireddy");
    oracle.add("Ramnivas Laddad");
    oracle.add("Arj� Cahn");
    oracle.add("Amy Anne Rasberry");
    oracle.add("Vincent Stoessel");
    oracle.add("Steven Leija");
    oracle.add("Brian Burke");
    oracle.add("John Ipson");
    oracle.add("Candy Chastain Mielke");
    oracle.add("Scott Mark");
    oracle.add("Dov B. Katz");
    oracle.add("Alef Arendsen");
    oracle.add("David Jencks");
    oracle.add("Alexey Belikov");
    oracle.add("Bryan Vial");
    oracle.add("Dror Bereznitsky");
    oracle.add("David Moskowitz");
    oracle.add("Oscar Chan");
    oracle.add("Sergey Sundukovskiy");
    oracle.add("John Newton");
    oracle.add("Chris Buzzetta");
    oracle.add("Peter Svensson");
    oracle.add("Riccardo Ferretti");
    oracle.add("Christian Parker");
    oracle.add("Ann (Jaksa) Skaehill");
    oracle.add("Justin Blue");
    oracle.add("Sean Dawson");
    oracle.add("Devaraj NS");
    oracle.add("Robert Gadd");
    oracle.add("Diego Campodonico");
    oracle.add("Bryan Field-Elliot");
    oracle.add("Scott Delap");
    oracle.add("Kevin Koster");
    oracle.add("Fernand Galiana");
    oracle.add("Christopher Shuler");
    oracle.add("Geir Magnusson Jr");
    oracle.add("Tyler Hansen");
    oracle.add("Olivier Lamy");
    oracle.add("J. Thomas Richardson");
    oracle.add("Russell Beattie");
    oracle.add("Martin Ouellet");
    oracle.add("Scott Ferguson");
    oracle.add("Guillaume Laforge");
    oracle.add("Eric Weidner");
    oracle.add("Troy McKinnon");
    oracle.add("Max Hays");
    oracle.add("Phillip Rhodes");
    oracle.add("Eugene Kulechov");
    oracle.add("Bob Johnson");
    oracle.add("Richard Tucker, PMP");
    oracle.add("Mats Henricson");
    oracle.add("Floyd Marinescu");
    oracle.add("Ed Burns");
    oracle.add("Michael Root");
    oracle.add("Dana Busch");
    oracle.add("Borislav Roussev");
    oracle.add("Harris Tsim");
    oracle.add("Jason Thrasher");
    oracle.add("Soo-il Kim");
    oracle.add("Lindsey Bowman");
    oracle.add("Ganesh Hariharan");
    oracle.add("Judy Herilla");
    oracle.add("Jevgeni Kabanov");
    oracle.add("Craig Whitacre");
    oracle.add("Paul M. Garvey");
    oracle.add("Jeremy Whitlock");
    oracle.add("Fabrizio Giustina");
    oracle.add("Todd Fredrich");
    oracle.add("Matt Stine");
    oracle.add("Jo�o Vitor Lacerda Guimar�es");
    oracle.add("Yassine Hinnach");
    oracle.add("Chris Huston");
    oracle.add("Jodi Behrens-Stark");
    oracle.add("John Greenhill");
    oracle.add("Roy Porter");
    oracle.add("Paul Tuckey");
    oracle.add("Arjun Ram");
    oracle.add("Merrill Bennett");
    oracle.add("James Richards");
    oracle.add("Franz Garsombke");
    oracle.add("Kimberly Horan");
    oracle.add("Hani Suleiman");
    oracle.add("Thomas Dudziak");
    oracle.add("Andrew Penrose");
    oracle.add("Igor Polyakov");
    oracle.add("Steve Runkel");

    return oracle;
  }
View Full Code Here

 
  public PlayerSuggestAndAddPanel(ContentRpcServiceAsync contentService, boolean isContributor,
      AsyncCallback<BaseContentItem> callbackWork) {
    this.nameToPlayerMap = new HashMap<String, PlayerContentItem>();
   
    this.oracle = new MultiWordSuggestOracle();
    this.suggestBox = new SuggestBox(oracle);
    this.addOrCreateButton = new Button("Create or Add");
    this.textBox = suggestBox.getTextBox();
   
    this.problemLabel = new Label();
View Full Code Here

   */
  @ShowcaseSource
  @Override
  public Widget onInitialize() {
    // Define the oracle that finds suggestions
    MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
    String[] words = constants.cwSuggestBoxWords();
    for (int i = 0; i < words.length; ++i) {
      oracle.add(words[i]);
    }

    // Create the suggest box
    final SuggestBox suggestBox = new SuggestBox(oracle);
    suggestBox.ensureDebugId("cwSuggestBox");
View Full Code Here

    private MultiWordSuggestOracle oracle;


    public ClusterConnectionForm(FormToolStrip.FormCallback<ClusterConnection> callback) {
        this.callback = callback;
        oracle = new MultiWordSuggestOracle();
        oracle.setDefaultSuggestionsFromText(Collections.EMPTY_LIST);
    }
View Full Code Here

    }

    public ClusterConnectionForm(FormToolStrip.FormCallback<ClusterConnection> callback, boolean create) {
        this.callback = callback;
        isCreate = create;
        oracle = new MultiWordSuggestOracle();
        oracle.setDefaultSuggestionsFromText(Collections.EMPTY_LIST);

    }
View Full Code Here

    /**
     * Constructor for {@link Typeahead}. Creates a {@link MultiWordSuggestOracle} to use with this
     */
    public Typeahead() {
        this(new MultiWordSuggestOracle());
    }
View Full Code Here

    private MultiWordSuggestOracle oracle;

    public DefaultBridgeForm(FormToolStrip.FormCallback<Bridge> callback) {
        this.callback = callback;
        form.setNumColumns(2);
        oracle = new MultiWordSuggestOracle();
        oracle.setDefaultSuggestionsFromText(Collections.EMPTY_LIST);
    }
View Full Code Here

    public DefaultBridgeForm(FormToolStrip.FormCallback<Bridge> callback, boolean provideTools) {
        this.callback = callback;
        this.provideTools = provideTools;
        form.setNumColumns(2);
        oracle = new MultiWordSuggestOracle();
        oracle.setDefaultSuggestionsFromText(Collections.EMPTY_LIST);
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.MultiWordSuggestOracle$WordBounds

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.