Class AbstractAnimations

  • All Implemented Interfaces:
    IsDefaultAnimations, IsAnimations

    public abstract class AbstractAnimations
    extends NativeObjectContainer
    implements IsAnimations
    Abstract configuration to animate charts out of the box.
    A number of options are provided to configure how the animation looks and how long it takes.
    This configuration item is configuring the common animations properties, ANIMATIONS name space.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • AbstractAnimations

        protected AbstractAnimations​(AbstractNode parent,
                                     IsDefaultAnimations defaultValues,
                                     NativeObject nativeObject)
        Creates a animations config to use for chart configuration, wrapping a native object instance.
        Parameters:
        parent - the native object container which animations belongs to.
        defaultValues - default provider
        nativeObject - native object to map java script properties
    • Method Detail

      • contains

        public boolean contains​(Key collection)
        Description copied from interface: IsDefaultAnimations
        Returns true if an animation collection instance is stored in the animation options.
        Specified by:
        contains in interface IsDefaultAnimations
        Parameters:
        collection - collection instance used to check in the animation options
        Returns:
        true if an animation collection instance is stored in the animation options
      • setEnabled

        public void setEnabled​(Key collection,
                               boolean enabled)
        Description copied from interface: IsAnimations
        Enables or disables an animation collection instance in the animation options.
        Specified by:
        setEnabled in interface IsAnimations
        Parameters:
        collection - collection instance used to check in the animation options
        enabled - if true it enables an animation collection
      • isEnabled

        public boolean isEnabled​(Key collection)
        Description copied from interface: IsAnimations
        Returns true if the animation collection is enabled, otherwise false.
        Specified by:
        isEnabled in interface IsAnimations
        Parameters:
        collection - collection instance used to check in the animation options
        Returns:
        true if the animation collection is enabled, otherwise false
      • get

        public AnimationCollection get​(Key collection)
        Description copied from interface: IsAnimations
        Returns an animation collection instance if stored in the animation options.
        Specified by:
        get in interface IsAnimations
        Specified by:
        get in interface IsDefaultAnimations
        Parameters:
        collection - collection instance used to get for animation options
        Returns:
        an animation collection instance or null if does not exists
      • set

        public void set​(Key collection,
                        AnimationCollection animationCollection)
        Description copied from interface: IsAnimations
        Sets an animation collection instance to store in the animation options.
        Specified by:
        set in interface IsAnimations
        Parameters:
        collection - collection instance used to get for animation options
        animationCollection - an animation collection instance to set
      • create

        public AnimationCollection create​(Key collection)
        Description copied from interface: IsAnimations
        Creates an animation collection instance and stores in the animation options.
        Specified by:
        create in interface IsAnimations
        Parameters:
        collection - collection key used to create the animation collections
        Returns:
        a collection animation options
      • delete

        public void delete​(Key collection)
        Description copied from interface: IsAnimations
        Removes an animation collection previously added.
        Specified by:
        delete in interface IsAnimations
        Parameters:
        collection - collection instance used to remove from animation options