Class CommonProgressAnimations.ProgressAnimation

java.lang.Object
com.codename1.ui.Component
com.codename1.ui.CommonProgressAnimations.ProgressAnimation
All Implemented Interfaces:
Animation, Editable, StyleListener
Direct Known Subclasses:
CommonProgressAnimations.CircleProgress, CommonProgressAnimations.EmptyAnimation, CommonProgressAnimations.LoadingTextAnimation
Enclosing class:
CommonProgressAnimations

public abstract static class CommonProgressAnimations.ProgressAnimation extends Component

Base class for ProgressAnimations

Since

7.0

  • Field Details

  • Constructor Details

    • ProgressAnimation

      public ProgressAnimation()
  • Method Details

    • markComponentLoading

      Marks a component as "loading", replacing it in its parent conatiner with a progress animation. When the component's content is "ready" or finished loading you should call #markComponentReady(com.codename1.ui.Component) to swap the component back into its parent, and removing the progress animation.

      If the component has already been marked as "loading", this will simply return the progress animation that was previously assigned to it.

      Parameters
      • cmp: The component to be replaced by a progress animation.

      • type: The type of progress animation to use.

      Returns

      The ProgressAnimation that is currently occuppying the component's space.

    • markComponentReady

      public static void markComponentReady(Component cmp, Transition t)

      Marks a component as "ready", if it had previously been marked as "loading". If the component had been replaced in its parent container by a progress animation, then this will swap it back.

      Parameters
      • cmp: The component to mark as "ready".

      • t: The transition to use for replacing the progress animation with the component. Null for immediate replacement.

    • markComponentReady

      public static void markComponentReady(Component cmp)

      Marks a component as "ready", if it had previously been marked as "loading". If the component had been replaced in its parent container by a progress animation, then this will swap it back.

      Parameters
      • cmp: The component to mark as "ready".
    • getProgressAnimation

      public static CommonProgressAnimations.ProgressAnimation getProgressAnimation(Component cmp)

      Gets the progress animation that is currently showing for a component. The progress animation would be "assigned" by java.lang.Class), and can be "deassigned" by by #markComponentReady(com.codename1.ui.Component).

      This may return null, if the component isn't currently marked as loading.

      Parameters
      • cmp: The Component whose progress animation we're seeking.
      Returns

      The ProgressAnimation, or null if the component isn't "loading".

    • initComponent

      protected void initComponent()
      Description copied from class: Component
      Allows subclasses to bind functionality that relies on fully initialized and "ready for action" component state
      Overrides:
      initComponent in class Component
    • deinitialize

      protected void deinitialize()
      Description copied from class: Component
      Invoked to indicate that the component initialization is being reversed since the component was detached from the container hierarchy. This allows the component to deregister animators and cleanup after itself. This method is the opposite of the initComponent() method.
      Overrides:
      deinitialize in class Component