1. #1
    Ext User
    Join Date
    Feb 2009
    Posts
    3
    Vote Rating
    0
    wetar is on a distinguished road

      0  

    Default FX Scale

    FX Scale


    Here's an Effect for Scaling:

    Code:
    import com.extjs.gxt.ui.client.core.El;
    import com.extjs.gxt.ui.client.fx.BaseEffect;
    
    class Scale extends BaseEffect {
    
        private int fromWidth, toWidth;
        private int fromHeight, toHeight;
    
        Scale(El el, int width, int height) {
            super(el);
            el.makePositionable();
            fromWidth = el.getWidth();
            fromHeight = el.getHeight();
    
            toWidth = width;
            toHeight = height;
        }
    
        @Override
        public void onUpdate(double progress) {
            int width = (int) getValue(fromWidth, toWidth, progress);
            int height = (int) getValue(fromHeight, toHeight, progress);
            el.setSize(width, height);
        }
    
        @Override
        public void onComplete() {
            el.setSize(toWidth, toHeight);
        }
    
    }
    And an Example how to use it with images:
    Code:
        public void onModuleLoad() {
            Image image = new Image("http://code.google.com/webtoolkit/images/gwt-logo.png");
            final WidgetComponent wc = new WidgetComponent(image);
            image.addClickListener(new ClickListener() {
                public void onClick(Widget sender) {
                    new Fx(new FxConfig(2000)).run(new Scale(wc.el(), Window.getClientWidth(), Window.getClientHeight()));
                }
            });
            RootPanel.get().add(wc);
    
        }

  2. #2
    Ext GWT Premium Member takayser's Avatar
    Join Date
    Oct 2008
    Location
    Lucerne, Switzerland
    Posts
    188
    Vote Rating
    0
    takayser is an unknown quantity at this point

      0  

    Default


    Nice, thank you!!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi