Examples of TimingTarget


Examples of org.jdesktop.core.animation.timing.TimingTarget

      }
     
      final Bounds from = Bounds.fromRectangle(getRenderBounds());
      final Bounds to = Bounds.fromXYWidthHeight(x, y, width, height);
     
      TimingTarget timingTarget = new TimingTargetAdapter() {
        @Override
        public void timingEvent(Animator source, double fraction) {
          int left = (int )Math.round(from.getLeft() + (to.getLeft() - from.getLeft()) * fraction);
          int top = (int )Math.round(from.getTop() + (to.getTop() - from.getTop()) * fraction);
          int right = (int )Math.round(from.getRight() + (to.getRight() - from.getRight()) * fraction);
 
View Full Code Here

Examples of org.jdesktop.core.animation.timing.TimingTarget

      }
     
      final RGB from = getRenderForeground();
      final RGB to = new RGB(red, green, blue);
     
      TimingTarget timingTarget = new TimingTargetAdapter() {
        @Override
        public void timingEvent(Animator source, double fraction) {
          int red = (int )Math.round(from.red + (to.red - from.red) * fraction);
          int green = (int )Math.round(from.green + (to.green - from.green) * fraction);
          int blue = (int )Math.round(from.blue + (to.blue - from.blue) * fraction);
 
View Full Code Here

Examples of org.jdesktop.core.animation.timing.TimingTarget

      }
     
      final RGB from = getRenderBackground();
      final RGB to = new RGB(red, green, blue);
     
      TimingTarget timingTarget = new TimingTargetAdapter() {
        @Override
        public void timingEvent(Animator source, double fraction) {
          int red = (int )Math.round(from.red + (to.red - from.red) * fraction);
          int green = (int )Math.round(from.green + (to.green - from.green) * fraction);
          int blue = (int )Math.round(from.blue + (to.blue - from.blue) * fraction);
 
View Full Code Here

Examples of org.jdesktop.core.animation.timing.TimingTarget

     
      if (from.equals(to)) {
        return;
      }
     
      TimingTarget timingTarget = new TimingTargetAdapter() {

        @Override
        public void timingEvent(Animator source, double fraction) {
          double doubleLeft = from.getLeft() + (to.getLeft() - from.getLeft()) * fraction;
          double doubleRight = from.getRight() + (to.getRight() - from.getRight()) * fraction;
 
View Full Code Here

Examples of org.jdesktop.core.animation.timing.TimingTarget

      if (from.red == red && from.green == green && from.blue == blue) {
        return;
      }
     
      TimingTarget timingTarget = new TimingTargetAdapter() {
       
        @Override
        public void timingEvent(Animator source, double fraction) {
          double doubleRed = from.red + (red - from.red) * fraction;
          double doubleGreen = from.green + (green - from.green) * fraction;
 
View Full Code Here

Examples of org.jdesktop.core.animation.timing.TimingTarget

      }
     
      final Bounds from = Bounds.fromRectangle(getBounds());
      final Bounds to = Bounds.fromXYWidthHeight(x, y, width, height);
     
      TimingTarget timingTarget = new TimingTargetAdapter() {
        @Override
        public void timingEvent(Animator source, double fraction) {
          double leftDiff = (to.getLeft() - from.getLeft()) * fraction;
          double rightDiff = (to.getRight() - from.getRight()) * fraction;
          double topDiff = (to.getTop() - from.getTop()) * fraction;
 
View Full Code Here

Examples of org.jdesktop.core.animation.timing.TimingTarget

        return;
      }
     
      final RGB from = new RGB(foreground.red, foreground.green, foreground.blue);
     
      TimingTarget timingTarget = new TimingTargetAdapter() {
        @Override
        public void timingEvent(Animator source, double fraction) {
          double redDiff = (red - from.red) * fraction;
          double greenDiff = (green - from.green) * fraction;
          double blueDiff = (blue - from.blue) * fraction;
 
View Full Code Here

Examples of org.jdesktop.core.animation.timing.TimingTarget

        return;
      }
     
      final RGB from = new RGB(background.red, background.green, background.blue);
     
      TimingTarget timingTarget = new TimingTargetAdapter() {
        @Override
        public void timingEvent(Animator source, double fraction) {
          double redDiff = (red - from.red) * fraction;
          double greenDiff = (green - from.green) * fraction;
          double blueDiff = (blue - from.blue) * fraction;
 
View Full Code Here

Examples of org.jdesktop.core.animation.timing.TimingTarget

      if (old.background == null) {
        old.background = BACK_ON;
      }
     
      if (!RT.equals(old, pressed) && !selected.contains(old)) {
        TimingTarget target = new BackgroundChangeTimingTarget(old, old.background, BACK_OFF);
        old.animator = new Animator.Builder().addTarget(target)
          .setDuration(160, TimeUnit.MILLISECONDS).build();
        old.animator.start();
      }
    }
   
    if (neo != null) {
      if (neo.animator != null) {
        neo.animator.cancel();
        neo.animator = null;
      }
     
      if (neo.background == null) {
        neo.background = BACK_OFF;
      }
     
      if (!RT.equals(neo, pressed) && !selected.contains(neo)) {
        TimingTarget target = new BackgroundChangeTimingTarget(neo, neo.background, BACK_ON);
        neo.animator = new Animator.Builder().addTarget(target)
          .setDuration(160, TimeUnit.MILLISECONDS).build();
        neo.animator.start();
      }
    }
View Full Code Here

Examples of org.jdesktop.core.animation.timing.TimingTarget

    }

    public void start() {
      Rectangle bounds = target.getBounds();
     
      TimingTarget tt = new TimingTargetAdapter() {

        @Override
        public void timingEvent(Animator source, double fraction) {
          double doubleDistance = (to - from) * fraction;
          int intDistance = (int )Math.round(doubleDistance);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.