Class TextBanner


  • public class TextBanner
    extends java.lang.Object
    An animated text banner.
    • Constructor Summary

      Constructors 
      Constructor Description
      TextBanner​(java.lang.String message, double x, double y, javafx.scene.paint.Color color)
      Create a new text banner with the specified message, starting position, and color.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void draw​(javafx.scene.canvas.GraphicsContext g)
      Draw the banner.
      void move()
      Update the banner's position.
      void setSpeed​(double xspeed, double yspeed)
      Set the banner's speed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextBanner

        public TextBanner​(java.lang.String message,
                          double x,
                          double y,
                          javafx.scene.paint.Color color)
        Create a new text banner with the specified message, starting position, and color.
        Parameters:
        message - the text message to display
        x - starting x coordinate for the banner
        y - starting y coordinate for the banner
        color - color to paint the banner
    • Method Detail

      • setSpeed

        public void setSpeed​(double xspeed,
                             double yspeed)
        Set the banner's speed.
        Parameters:
        xspeed - speed in the horizontal direction
        yspeed - speed in the vertical direction
      • move

        public void move()
        Update the banner's position.
      • draw

        public void draw​(javafx.scene.canvas.GraphicsContext g)
        Draw the banner.