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 Link icon

    • ANIMATION_PROP_NAME Link icon

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

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

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

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

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

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

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

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

      static final int ANIMATION_FADE_SLOWER
      The animation composite value: fade slower (1000).
      See Also:
    • ANIMATION_FADE_SLOWEST Link icon

      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 Link icon

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

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

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

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

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

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

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

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

      static final int ANIMATION_SPEED_SLOWER
      Animation speed: slower (1 second).
      See Also:
    • ANIMATION_SPEED_SLOWEST Link icon

      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 Link icon

    • getAnimationValue Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

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

      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 Link icon

      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 Link icon

      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 Link icon

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

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

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

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

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