home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / IDE / SUBARTIC / RELEASE.ZIP / sub_arctic / anim / animatable.java < prev    next >
Encoding:
Java Source  |  1996-10-04  |  5.6 KB  |  118 lines

  1. package sub_arctic.anim;
  2.  
  3. import sub_arctic.input.event;
  4. import sub_arctic.lib.interactor;
  5. import sub_arctic.input.focusable;
  6.  
  7. /**
  8.  * This is the input protocol interface for specifying that an object is
  9.  * animatable. Keep in mind that the object need <b>not</b>
  10.  * be an interactor, although this is usually the case. Objects
  11.  * other than interactors may need general purpose timing and
  12.  * this can be used for such a timing need. <P>
  13.  */
  14. public interface animatable extends focusable {
  15.  
  16.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  17.  
  18.   /**
  19.    * This gets called on your interactor when a transition gets started.
  20.    * The start_obj is the result of passing the start time (0.0) through
  21.    * your pacing function and then through the trajectory. Generally, this
  22.    * results in a Point, but other objects are possible. The user_info
  23.    * object is the object you supplied at the time you set yourself into
  24.    * the animation focus set.  This routine will be called for all transitions
  25.    * whose scheduled start time has past, even if there is not enough time
  26.    * to deliver any steps or if the end time has also passed.<p>
  27.    * 
  28.    * @param transition trans the transition being performed.
  29.    * @param trajectory traj the trajectory which is being used for this 
  30.    *                   transition.
  31.    * @param double start_t the amount of time (in the range [0.0, 1.0)) which 
  32.    *                       has already elapsed in this interval.
  33.    * @param Object start_obj the start time mapped through the trajectory
  34.    * @param event e the animation event causing this transition to be started
  35.    * @param Object user_info the object you supplied to the animation agent 
  36.    *                         when you entered its focus set (by scheduling a 
  37.    *                         transition)
  38.    */
  39.   public void start_transition(transition trans, trajectory traj,
  40.                    double start_t, Object start_obj, event e,
  41.                    Object user_info);
  42.  
  43.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  44.  
  45.   /**
  46.    * This called on your object to deliver one step of the animation.
  47.    * As with start_transition(), the start_object and end_object are the 
  48.    * result of passing the current time start and end time through your pacing 
  49.    * function then through your trajectory.  Note: start_transition() and 
  50.    * end_transition() will always be called, but steps may not be delivered if
  51.    * there is not enough time.<p>
  52.    *
  53.    * @param transition trans the transition being performed
  54.    * @param trajectory traj the trajectory which is being used for this 
  55.    *                        transition
  56.    * @param double start_t the amount of time (in the range [0.0, 1.0)) at the 
  57.    *                       beginning of this interval
  58.    * @param Object start_obj the start time mapped through the trajectory
  59.    * @param double end_t the amount of time (in the range [0.0, 1.0)) at the 
  60.    *                     end of this interval
  61.    * @param Object end_obj the end time mapped through the trajectory
  62.    * @param event e the animation event causing this transition to be started
  63.    * @param Object user_info the object you supplied to the animation agent 
  64.    *                         when you entered its focus set (by scheduling a 
  65.    *                         transition)
  66.    */
  67.   public void transition_step(transition trans, trajectory traj,
  68.                   double start_t, Object start_obj, 
  69.                   double end_t, Object end_obj,
  70.                   event e, Object user_info);
  71.  
  72.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  73.  
  74.   /**
  75.    * This is the last call for a transition and indicates that the animation
  76.    * transition is completed. Like the transition_step it gives you the start 
  77.    * and end objects based on your trajectory and pacing function.  This will 
  78.    * include the end of the time interval.  This routine is always invoked 
  79.    * (after a call to start_transition()) for transitions whose end time has 
  80.    * passed, even if there was not enough time for any steps.<p>
  81.    *
  82.    * @param transition trans the transition being performed
  83.    * @param trajectory traj the trajectory which is being used for this 
  84.    *                        transition
  85.    * @param double start_t the amount of time (in the range [0.0, 1.0)) at the 
  86.    *                       beginning of this interval
  87.    * @param Object start_obj the start time mapped through the trajectory
  88.    * @param double end_t the amount of time (1.0) at the end of this interval
  89.    * @param Object end_obj the end time mapped through the trajectory
  90.    * @param event e the animation event causing this transition to be started
  91.    * @param Object user_info the object you supplied to the animation agent 
  92.    *                         when you entered its focus set (by scheduling a 
  93.    *                         transition)
  94.    */
  95.   public void end_transition(transition trans, trajectory traj,
  96.                  double start_t, Object start_obj,
  97.                  double end_t, Object end_obj,
  98.                  event e, Object user_info);
  99.  
  100.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  101. }
  102. /*=========================== COPYRIGHT NOTICE ===========================
  103.  
  104. This file is part of the subArctic user interface toolkit.
  105.  
  106. Copyright (c) 1996 Scott Hudson and Ian Smith
  107. All rights reserved.
  108.  
  109. The subArctic system is freely available for most uses under the terms
  110. and conditions described in 
  111.   http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html 
  112. and appearing in full in the lib/interactor.java source file.
  113.  
  114. The current release and additional information about this software can be 
  115. found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
  116.  
  117. ========================================================================*/
  118.