/** * Removes the <tt>i</tt>th child element with the specified tag name * from all relationships, if possible. * @param tagName the tag name of the child to remove * @param i the index of the child to remove */ public final void removeChild(final String tagName, final int i) { final List<HtmlElement> children = getHtmlElementsByTagName(tagName); if (i >= 0 && i < children.size()) { children.get(i).remove(); } }
/** * Removes the <tt>i</tt>th child element with the specified tag name * from all relationships, if possible. * @param tagName the tag name of the child to remove * @param i the index of the child to remove */ public final void removeChild(final String tagName, final int i) { final List<HtmlElement> children = getElementsByTagName(tagName); if (i >= 0 && i < children.size()) { children.get(i).remove(); } }
/** * Remove options by reducing the "length" property. This has no * effect if the length is set to the same or greater. * @param newLength the new length property value */ public void setOptionSize(final int newLength) { final List<HtmlElement> elementList = getElementsByTagName("option"); for (int i = elementList.size() - 1; i >= newLength; i--) { elementList.get(i).remove(); } }
/** * Remove options by reducing the "length" property. This has no * effect if the length is set to the same or greater. * @param newLength the new length property value */ public void setOptionSize(final int newLength) { final List<HtmlElement> elementList = getHtmlElementsByTagName("option"); for (int i = elementList.size() - 1; i >= newLength; i--) { elementList.get(i).remove(); } }
/** * Removes the <tt>i</tt>th child element with the specified tag name * from all relationships, if possible. * @param tagName the tag name of the child to remove * @param i the index of the child to remove */ public final void removeChild(final String tagName, final int i) { final List<HtmlElement> children = getElementsByTagName(tagName); if (i >= 0 && i < children.size()) { children.get(i).remove(); } }
/** * Removes the <tt>i</tt>th child element with the specified tag name * from all relationships, if possible. * @param tagName the tag name of the child to remove * @param i the index of the child to remove */ public final void removeChild(final String tagName, final int i) { final List<HtmlElement> children = getHtmlElementsByTagName(tagName); if (i >= 0 && i < children.size()) { children.get(i).remove(); } }
/** * Remove options by reducing the "length" property. This has no * effect if the length is set to the same or greater. * @param newLength the new length property value */ public void setOptionSize(final int newLength) { final List<HtmlElement> elementList = getHtmlElementsByTagName("option"); for (int i = elementList.size() - 1; i >= newLength; i--) { elementList.get(i).remove(); } }
/** * Removes the <tt>i</tt>th child element with the specified tag name * from all relationships, if possible. * @param tagName the tag name of the child to remove * @param i the index of the child to remove */ public final void removeChild(final String tagName, final int i) { final List<HtmlElement> children = getHtmlElementsByTagName(tagName); if (i >= 0 && i < children.size()) { children.get(i).remove(); } }
/** * Remove options by reducing the "length" property. This has no * effect if the length is set to the same or greater. * @param newLength the new length property value */ public void setOptionSize(final int newLength) { final List<HtmlElement> elementList = getHtmlElementsByTagName("option"); for (int i = elementList.size() - 1; i >= newLength; i--) { elementList.get(i).remove(); } }
/** * Remove options by reducing the "length" property. This has no * effect if the length is set to the same or greater. * @param newLength the new length property value */ public void setOptionSize(final int newLength) { final List<HtmlElement> elementList = getElementsByTagName("option"); for (int i = elementList.size() - 1; i >= newLength; i--) { elementList.get(i).remove(); } }
/** * Remove our window also. * {@inheritDoc} */ @Override public void remove() { super.remove(); getEnclosedWindow().close(); } }
/** * Remove our window also. * {@inheritDoc} */ @Override public void remove() { super.remove(); getEnclosedWindow().close(); } }
/** * Remove an option at the given index. * @param index the index of the option to remove */ public void removeOption(final int index) { final ChildElementsIterator iterator = new ChildElementsIterator(); for (int i = 0; iterator.hasNext();) { final HtmlElement element = iterator.nextElement(); if (element instanceof HtmlOption) { if (i == index) { element.remove(); return; } i++; } } }
/** * Remove an option at the given index. * @param index the index of the option to remove */ public void removeOption(final int index) { final ChildElementsIterator iterator = new ChildElementsIterator(); for (int i = 0; iterator.hasNext();) { final HtmlElement element = iterator.nextElement(); if (element instanceof HtmlOption) { if (i == index) { element.remove(); return; } i++; } } }
/** * Remove an option at the given index. * @param index the index of the option to remove */ public void removeOption(final int index) { final ChildElementsIterator iterator = new ChildElementsIterator(); for (int i = 0; iterator.hasNext();) { final HtmlElement element = iterator.nextElement(); if (element instanceof HtmlOption) { if (i == index) { element.remove(); return; } i++; } } }