Interface IUIPanelAnimation

All Superinterfaces:
IGProp<GProp<?>[]>, IPropCnr
All Known Subinterfaces:
IUIAction
All Known Implementing Classes:
AbstractUIAction, EditorVSAction, EMLItemProp, EMUISimpleDialog, EUIButton, EUIDialog, EUIImage, EUIMenuItem, EUIPanel, EUIPanelPart, MLItemProp, MUISimpleDialog, UIButton, UIDialog, UIImage, UIMenuItem, UIPanel, UIPanelBase, UIPanelPart, VSAction

public interface IUIPanelAnimation extends IPropCnr
Interface providing the API to manipulate panel animations when panels are replaced by another. The animation provides a type and a speed. A panel that has been displayed using an animation uses the opposite animation when going back to the previous panel.
Author:
Christopher Mindus
  • Field Details

    • ANIMATION_PROP_NAME

      static final String ANIMATION_PROP_NAME
      The animation property name "animation".
      See Also:
    • ANIMATION_NO_CSS3_FLAG

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

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

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

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

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

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

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

      static final int ANIMATION_FADE_SLOWER
      The animation composite value: fade slower (1000).
      See Also:
    • 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:
    • ANIMATION_TYPE_NONE

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

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

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

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

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

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

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

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

      static final int ANIMATION_SPEED_SLOWER
      Animation speed: slower (1 second).
      See Also:
    • 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:
  • Method Details

    • getAnimationValue

      static int getAnimationValue(IUIPanelAnimation.Type type, IUIPanelAnimation.Direction direction, IUIPanelAnimation.Speed speed)
      Gets the animation value.
      Parameters:
      type - The animation type.
      direction - The direction.
      speed - The speed.
      Returns:
      The integer direction value.
      Throws:
      IllegalArgumentException - For invalid parameters.
    • 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:
      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 String getAnimationDescription()
      Gets the animation description as a "debug" string.
      Returns:
      The string.
    • getAnimationDescription

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