public BorderColorFx(Element e, String endColorString) { endColor = parseColor(endColorString); startColors = JsNamedArray.create(); GQuery g = GQuery.$(e); for (String border : borderColorProperties) { int[] startColor = parseColor(g.css(border, true)); startColors.put(border, startColor); } }
/** * Wrap the inner child contents of each matched element (including text nodes) with an HTML * structure. This wrapping process is most useful for injecting additional structure into a * document, without ruining the original semantic qualities of a document. This works by going * through the first element provided (which is generated, on the fly, from the provided HTML) and * finds the deepest ancestor element within its structure -- it is that element that will enwrap * everything else. */ public GQuery wrapInner(Element elem) { return wrapInner($(elem)); }
/** * Undelegate is a way of removing event handlers that have been bound using * {@link #delegate(String, int, Function...)} method. * * @deprecated use {@link #off(String)} */ public GQuery undelegate(String selector, int eventBit) { for (Element e : elements) { $(selector, e).die(eventBit); } return this; }
/** * Replaces the element <code>elem</code> by the specified selector with the matched elements. * This function is the complement to replaceWith() which does the same task with the parameters * reversed. * * @return a {@link GQuery} object containing the new elements. */ public GQuery replaceAll(Element elem) { return replaceAll($(elem)); }
/** * Get all preceding siblings of each element matching the <code>filter</code> up to but not * including the <code>until</code> element. * */ public GQuery prevUntil(Element until, String filter) { return prevUntil($(until), filter); }
/** * Get all preceding siblings of each element up to but not including the <code>until</code> * element. * * The elements are returned in order from the closest sibling to the farthest. */ public GQuery prevUntil(Element until) { return prevUntil($(until), null); }
/** * Insert content before each of the matched elements. The elements must already be inserted into * the document (you can't insert an element before another if it's not in the page). */ public GQuery before(Node n) { return domManip($(n), DomMan.BEFORE); }
/** * Append content to the inside of every matched element. This operation is similar to doing an * appendChild to all the specified elements, adding them into the document. */ public GQuery append(Node n) { return domManip($(n), DomMan.APPEND); }
/** * Insert content after each of the matched elements. The elements must already be inserted into * the document (you can't insert an element after another if it's not in the page). */ public GQuery after(Node n) { return domManip($(n), DomMan.AFTER); }
@Override public GQAnimation setElement(Element elem) { e = elem; g = t = $(elem).as(Transitions.Transitions); return this; }
/** * Wrap each matched element with the specified HTML content. This wrapping process is most useful * for injecting additional structure into a document, without ruining the original semantic * qualities of a document. This works by going through the first element provided (which is * generated, on the fly, from the provided HTML) and finds the deepest descendant element within * its structure -- it is that element that will enwrap everything else. */ public GQuery wrap(Element elem) { return wrap($(elem)); }
/** * Get all preceding siblings of each element matching the <code>filter</code> up to but not * including the element matched by the <code>selector</code>. * * The elements are returned in order from the closest sibling to the farthest. */ public GQuery prevUntil(String selector, String filter) { return prevUntil($(selector), filter); }
/** * Removes elements matching the specified expression from the set of matched elements. */ public GQuery not(String... filters) { GQuery ret = this; for (String f : filters) { ret = ret.not($(f)); } return ret; }
/** * Get all following siblings of each element up to but not including the element matched by the * DOM node, filtered by a selector. * * @return */ public GQuery nextUntil(Element until, String filter) { return nextUntil($(until), filter); }
/** * Get all following siblings of each element up to but not including the element matched by the * DOM node. * * @param selector * @return */ public GQuery nextUntil(Element until) { return nextUntil($(until), null); }
/** * Insert all of the matched elements after another, specified, set of elements. */ public GQuery insertAfter(String selector) { return insertAfter($(selector)); }
/** * Add elements to the set of matched elements if they are not included yet. */ public GQuery add(String selector) { return add($(selector)); }
/** * Return a lazy version of the GQuery interface. Lazy function calls are simply queued up and not * executed immediately. */ public static LazyGQuery<?> lazy() { return $().createLazy(); }
private Element attachTemporary(Element elem) { Element lastParent = $(elem).parents().last().get(0); if (lastParent == null) { // the element itself is detached lastParent = elem; } Document.get().getBody().appendChild(lastParent); return lastParent; }