Interface IUIPanelAnimation

    • Field Detail

      • ANIMATION_PROP_NAME

        static final java.lang.String ANIMATION_PROP_NAME
        The animation property name "animation".
        See Also:
        Constant Field Values
      • ANIMATION_NO_CSS3_FLAG

        static final int ANIMATION_NO_CSS3_FLAG
        Animation bit to add to remove CSS3 animations.
        See Also:
        Constant Field Values
      • ANIMATION_NO_SCROLL_FLAG

        static final int ANIMATION_NO_SCROLL_FLAG
        Animation bit to add to remove Scroll animations.
        See Also:
        Constant Field Values
      • ANIMATION_DEFAULT

        static final int ANIMATION_DEFAULT
        The animation composite value: default (-1).
        See Also:
        Constant Field Values
      • ANIMATION_NONE

        static final int ANIMATION_NONE
        The animation composite value: none (0).
        See Also:
        Constant Field Values
      • ANIMATION_FADE_FAST

        static final int ANIMATION_FADE_FAST
        The animation composite value: fade fast (1).
        See Also:
        Constant Field Values
      • ANIMATION_FADE_NORMAL

        static final int ANIMATION_FADE_NORMAL
        The animation composite value: fade normal (10).
        See Also:
        Constant Field Values
      • ANIMATION_FADE_SLOW

        static final int ANIMATION_FADE_SLOW
        The animation composite value: fade slow (1).
        See Also:
        Constant Field Values
      • ANIMATION_FADE_SLOWER

        static final int ANIMATION_FADE_SLOWER
        The animation composite value: fade slower (1000).
        See Also:
        Constant Field Values
      • ANIMATION_FADE_SLOWEST

        static final int ANIMATION_FADE_SLOWEST
        The animation composite value: fade slowest (10000), not recommended, use for testing purposes only.
        See Also:
        Constant Field Values
      • ANIMATION_TYPE_NONE

        static final int ANIMATION_TYPE_NONE
        Animation type: none.
        See Also:
        Constant Field Values
      • ANIMATION_TYPE_FADE

        static final int ANIMATION_TYPE_FADE
        Animation type: fade.
        See Also:
        Constant Field Values
      • ANIMATION_TYPE_SLIDE

        static final int ANIMATION_TYPE_SLIDE
        Animation type: slide.
        See Also:
        Constant Field Values
      • ANIMATION_TYPE_COVER

        static final int ANIMATION_TYPE_COVER
        Animation type: cover.
        See Also:
        Constant Field Values
      • ANIMATION_TYPE_REVEAL

        static final int ANIMATION_TYPE_REVEAL
        Animation type: reveal.
        See Also:
        Constant Field Values
      • ANIMATION_SPEED_FAST

        static final int ANIMATION_SPEED_FAST
        Animation speed: fast (100 ms).
        See Also:
        Constant Field Values
      • ANIMATION_SPEED_NORMAL

        static final int ANIMATION_SPEED_NORMAL
        Animation speed: normal (350 ms).
        See Also:
        Constant Field Values
      • ANIMATION_SPEED_SLOW

        static final int ANIMATION_SPEED_SLOW
        Animation speed: slow (600 ms).
        See Also:
        Constant Field Values
      • ANIMATION_SPEED_SLOWER

        static final int ANIMATION_SPEED_SLOWER
        Animation speed: slower (1 second).
        See Also:
        Constant Field Values
      • ANIMATION_SPEED_SLOWEST

        static final int ANIMATION_SPEED_SLOWEST
        Animation speed: slowest (10 seconds). Do not use this speed, it is intended for testing.
        See Also:
        Constant Field Values
    • Method Detail

      • getAnimationValue

        static int getAnimationValue​(int type,
                                     int direction,
                                     int speed)
        Gets the animation value.
        Parameters:
        type - The animation type ANIMATION_TYPE_nnn values.
        direction - The direction is 4=left, 6=right, 8=up, 2=down (used for directional types only).
        speed - The speed is ANIMATION_SPEED_nnn values.
        Throws:
        java.lang.IllegalArgumentException - For invalid parameters.
      • getOppositeAnimation

        static int getOppositeAnimation​(int animation)
        Gets the opposite animation composite value from an animation composite value, i.e. if an animation is slide right, the opposite is slide left, reveal opposite of cover with opposite direction, etc.
        Parameters:
        animation - The animation composite value.
        Returns:
        The opposite animation composite value, or ANIMATION_DEFAULT if no opposite is found.
      • setAnimation

        default boolean setAnimation​(int animation)
        Sets the animation when a panel is replaced by another.

        This call must be made prior to the panel removal and can be called programmatically. This method is also called for e.g. UI actions that also can specify the panel animation.

        Parameters:
        animation - The animation composite value: values ANIMATION_*.
        Returns:
        true for change, false for no change.
      • isAnimationPropPrivate

        boolean isAnimationPropPrivate()
        Returns if the animation property is private or not.
        Returns:
        Typically true for actions, false for panels.
      • setAnimation

        default boolean setAnimation​(IUIPanelAnimation.Type type,
                                     IUIPanelAnimation.Direction direction,
                                     IUIPanelAnimation.Speed speed)
        Sets the animation when a panel is replaced by another.

        This call must be made prior to the panel removal and can be called programmatically. This method is also called for e.g. UI actions that also can specify the panel animation.

        The animation types NONE and FADE are not affected by direction, but the parameter cannot be null.

        Parameters:
        type - The animation type.
        direction - The animation direction.
        speed - The animation speed.
        Returns:
        true for change, false for no change.
      • getAnimation

        default int getAnimation()
        Gets the currently defined animation when this panel is going to be replaced.
        Returns:
        The animation composite value, or ANIMATION_DEFAULT if none other is defined.
      • getAnimation

        default int getAnimation​(int defaultAnimation)
        Gets the currently defined animation when this panel is going to be replaced.
        Parameters:
        defaultAnimation - The default animation to use if not defined.
        Returns:
        The animation composite value, or the defaultAnimation if none other is defined.
      • getAnimationType

        default IUIPanelAnimation.Type getAnimationType()
        Gets the animation type.
        Returns:
        The animation type, defaults to NONE.
      • getAnimationDirection

        default IUIPanelAnimation.Direction getAnimationDirection()
        Gets the animation direction.
        Returns:
        The animation direction, defaults to RIGHT.
      • getAnimationSpeed

        default IUIPanelAnimation.Speed getAnimationSpeed()
        Gets the animation speed.
        Returns:
        The animation speed, defaults to NORMAL.
      • getAnimationDescription

        default java.lang.String getAnimationDescription()
        Gets the animation description as a "debug" string.
        Returns:
        The string.
      • getAnimationDescription

        static java.lang.String getAnimationDescription​(int animation)
        Gets the animation description as a "debug" string.
        Parameters:
        animation - The composite animation value.
        Returns:
        The string.