Class TextBanner
- java.lang.Object
-
- 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.
-
-
-
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 displayx
- starting x coordinate for the bannery
- starting y coordinate for the bannercolor
- 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 directionyspeed
- 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.
-
-