1 /*
   2  * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.animation;
  27 
  28 import com.sun.scenario.animation.AbstractMasterTimer;
  29 import com.sun.scenario.animation.shared.ClipEnvelope;
  30 import com.sun.scenario.animation.shared.PulseReceiver;
  31 import javafx.util.Duration;
  32 
  33 public abstract class AnimationShim extends Animation {
  34 
  35     public AnimationShim() {
  36         super();
  37     }
  38 
  39     public AnimationShim(AbstractMasterTimer timer) {
  40         super(timer);
  41     }
  42 
  43     public AnimationShim(AbstractMasterTimer timer, ClipEnvelope clipEnvelope, int resolution) {
  44         super(timer, clipEnvelope, resolution);
  45     }
  46 
  47     public ClipEnvelope get_clipEnvelope() {
  48         return clipEnvelope;
  49     }
  50 
  51     @Override
  52     public void doPause() {
  53         super.doPause();
  54     }
  55 
  56     @Override
  57     public void doStart(boolean forceSync) {
  58         super.doStart(forceSync);
  59     }
  60 
  61     @Override
  62     public void setCurrentRate(double currentRate) {
  63         super.setCurrentRate(currentRate);
  64     }
  65 
  66     @Override
  67     public void setCurrentTicks(long ticks) {
  68         super.setCurrentTicks(ticks);
  69     }
  70 
  71     @Override
  72     public boolean startable(boolean forceSync) {
  73         return super.startable(forceSync);
  74     }
  75 
  76     @Override
  77     public void doStop() {
  78         super.doStop();
  79     }
  80 
  81     @Override
  82     public void sync(boolean forceSync) {
  83         super.sync(forceSync);
  84     }
  85 
  86     @Override
  87     public void doTimePulse(long elapsedTime) {
  88         super.doTimePulse(elapsedTime);
  89     }
  90 
  91     @Override
  92     public void pauseReceiver() {
  93         super.pauseReceiver();
  94     }
  95 
  96     @Override
  97     public void resumeReceiver() {
  98         super.resumeReceiver();
  99     }
 100 
 101     public void shim_setCycleDuration(Duration value) {
 102         setCycleDuration(value);
 103     }
 104 
 105     @Override
 106     public void startReceiver(long delay) {
 107         super.startReceiver(delay);
 108     }
 109 
 110     public PulseReceiver shim_pulseReceiver() {
 111         return pulseReceiver;
 112     }
 113 
 114     public void shim_finished() {
 115         finished();
 116     }
 117 
 118     @Override
 119     abstract public void doPlayTo(long currentTicks, long cycleTicks);
 120 
 121     @Override
 122     abstract public void doJumpTo(long currentTicks, long cycleTicks, boolean forceJump);
 123 
 124     //-------------------------------
 125 
 126     public static void finished(Animation a) {
 127         a.finished();
 128     }
 129 
 130     public static void doStart(Animation a, boolean forceSync) {
 131         a.doStart(forceSync);
 132     }
 133 
 134     public static boolean startable(Animation a, boolean forceSync) {
 135         return a.startable(forceSync);
 136     }
 137 
 138 }