Class Animation

java.lang.Object
com.vaadin.flow.component.Component
de.mekaso.vaadin.addon.compani.animation.Animation
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, com.vaadin.flow.dom.DomEventListener, Serializable
Direct Known Subclasses:
AnimationTypes.AttentionSeekerAnimation, AnimationTypes.EntranceAnimation, AnimationTypes.HideAnimation, AnimationTypes.ShowAnimation, AnimationTypes.TextAnimation

@Tag("compani-animation") public abstract class Animation extends com.vaadin.flow.component.Component implements com.vaadin.flow.dom.DomEventListener
The animation for a component.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.vaadin.flow.component.HasStyle
    the animated component;
    protected String[]
     
    protected com.vaadin.flow.dom.DomListenerRegistration
     
    protected Effect
    an effect.
    static final String
    Url of the stylesheet for the addon.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.shared.Registration
    addAnimationEndListener(com.vaadin.flow.component.ComponentEventListener<AnimationEndEvent> listener)
    Register an listener that is triggered by an animation end event.
    protected abstract String[]
     
    void
    handleEvent(com.vaadin.flow.dom.DomEvent event)
    Method is called after an animation has ended.
    boolean
    Detect text animations.
    void
    Start an animation.
    void
    Stop an animation.

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Field Details

    • STYLES

      public static final String STYLES
      Url of the stylesheet for the addon. Must be included in one of your layouts.
      See Also:
    • effect

      protected Effect effect
      an effect.
    • animatedComponent

      protected com.vaadin.flow.component.HasStyle animatedComponent
      the animated component;
    • domListenerRegistration

      protected com.vaadin.flow.dom.DomListenerRegistration domListenerRegistration
    • currentEffect

      protected String[] currentEffect
  • Constructor Details

    • Animation

      public Animation()
  • Method Details

    • fetchCssClasses

      protected abstract String[] fetchCssClasses()
    • start

      public void start()
      Start an animation.
    • stop

      public void stop()
      Stop an animation.
    • addAnimationEndListener

      public com.vaadin.flow.shared.Registration addAnimationEndListener(com.vaadin.flow.component.ComponentEventListener<AnimationEndEvent> listener)
      Register an listener that is triggered by an animation end event.
      Parameters:
      listener - a listener
      Returns:
      a registration
    • handleEvent

      public void handleEvent(com.vaadin.flow.dom.DomEvent event)
      Method is called after an animation has ended.
      Specified by:
      handleEvent in interface com.vaadin.flow.dom.DomEventListener
    • isTextEffect

      public boolean isTextEffect()
      Detect text animations.
      Returns:
      true for text animations