List of usage examples for com.google.gwt.query.client GQuery add
public GQuery add(String selector)
From source file:org.kaaproject.avro.ui.gwt.client.widget.choosen.AvroChoosenListBox.java
License:Apache License
public static void updateChoosenListBoxMaxTextWidth(ChosenListBox box, int width, TextWidthFunction function) { ChosenImpl impl = $(box.getElement()).data(CHOSEN_DATA_KEY, ChosenImpl.class); if (impl != null) { GQuery results = impl.getContainer().find("li." + avroChoosenResources.css().activeResult(), "li." + avroChoosenResources.css().resultSelected()); GQuery searchchoiceSpan = impl.getContainer().find("li." + avroChoosenResources.css().searchChoice()) .find("span"); results = results.add(searchchoiceSpan); results = results.add($(box.getElement()).find("option")); for (int i = 0; i < results.size(); i++) { Element e = results.get(i); GQuery ge = $(e);//w ww . j a v a2 s . c o m ge.text(function.updateTextWidth(ge.text(), width)); } } }