Class CommonProgressAnimations.LoadingTextAnimation

All Implemented Interfaces:
Animation, Editable, StyleListener
Enclosing class:
CommonProgressAnimations

public static class CommonProgressAnimations.LoadingTextAnimation extends CommonProgressAnimations.ProgressAnimation

A progress animation that shows a block of text being typed. Except words are rendered as filled rectangles instead of actual glyphs. This is appropriate where a paragraph of text is scheduled to appear, but is not ready to show yet.

Since

7.0

  • Constructor Details

    • LoadingTextAnimation

      public LoadingTextAnimation()
  • Method Details

    • markComponentLoading

      public static CommonProgressAnimations.LoadingTextAnimation markComponentLoading(Component cmp)
      Replaces the given component with a LoadingTextAnimation until its content is ready. When the component's content is ready, then make sure to call invalid input: ') to swap the component back into its parent. #### Parameters - `cmp`'
    • animate

      public boolean animate()
      Description copied from class: Component

      Allows the animation to reduce "repaint" calls when it returns false. It is called once for every frame. Frames are defined by the com.codename1.ui.Display class.

      Returns

      true if a repaint is desired or false if no repaint is necessary

      Specified by:
      animate in interface Animation
      Overrides:
      animate in class Component
    • paintBackground

      protected void paintBackground(Graphics g)
      Description copied from class: Component

      This method paints the Component background, it should be overriden by subclasses to perform custom background drawing.

      Parameters
      • g: the component graphics
      Overrides:
      paintBackground in class Component
    • calcPreferredSize

      protected Dimension calcPreferredSize()
      Description copied from class: Component

      Calculates the preferred size based on component content. This method is invoked lazily by getPreferred size.

      Returns

      the calculated preferred size based on component content

      Overrides:
      calcPreferredSize in class Component
    • rows

      public int rows()
      Returns the number of rows of text to render.
    • cols

      public int cols()
      Returns the number of columns to render.
    • rows

      Sets the number of rows to render.

      Parameters
      • rows: The number of rows to render.
      Returns

      Self for chaining.

    • cols

      Returns the number of columns to render.

      Parameters
      • cols: The number of columns to render.
      Returns

      Self for chaining.