Package com.google.gwt.query.client.plugins.effects.Fx

Examples of com.google.gwt.query.client.plugins.effects.Fx.ColorFx


  public void testColorEffectParsing(){
    String html = "<div id='test' style='color: #112233'>Test</div>";
    $(e).html(html);

    ColorFx effect = (ColorFx) PropertiesAnimation.computeFxProp($("#test",e).get(0), "color", "#ffffff", false);
    assertEquals(17, effect.getStartColor()[0]); //#11
    assertEquals(34, effect.getStartColor()[1]); //#22
    assertEquals(51, effect.getStartColor()[2]); //#33

    assertEquals(255, effect.getEndColor()[0]);
    assertEquals(255, effect.getEndColor()[1]);
    assertEquals(255, effect.getEndColor()[2]);

    effect = (ColorFx) PropertiesAnimation.computeFxProp(e, "color", "rgb(255,255,255)", false);
    assertEquals(255, effect.getEndColor()[0]);
    assertEquals(255, effect.getEndColor()[1]);
    assertEquals(255, effect.getEndColor()[2]);

    effect = (ColorFx) PropertiesAnimation.computeFxProp(e, "color", "rgb(100%, 100%, 100%)", false);
    assertEquals(255, effect.getEndColor()[0]);
    assertEquals(255, effect.getEndColor()[1]);
    assertEquals(255, effect.getEndColor()[2]);

    effect = (ColorFx) PropertiesAnimation.computeFxProp(e, "color", "white", false);
    assertEquals(255, effect.getEndColor()[0]);
    assertEquals(255, effect.getEndColor()[1]);
    assertEquals(255, effect.getEndColor()[2]);
  }
View Full Code Here


      }
    } else {
      initialColor = GQuery.$(e).css(key, true);
    }

    return new ColorFx(key, initialColor, val);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.query.client.plugins.effects.Fx.ColorFx

Copyright © 2018 www.massapicom. 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.