Package yearreview.app.grid.widgets
Class TestWidgetAnimation
java.lang.Object
yearreview.app.grid.widgets.Widget
yearreview.app.grid.widgets.TestWidgetAnimation
Test Widget that's a blue rectangle with four green dots animated using different
AnimationCurves
..- Author:
- ColdStone37
-
Field Summary
Modifier and TypeFieldDescriptionDuration of the animation to play.static final int
Amount of frames to wait until the next animation should be played.private final List<AnimatedNumber>
AnimatedNumbers
used to animate the dots.private static final Font
Font used to annotate the animations.private int
Number of frames already rendered. -
Constructor Summary
ConstructorDescriptionTestWidgetAnimation
(float x, float y, float w, float h, XmlNode c) Constructs a TestWidgetAnimation at a given position with a configuration (that isn't used). -
Method Summary
Modifier and TypeMethodDescriptionprotected void
renderLocalSpace
(Graphics2D g, Instant time) Renders the widget in its local space (meaning that the coordinate system goes from (0, 0) to (w, h)).Methods inherited from class yearreview.app.grid.widgets.Widget
renderGlobalSpace, setPosition
-
Field Details
-
ANIMATION_DURATION
Duration of the animation to play. -
ANIMATION_FRAME_COUNT
public static final int ANIMATION_FRAME_COUNTAmount of frames to wait until the next animation should be played.- See Also:
-
frameCount
private int frameCountNumber of frames already rendered. -
animations
AnimatedNumbers
used to animate the dots. -
FONT
Font used to annotate the animations.
-
-
Constructor Details
-
TestWidgetAnimation
Constructs a TestWidgetAnimation at a given position with a configuration (that isn't used).- Parameters:
x
- x-position of the widgety
- y-position of the widgetw
- width of the widgeth
- height of the widgetc
- configuration
-
-
Method Details
-
renderLocalSpace
Renders the widget in its local space (meaning that the coordinate system goes from (0, 0) to (w, h)).- Specified by:
renderLocalSpace
in classWidget
- Parameters:
g
- graphic that gets rendered totime
- time at which the widget is rendered
-