Package com.vlsolutions.swing.docking.animation

Examples of com.vlsolutions.swing.docking.animation.ComponentAnimator$AnimationActionListener


      } else {
         newBounds = new Rectangle(bounds.x,bounds.y, getWidth(), 20);
         animSpeed = getHeight()/ 800f; //  pix / sec
      }
     
      ComponentAnimator canim = new ComponentAnimator(this, bounds, newBounds, animSpeed);
      canim.addAnimationListener(new AnimationListener() {
        public void animation(AnimationEvent e) {
          if (e.getState() == AnimationEvent.ANIMATION_END){
            gripperListener.resetBorder();
            finishAnimation(collapsed);
          }
        }
      });
      gripperListener.installDragBorder();
      canim.start();
    } else {
      // no animation when expanding
      finishAnimation(collapsed);
    }
   
View Full Code Here


        Insets i2 = getComponentInsets();


        switch (selectedButton.getZone()) {
            case DockingConstants.INT_HIDE_TOP:
                new ComponentAnimator(this,
                        new Rectangle(i.left,
                        i.top,
                        bounds.width - i.left - i.right, 0),
                        new Rectangle(i.left,
                        i.top,
                        bounds.width - i.left - i.right,
                        bestDimension.height + i2.top + i2.bottom),
                        AutoHidePolicy.getPolicy().getExpansionDuration() / 1000f,
                        animationControler);
                break;
            case DockingConstants.INT_HIDE_BOTTOM:
                new ComponentAnimator(this,
                        new Rectangle(i.left,
                        bounds.height - i.bottom,
                        bounds.width - i.left - i.right, 0),
                        new Rectangle(i.left,
                        bounds.height - bestDimension.height - i.bottom - i2.top - i2.bottom,
                        bounds.width - i.left - i.right,
                        bestDimension.height + i2.top + i2.bottom),
                        AutoHidePolicy.getPolicy().getExpansionDuration() / 1000f,
                        animationControler);
                break;
            case DockingConstants.INT_HIDE_LEFT:
                new ComponentAnimator(this,
                        new Rectangle(i.left,
                        i.top,
                        0, bounds.height - i.top - i.bottom),
                        new Rectangle(i.left,
                        i.top,
                        bestDimension.width + i2.left + i2.right,
                        bounds.height - i.top - i.bottom),
                        AutoHidePolicy.getPolicy().getExpansionDuration() / 1000f,
                        animationControler);
                break;
            case DockingConstants.INT_HIDE_RIGHT:
                new ComponentAnimator(this,
                        new Rectangle(bounds.width - i.right,
                        i.top,
                        0, bounds.height - i.top - i.bottom),
                        new Rectangle(bounds.width - bestDimension.width - i.right - i2.left - i2.right,
                        i.top,
View Full Code Here

TOP

Related Classes of com.vlsolutions.swing.docking.animation.ComponentAnimator$AnimationActionListener

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.