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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddAnimationEndListener(com.vaadin.flow.component.ComponentEventListener<AnimationEndEvent> listener) Register an listener that is triggered by an animation end event.protected abstract String[]voidhandleEvent(com.vaadin.flow.dom.DomEvent event) Method is called after an animation has ended.booleanDetect text animations.voidstart()Start an animation.voidstop()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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
STYLES
Url of the stylesheet for the addon. Must be included in one of your layouts.- See Also:
-
effect
an effect. -
animatedComponent
protected com.vaadin.flow.component.HasStyle animatedComponentthe animated component; -
domListenerRegistration
protected com.vaadin.flow.dom.DomListenerRegistration domListenerRegistration -
currentEffect
-
-
Constructor Details
-
Animation
public Animation()
-
-
Method Details
-
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:
handleEventin interfacecom.vaadin.flow.dom.DomEventListener
-
isTextEffect
public boolean isTextEffect()Detect text animations.- Returns:
- true for text animations
-