What effects libraries are available for GWT for commercial use?

人盡茶涼 提交于 2019-12-01 02:03:55

You can also check http://code.google.com/p/gwt-fx/

Cheers

Check out GQuery, a JQuery clone for GWT. The docs for the effects class are here. It is licensed under the Apache License 2.0.

Take a look to GWT-Mosaic2g

It's a complete new GWT-Mosaic library, with really nice animation effects.

I needed just fade in and fade out effects. So I didn't use a library. This is the code doing these effects.

    private void fadeIn(final Element el) {
    final int size = 11;
    Timer timer = new Timer() {
        private int counter = 0;
        @Override
        public void run() {                     
            if (counter == size) {
                cancel();
                return;
            }
            double opacity = (double) (counter) /  10;                      
            el.getStyle().setOpacity(opacity);                      
            counter++;      
        }
    };
    timer.scheduleRepeating(100);   


}

private void fadeOut(final Element el) {
    final int size = 11;
    Timer timer = new Timer() {
        private int counter = 0;
        @Override
        public void run() {                     
            if (counter == size) {
                cancel();
                return;
            }
            double opacity = (double) (10 - counter) /  10;                     
            el.getStyle().setOpacity(opacity);                      
            counter++;      
        }
    };
    timer.scheduleRepeating(100);       
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!