【问题标题】:What effects libraries are available for GWT for commercial use?GWT 有哪些效果库可用于商业用途?
【发布时间】:2010-11-05 01:42:39
【问题描述】:

我正在寻找一个可以非常非常轻松地放入现有 GWT 应用程序的效果库。我想将库添加到我的构建路径中,然后开始编写 FX.fadeOut(thisWidget) 之类的内容来替换 thisWidget.setVisible(false)

是否有任何可用于 GWT 的可靠而小型的东西来完成这种简单的事情?我正在编写一个不会开源的商业应用程序。

【问题讨论】:

    标签: gwt effects


    【解决方案1】:

    您也可以查看http://code.google.com/p/gwt-fx/

    干杯

    【讨论】:

    • gwt-fx 是我能找到的最轻量级的库。它具有可接受的灵活性,并且代码简单且易于扩展。
    【解决方案2】:

    查看GQuery,这是一个用于 GWT 的 JQuery 克隆。效果类的文档是here。 它是根据 Apache 许可证 2.0 获得许可的。

    【讨论】:

      【解决方案3】:

      看看GWT-Mosaic2g

      这是一个全新的 GWT-Mosaic 库,具有非常好的动画效果。

      【讨论】:

        【解决方案4】:

        我只需要淡入淡出效果。所以我没有使用图书馆。 这是执行这些效果的代码。

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

        【讨论】:

          猜你喜欢
          • 2010-11-20
          • 2012-07-21
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2013-06-28
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多