1

I'm looking for an effects library that I can drop in to my existing GWT app really, really easily. I want to add the library to my build path and then start writing things like FX.fadeOut(thisWidget) to replace thisWidget.setVisible(false).

Is there anything solid and small available for GWT that can do this kind of simple thing? I'm writing an app for commercial use that will not be open source.

Riley Lark
  • 20,660
  • 15
  • 80
  • 128

4 Answers4

1

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.

Chris Boesing
  • 5,239
  • 3
  • 26
  • 30
1

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

Cheers

Jacob
  • 26
  • 1
  • gwt-fx was the lightest weight library I could find. It's got an acceptable amount of flexibility and the code is simple and easy to extend. – Riley Lark Nov 19 '10 at 15:36
0

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);       
}
iavci
  • 189
  • 1
  • 4
0

Take a look to GWT-Mosaic2g

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

Carlos Tasada
  • 4,438
  • 1
  • 23
  • 26