public class MessageOverlayAnimator extends Object implements OverlayAnimator
Modifier and Type | Class and Description |
---|---|
protected static class |
MessageOverlayAnimator.TextAnimator |
Modifier and Type | Field and Description |
---|---|
protected long |
duration |
protected double |
fadeInTime |
protected double |
fadeOutTime |
protected Font |
font |
protected List<MessageOverlayAnimator.TextAnimator> |
texts |
Constructor and Description |
---|
MessageOverlayAnimator(long duration) |
MessageOverlayAnimator(long duration,
double fadeInTime,
double fadeOutTime) |
MessageOverlayAnimator(long duration,
double fadeInTime,
double fadeOutTime,
Font font) |
Modifier and Type | Method and Description |
---|---|
void |
add(String text) |
boolean |
isComplete()
Returns true if the animation is complete and the animator can be
removed.
|
void |
paint(Graphics2D g,
long time) |
boolean |
requiresRepaint()
Returns true if the animator requires an immediate repaint to continue
the animation.
|
protected final Font font
protected final long duration
protected final double fadeInTime
protected final double fadeOutTime
protected final List<MessageOverlayAnimator.TextAnimator> texts
public MessageOverlayAnimator(long duration)
public MessageOverlayAnimator(long duration, double fadeInTime, double fadeOutTime)
public MessageOverlayAnimator(long duration, double fadeInTime, double fadeOutTime, Font font)
public void add(String text)
public boolean isComplete()
OverlayAnimator
isComplete
in interface OverlayAnimator
public boolean requiresRepaint()
OverlayAnimator
requiresRepaint
in interface OverlayAnimator
public void paint(Graphics2D g, long time)
paint
in interface OverlayAnimator
Copyright © 2015–2021 Fiji. All rights reserved.