All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class linguist.quickshow.SpeechBubble

linguist.quickshow.Actor
   |
   +----linguist.quickshow.SpeechBubble

public class SpeechBubble
extends Actor
A speech bubble. This can be shown on the left or the right, above or below, and tracks its associated Actor.


Variable Index

 o ABOVE_LEFT
 o ABOVE_RIGHT
 o BELOW_LEFT
 o BELOW_RIGHT
 o DEFAULT

Constructor Index

 o SpeechBubble(Actor)
The constructor.

Method Index

 o display(String, int, int, int)
Display this speech bubble.
 o draw(Graphics, Rectangle)
Draw this Actor.
 o getOwner()
Get the owner of this bubble.
 o getText()
Get the text for this bubble.
 o run()
The thread 'run' method.
 o setBorderColor(Color)
Set the border color for this speech bubble.
 o setBorderWidth(int)
Set the border width for this speech bubble.
 o setBoxColor(Color)
Set the box color for this speech bubble.
 o setOrientation(int)
Set the orientation of this speech bubble.
 o setTextColor(Color)
Set the text color for this speech bubble.

Variables

 o DEFAULT
 public static final int DEFAULT
 o ABOVE_LEFT
 public static final int ABOVE_LEFT
 o ABOVE_RIGHT
 public static final int ABOVE_RIGHT
 o BELOW_LEFT
 public static final int BELOW_LEFT
 o BELOW_RIGHT
 public static final int BELOW_RIGHT

Constructors

 o SpeechBubble
 public SpeechBubble(Actor owner)
The constructor.

Parameters:
owner - the Actor that owns this speech bubble.

Methods

 o getOwner
 public Actor getOwner()
Get the owner of this bubble.

Returns:
The owner.
 o getText
 public String getText()
Get the text for this bubble.

Returns:
The current text.
 o setBoxColor
 public void setBoxColor(Color c)
Set the box color for this speech bubble.

Parameters:
c - the color of the box background.
 o setBorderColor
 public void setBorderColor(Color c)
Set the border color for this speech bubble.

Parameters:
c - the color of the box border.
 o setTextColor
 public void setTextColor(Color c)
Set the text color for this speech bubble.

Parameters:
c - the color of the text.
 o setBorderWidth
 public void setBorderWidth(int w)
Set the border width for this speech bubble.

Parameters:
w - the width of the box border.
 o setOrientation
 public void setOrientation(int or)
Set the orientation of this speech bubble.

Parameters:
or - the orientation.
 o display
 public void display(String text,
                     int mouthX,
                     int mouthY,
                     int duration)
Display this speech bubble.

Parameters:
text - the text to display in the bubble.
mouthX - the X position of the mount of the owner, relative to its left edge.
mouthY - the Y position of the mouth of the owner, relative to its top edge.
duration - the number of milliseconds to show the bubble for (0 = forever).
 o run
 public void run()
The thread 'run' method.

Overrides:
run in class Actor
 o draw
 public void draw(Graphics g,
                  Rectangle r)
Draw this Actor.

Overrides:
draw in class Actor

All Packages  Class Hierarchy  This Package  Previous  Next  Index