Class MessageOverlayAnimator

  • All Implemented Interfaces:
    OverlayAnimator

    public class MessageOverlayAnimator
    extends Object
    implements OverlayAnimator
    Draw lines of text in the lower right corner of the display. Messages are fading in a specified time. If several messages are drawn at the same time, old messages scroll up.
    Author:
    Tobias Pietzsch
    • Field Detail

      • font

        protected final Font font
      • duration

        protected final long duration
      • fadeInTime

        protected final double fadeInTime
      • fadeOutTime

        protected final double fadeOutTime
    • Constructor Detail

      • MessageOverlayAnimator

        public MessageOverlayAnimator​(long duration)
      • MessageOverlayAnimator

        public MessageOverlayAnimator​(long duration,
                                      double fadeInTime,
                                      double fadeOutTime)
      • MessageOverlayAnimator

        public MessageOverlayAnimator​(long duration,
                                      double fadeInTime,
                                      double fadeOutTime,
                                      Font font)
    • Method Detail

      • add

        public void add​(String text)
      • isComplete

        public boolean isComplete()
        Description copied from interface: OverlayAnimator
        Returns true if the animation is complete and the animator can be removed.
        Specified by:
        isComplete in interface OverlayAnimator
        Returns:
        whether the animation is complete and the animator can be removed.
      • requiresRepaint

        public boolean requiresRepaint()
        Description copied from interface: OverlayAnimator
        Returns true if the animator requires an immediate repaint to continue the animation.
        Specified by:
        requiresRepaint in interface OverlayAnimator
        Returns:
        whetherhe animator requires an immediate repaint.