Package com.google.gwt.query.client

Examples of com.google.gwt.query.client.GQuery.attr()


    g.as(Effects).
        animate($$("$width: +=100; $border: +=4"), duration, EasingCurve.linear);

    final Timer timer = new Timer() {
      public void run() {
        assertEquals(540.0, Double.parseDouble(g.attr("width")));
        assertEquals(5.0, Double.parseDouble(g.attr("border")));
        finishTest();
      }
    };
    timer.schedule(duration * 2);
 
View Full Code Here


        animate($$("$width: +=100; $border: +=4"), duration, EasingCurve.linear);

    final Timer timer = new Timer() {
      public void run() {
        assertEquals(540.0, Double.parseDouble(g.attr("width")));
        assertEquals(5.0, Double.parseDouble(g.attr("border")));
        finishTest();
      }
    };
    timer.schedule(duration * 2);
  }
View Full Code Here

    }

    //test nth-child
    GQuery second = $("#parent > div",e).filter(":nth-child(2)");
    assertEquals(1, second.size());
    assertEquals("second", second.attr("id"));

    GQuery third =$("#parent > div:nth-child(3)", e);
    assertEquals(1, third.size());
    assertEquals("third", third.attr("id"));
View Full Code Here

    assertEquals(1, second.size());
    assertEquals("second", second.attr("id"));

    GQuery third =$("#parent > div:nth-child(3)", e);
    assertEquals(1, third.size());
    assertEquals("third", third.attr("id"));

    //test nth-child with function
    GQuery secondAndFourth = $("#parent > div",e).filter(":nth-child(2n)");
    assertEquals(2, secondAndFourth.size());
    assertEquals("second", secondAndFourth.eq(0).attr("id"));
View Full Code Here

    // If key starts with $ we animate node attributes, otherwise css properties
    double cur;
    String rkey = null;
    if (key.startsWith("$")) {
      rkey = key.substring(1).toLowerCase();
      String attr = g.attr(rkey);
      MatchResult parts = REGEX_NUMBER_UNIT.exec(attr);
      if (parts != null) {
        String $1 = parts.getGroup(1);
        String $2 = parts.getGroup(2);
        cur = Double.parseDouble($1);
View Full Code Here

     * @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();

View Full Code Here

    }

    private void resultSelect(Event e) {
        if (resultHighlight != null) {
            GQuery high = resultHighlight;
            String highId = high.attr("id");

            resultClearHighlight();

            if (isMultiple) {
                resultDeactivate(high);
View Full Code Here

  }

  private void resultSelect(Event e) {
    if (resultHighlight != null) {
      GQuery high = resultHighlight;
      String highId = high.attr("id");

      resultClearHighlight();

      if (isMultiple) {
        resultDeactivate(high);
View Full Code Here

  }

  private void resultSelect(Event e) {
    if (resultHighlight != null) {
      GQuery high = resultHighlight;
      String highId = high.attr("id");

      resultClearHighlight();

      if (isMultiple) {
        resultDeactivate(high);
View Full Code Here

  }

  private void resultSelect(Event e) {
    if (resultHighlight != null) {
      GQuery high = resultHighlight;
      String highId = high.attr("id");

      resultClearHighlight();

      if (isMultiple) {
        resultDeactivate(high);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.