Class TestWidgetAnimation

java.lang.Object
yearreview.app.grid.widgets.Widget
yearreview.app.grid.widgets.TestWidgetAnimation

public class TestWidgetAnimation extends Widget
Test Widget that's a blue rectangle with four green dots animated using different AnimationCurves..
Author:
ColdStone37
  • Field Details

    • ANIMATION_DURATION

      public Duration ANIMATION_DURATION
      Duration of the animation to play.
    • ANIMATION_FRAME_COUNT

      public static final int ANIMATION_FRAME_COUNT
      Amount of frames to wait until the next animation should be played.
      See Also:
    • frameCount

      private int frameCount
      Number of frames already rendered.
    • animations

      private final List<AnimatedNumber> animations
      AnimatedNumbers used to animate the dots.
    • FONT

      private static final Font FONT
      Font used to annotate the animations.
  • Constructor Details

    • TestWidgetAnimation

      public TestWidgetAnimation(float x, float y, float w, float h, XmlNode c)
      Constructs a TestWidgetAnimation at a given position with a configuration (that isn't used).
      Parameters:
      x - x-position of the widget
      y - y-position of the widget
      w - width of the widget
      h - height of the widget
      c - configuration
  • Method Details

    • renderLocalSpace

      protected 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)).
      Specified by:
      renderLocalSpace in class Widget
      Parameters:
      g - graphic that gets rendered to
      time - time at which the widget is rendered