Class BasicTextAnimations


  • public final class BasicTextAnimations
    extends java.lang.Object
    Provides a text animation that shows an overlapping sequence of texts using a bunch of different effects: color fade, scaling, glyph spacing.
    Version:
    $Revision: 1.6 $
    See Also:
    BasicTextAnimation
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int FADE_TYPE  
      private static int SCALE_TYPE  
      private static int SPACE_TYPE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private BasicTextAnimations()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static Animation animation​(BasicTextLabel label, long duration, java.lang.String text, java.awt.Color baseColor, int type)  
      private static Animation createTextSequence​(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor, int type)
      Creates and returns the default glyph spacing text sequence.
      static Animation defaultFade​(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor)
      Creates and answers the default color fade text sequence.
      static Animation defaultScale​(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor)
      Creates and answers the default scaling text sequence.
      static Animation defaultSpace​(BasicTextLabel label1, BasicTextLabel label2, long singleDuration, long beginOffset, java.lang.String separatedTexts, java.awt.Color baseColor)
      Creates and answers the default glyph spacing text sequence.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BasicTextAnimations

        private BasicTextAnimations()
    • Method Detail

      • defaultFade

        public static Animation defaultFade​(BasicTextLabel label1,
                                            BasicTextLabel label2,
                                            long singleDuration,
                                            long beginOffset,
                                            java.lang.String separatedTexts,
                                            java.awt.Color baseColor)
        Creates and answers the default color fade text sequence.
        Parameters:
        label1 - a text label used to blend over
        label2 - a second text label used to blend over
        singleDuration - the duration of a single animation
        beginOffset - an initial animation time offset
        separatedTexts - a sequence of texts in a string separated by the | character
        baseColor - the base color for the fade
        Returns:
        a default fade animation
      • defaultScale

        public static Animation defaultScale​(BasicTextLabel label1,
                                             BasicTextLabel label2,
                                             long singleDuration,
                                             long beginOffset,
                                             java.lang.String separatedTexts,
                                             java.awt.Color baseColor)
        Creates and answers the default scaling text sequence.
        Parameters:
        label1 - a text label used to blend over
        label2 - a second text label used to blend over
        singleDuration - the duration of a single animation
        beginOffset - an initial animation time offset
        separatedTexts - a sequence of texts in a string separated by the | character
        baseColor - the base color for the fade
        Returns:
        a default scaling blend over animation
      • defaultSpace

        public static Animation defaultSpace​(BasicTextLabel label1,
                                             BasicTextLabel label2,
                                             long singleDuration,
                                             long beginOffset,
                                             java.lang.String separatedTexts,
                                             java.awt.Color baseColor)
        Creates and answers the default glyph spacing text sequence.
        Parameters:
        label1 - a text label used to blend over
        label2 - a second text label used to blend over
        singleDuration - the duration of a single animation
        beginOffset - an initial animation time offset
        separatedTexts - a sequence of texts in a string separated by the | character
        baseColor - the base color for the fade
        Returns:
        a default space blend over animation
      • createTextSequence

        private static Animation createTextSequence​(BasicTextLabel label1,
                                                    BasicTextLabel label2,
                                                    long singleDuration,
                                                    long beginOffset,
                                                    java.lang.String separatedTexts,
                                                    java.awt.Color baseColor,
                                                    int type)
        Creates and returns the default glyph spacing text sequence.
        Parameters:
        label1 - the first label to render the sequence
        label2 - the second label to render
        singleDuration - the duration of a step in the sequence
        beginOffset - an offset in ms between to steps
        separatedTexts - a '|' separated lists of texts to display
        baseColor - the color used as a basis for the text
        type - the type of the effect used to change
        Returns:
        a composed animation that displays a sequence of texts
      • animation

        private static Animation animation​(BasicTextLabel label,
                                           long duration,
                                           java.lang.String text,
                                           java.awt.Color baseColor,
                                           int type)