Package transition

Examples of transition.Transition


        fd.bottom = new FormAttachment(100, -5);
        fd.left = new FormAttachment(0, 5);
        fd.right = new FormAttachment(100, -5);
        btn.setLayoutData(fd);
       
        Transition t = new Transition(new Transitionable() {
            @Override
            public void setSelection(int index) {
                me.curImg = (index + 1) % me.imgs.length;
            }
       
            @Override
            public int getSelection() {
                return me.curImg;
            }
       
            @Override
            public Control getControl(int index) {
                return cnvs;
            }
       
            @Override
            public Composite getComposite() {
                return sShell;
            }
       
            @Override
            public int compare(int index1, int index2) {
                return Math.random() > 0.5 ? index1 : index2;
            }
       
            @Override
            public void addSelectionListener(SelectionListener listener) {
                btn.addSelectionListener(listener);
            }
        });
        t.setTransition(Transition.RANDOM_ROTATION);
        t.addTransitionListener(new TransitionListener() {
            public void transitionFinished(Transition transition) {
                System.out.println("End Of Transition! current item: "
                        + transition.getTransitionable().getSelection());
            }
        });
View Full Code Here


    sShell = new Shell();
    sShell.setText("Shell");
    sShell.setSize(new Point(800, 600));
    sShell.setLayout(new FillLayout());
    button = new Button(sShell, SWT.NONE);
    new Transition (new Transitionable() {
      public void setSelection(int index) {
      }
      public int getSelection() {
        return 0;
      }
View Full Code Here

       
        TabItem tbi3 = new TabItem(tf, SWT.NONE);
        tbi3.setText("Tab Item 3");
        tbi3.setControl(getComp3(tf));
       
        new Transition(tf).addTransitionListener(new TransitionListener() {
            public void transitionFinished(Transition transition) {
                System.out.println("End Of Transition! current item: "
                        + transition.getTransitionable().getSelection());
            }
        });
View Full Code Here

TOP

Related Classes of transition.Transition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.