Documentation of 'visad.java2d.AnimationControlJ2D' Java class
AnimationControlJ2D
visad.java2d

Class AnimationControlJ2D

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, AnimationControl, AVControl


    public class AnimationControlJ2D
    extends AVControlJ2D
    implements java.lang.Runnable, AnimationControl
    AnimationControlJ2D is the VisAD class for controlling Animation display scalars under Java2D.

    WLH - manipulate a list of VisADSwitch nodes in scene graph.

    See Also:
    Serialized Form
    • Method Detail

      • nullControl

        public void nullControl()
        Description copied from class: Control
        end this control (called by ScalarMap.nullDisplay())
        Overrides:
        nullControl in class Control
      • run

        public void run()
        Description copied from interface: AnimationControl
        a single invocation implements anmation behavior until stop() is called
        Specified by:
        run in interface java.lang.Runnable
        Specified by:
        run in interface AnimationControl
      • getCurrent

        public int getCurrent()
        get the current ordinal step number
        Specified by:
        getCurrent in interface AnimationControl
        Returns:
        the current ordinal step number
      • setCurrent

        public void setCurrent(int c)
                        throws VisADException,
                               java.rmi.RemoteException
        set the current ordinal step number = c
        Specified by:
        setCurrent in interface AnimationControl
        Parameters:
        c - - value for current ordinal step number
        Throws:
        VisADException - - a VisAD error occurred
        java.rmi.RemoteException - - an RMI error occurred
      • setCurrent

        public void setCurrent(double value)
                        throws VisADException,
                               java.rmi.RemoteException
        set the current step by the value of the RealType mapped to Display.Animation
        Specified by:
        setCurrent in interface AnimationControl
        Parameters:
        value - - RealType value that is converted to an ordinal step number
        Throws:
        VisADException - - a VisAD error occurred
        java.rmi.RemoteException - - an RMI error occurred
      • setDirection

        public void setDirection(boolean dir)
                          throws VisADException,
                                 java.rmi.RemoteException
        Set the animation direction.
        Specified by:
        setDirection in interface AnimationControl
        Parameters:
        dir - true for forward, false for backward
        Throws:
        VisADException - Couldn't create necessary VisAD object. The direction remains unchanged.
        java.rmi.RemoteException - Java RMI exception
      • getDirection

        public boolean getDirection()
        Get the animation direction.
        Specified by:
        getDirection in interface AnimationControl
        Returns:
        true for forward, false for backward
      • getStep

        public long getStep()
        Return the dwell time for the current step
        Specified by:
        getStep in interface AnimationControl
        Returns:
        the dwell time for the current step (in ms)
      • getSteps

        public long[] getSteps()
        return an array of the dwell times for all the steps.
        Specified by:
        getSteps in interface AnimationControl
        Returns:
        an array of the dwell times for all the steps (in ms)
      • setStep

        public void setStep(int st)
                     throws VisADException,
                            java.rmi.RemoteException
        Set the dwell rate between animation steps to a constant value
        Specified by:
        setStep in interface AnimationControl
        Parameters:
        st - dwell time in milliseconds
        Throws:
        VisADException - Couldn't create necessary VisAD object. The dwell time remains unchanged.
        java.rmi.RemoteException - Java RMI exception
      • setSteps

        public void setSteps(int[] steps)
                      throws VisADException,
                             java.rmi.RemoteException
        set the dwell time for individual steps.
        Specified by:
        setSteps in interface AnimationControl
        Parameters:
        steps - an array of dwell rates for each step in the animation If the length of the array is less than the number of frames in the animation, the subsequent step values will be set to the value of the last step.
        Throws:
        VisADException - Couldn't create necessary VisAD object. The dwell times remain unchanged.
        java.rmi.RemoteException - Java RMI exception
      • takeStep

        public void takeStep()
                      throws VisADException,
                             java.rmi.RemoteException
        advance one step (forward or backward)
        Specified by:
        takeStep in interface AnimationControl
        Throws:
        VisADException - Couldn't create necessary VisAD object. No step is taken.
        java.rmi.RemoteException - Java RMI exception
      • init

        public void init()
                  throws VisADException
        Description copied from interface: AnimationControl
        actually set Switches (Java3D) or VisADSwitches (Java2D) to child nodes corresponding to current ordinal step number
        Specified by:
        init in interface AnimationControl
        Throws:
        VisADException - - a VisAD error occurred.
      • getSet

        public Set getSet()
        Specified by:
        getSet in interface AnimationControl
        Returns:
        Set of RealType values for animation steps, in RealType mapped to Animation
      • setSet

        public void setSet(Set s)
                    throws VisADException,
                           java.rmi.RemoteException

        Sets the set of times in this animation control. If the argument set is equal to the current set, then nothing is done.

        Specified by:
        setSet in interface AnimationControl
        Parameters:
        s - The set of times.
        Throws:
        VisADException - if a VisAD failure occurs.
        java.rmi.RemoteException - if a Java RMI failure occurs.
      • setSet

        public void setSet(Set s,
                           boolean noChange)
                    throws VisADException,
                           java.rmi.RemoteException

        Sets the set of times in this animation control. If the argument set is equal to the current set, then nothing is done.

        Specified by:
        setSet in interface AnimationControl
        Parameters:
        s - The set of times.
        noChange - changeControl(!noChange) to not trigger re-transform, used by ScalarMap.setRange
        Throws:
        VisADException - if a VisAD failure occurs.
        java.rmi.RemoteException - if a Java RMI failure occurs.
      • getOn

        public boolean getOn()
        return true if automatic stepping is on
        Specified by:
        getOn in interface AnimationControl
        Returns:
        true if automatic stepping is on, false otherwise
      • setOn

        public void setOn(boolean o)
                   throws VisADException,
                          java.rmi.RemoteException
        Set automatic stepping on or off.
        Specified by:
        setOn in interface AnimationControl
        Parameters:
        o - true = turn stepping on, false = turn stepping off
        Throws:
        VisADException - Couldn't create necessary VisAD object. No change in automatic stepping occurs.
        java.rmi.RemoteException - Java RMI exception
      • toggle

        public void toggle()
                    throws VisADException,
                           java.rmi.RemoteException
        toggle automatic stepping between off and on
        Specified by:
        toggle in interface AnimationControl
        Throws:
        VisADException - Couldn't create necessary VisAD object. No change in automatic stepping occurs.
        java.rmi.RemoteException - Java RMI exception
      • subSetTicks

        public void subSetTicks()
        Description copied from class: Control
        run setTicks on any sub-Controls; this default for no sub-Controls
        Overrides:
        subSetTicks in class Control
      • subCheckTicks

        public boolean subCheckTicks(DataRenderer r,
                                     DataDisplayLink link)
        Description copied from class: Control
        run checkTicks on any sub-Controls this default for no sub-Controls
        Overrides:
        subCheckTicks in class Control
        Parameters:
        r - DataRenderer to check if changes to this Control require re-transform
        link - DataDisplayLink involved in decision whether changes to this Control require re-transform
        Returns:
        'logical or' of values from checkTicks on sub-Controls
      • subPeekTicks

        public boolean subPeekTicks(DataRenderer r,
                                    DataDisplayLink link)
        Description copied from class: Control
        run peekTicks on any sub-Controls this default for no sub-Controls
        Overrides:
        subPeekTicks in class Control
        Parameters:
        r - DataRenderer to check if changes to this Control require re-transform
        link - DataDisplayLink involved in decision whether changes to this Control require re-transform
        Returns:
        'logical or' of values from peekTicks on sub-Controls
      • subResetTicks

        public void subResetTicks()
        Description copied from class: Control
        run resetTicks on any sub-Controls this default for no sub-Controls
        Overrides:
        subResetTicks in class Control
      • getSaveString

        public java.lang.String getSaveString()
        get a String that can be used to reconstruct this AnimationControl later
        Specified by:
        getSaveString in interface AVControl
        Specified by:
        getSaveString in class Control
        Returns:
        String representation of this Control
      • setSaveString

        public void setSaveString(java.lang.String save)
                           throws VisADException,
                                  java.rmi.RemoteException
        reconstruct this AnimationControl using the specified save string
        Specified by:
        setSaveString in interface AVControl
        Specified by:
        setSaveString in class Control
        Parameters:
        save - - String representation for reconstruction
        Throws:
        VisADException - if a VisAD error occurs
        java.rmi.RemoteException - if an RMI error occurs
      • syncControl

        public void syncControl(Control rmt)
                         throws VisADException
        copy the state of a remote control to this control
        Specified by:
        syncControl in class Control
        Parameters:
        rmt - remote Control whose state is copied
        Throws:
        VisADException - if a VisAD error occurs
      • equals

        public boolean equals(java.lang.Object o)
        Description copied from class: Control
        Indicates whether or not this instance equals an Object
        Overrides:
        equals in class AVControlJ2D
        Parameters:
        o - an Object
        Returns:
        true if and only if this instance is equal to o
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Control
        Returns:
        a simple String representation of this Control
      • setComputeSet

        public void setComputeSet(boolean compute)
        Set the flag to automatically compute the animation set if it is null
        Specified by:
        setComputeSet in interface AnimationControl
        Parameters:
        compute - false to allow application to control set computation if set is null.
      • getComputeSet

        public boolean getComputeSet()
        Get the flag to automatically compute the animation set if it is null
        Specified by:
        getComputeSet in interface AnimationControl
        Returns:
        true if should compute

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.