/** * Get a set of elements containing all of the unique children of each of the matched set of * elements. This set is filtered with the expressions that will cause only elements matching any * of the selectors to be collected. */ public GQuery children(String... filters) { return children().filter(filters); }
protected Element getElementBase(String n) { return g.children(n).get(0); }
protected Element[] getElementsBase(String n) { return g.children(n).elements(); }
private GQuery getFocusableElement() { GQuery chosen = getChosenElement(); GQuery focusableElement = chosen.children("a"); if (focusableElement.isEmpty()) { focusableElement = chosen.find("input"); } return focusableElement; } }
private GQuery getFocusableElement() { GQuery chosen = getChosenElement(); GQuery focusableElement = chosen.children("a"); if (focusableElement.isEmpty()) { focusableElement = chosen.find("input"); } return focusableElement; }
private GQuery getFocusableElement() { GQuery chosen = getChosenElement(); GQuery focusableElement = chosen.children("a"); if (focusableElement.isEmpty()) { focusableElement = chosen.find("input"); } return focusableElement; } }
/** * This method removes the element's parent. The matched elements replaces their parents within * the DOM structure. It is the inverse of {@link GQuery#wrap(GQuery)} method. * * @return */ public GQuery unwrap() { for (Element parent : parent().elements) { if (!"body".equalsIgnoreCase(parent.getTagName())) { GQuery g = $(parent); g.replaceWith(g.children()); } } return this; }
/** * Check if the {@link Element Element} <code>root</code> is attached to the * widget. If it is the case, adopt the widget. If not, check if the chidren * are linked to a widget to adopt them. * */ protected void adoptSubWidgets(Element root) { GQuery children = $(root).children(); for (Element child : children.elements()) { Widget w = $(child).widget(); if (w != null) { doAdopt(w); } else { adoptSubWidgets(child); } } }
/** * Insert a group to the list box. * * @param label the text of the group to be added * @param id the id of the optgroup element * @param index the index at which to insert it */ public void insertGroup(String label, String id, int index) { GQuery optGroup = $("<optgroup></optgroup>").attr("label", label); if (id != null) { optGroup.attr("id", id); } GQuery select = $(getElement()); int itemCount = SelectElement.as(getElement()).getLength(); if (index < 0 || index > itemCount) { select.append(optGroup); } else { GQuery before = select.children().eq(index); before.before(optGroup); } }
/** * Insert a group to the list box. * * @param label the text of the group to be added * @param id the id of the optgroup element * @param index the index at which to insert it */ public void insertGroup(String label, String id, int index) { GQuery optGroup = $("<optgroup></optgroup>").attr("label", label); if (id != null) { optGroup.attr("id", id); } GQuery select = $(getElement()); int itemCount = SelectElement.as(getElement()).getLength(); if (index < 0 || index > itemCount) { select.append(optGroup); } else { GQuery before = select.children().eq(index); before.before(optGroup); } }
/** * Insert a group to the list box. * * @param label the text of the group to be added * @param id the id of the optgroup element * @param index the index at which to insert it */ public void insertGroup(String label, String id, int index) { GQuery optGroup = $("<optgroup></optgroup>").attr("label", label); if (id != null){ optGroup.attr("id", id); } GQuery select = $(getElement()); int itemCount = SelectElement.as(getElement()).getLength(); if (index < 0 || index > itemCount) { select.append(optGroup); } else { GQuery before = select.children().eq(index); before.before(optGroup); } }
tempDiv.append($selectElement.clone()); fWidth = tempDiv.children("select").outerWidth();
tempDiv.append($selectElement.clone()); fWidth = tempDiv.children("select").outerWidth();
tempDiv.append($selectElement.clone()); fWidth = tempDiv.children("select").outerWidth();