我正在寻找一个效果库,我可以非常轻松地将其放入现有的GWT应用程序中。我想将库添加到构建路径,然后开始编写FX.fadeOut(thisWidget)
之类的内容来替换thisWidget.setVisible(false)
。
GWT有什么可用的东西可以做这种简单的事情吗?我正在编写一个商业用途的应用程序,它不会是开源的。
答案 0 :(得分:1)
答案 1 :(得分:1)
您还可以查看http://code.google.com/p/gwt-fx/
干杯
答案 2 :(得分:0)
这是一个全新的GWT-Mosaic库,具有非常好的动画效果。
答案 3 :(得分:0)
我需要淡入淡出效果。所以我没有使用库。 这是执行这些效果的代码。
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);
}