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
FieldsModifier and TypeFieldDescriptionDuration of the animation to play.static final intAmount of frames to wait until the next animation should be played.private final List<AnimatedNumber>AnimatedNumbersused to animate the dots.private static final FontFont used to annotate the animations.private intNumber of frames already rendered. -
Constructor Summary
ConstructorsConstructorDescriptionTestWidgetAnimation(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 voidrenderLocalSpace(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
AnimatedNumbersused 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:
renderLocalSpacein classWidget- Parameters:
g- graphic that gets rendered totime- time at which the widget is rendered
-