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 thing
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);
}