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.
-
ABOVE_LEFT
-
-
ABOVE_RIGHT
-
-
BELOW_LEFT
-
-
BELOW_RIGHT
-
-
DEFAULT
-
-
SpeechBubble(Actor)
- The constructor.
-
display(String, int, int, int)
- Display this speech bubble.
-
draw(Graphics, Rectangle)
- Draw this Actor.
-
getOwner()
- Get the owner of this bubble.
-
getText()
- Get the text for this bubble.
-
run()
- The thread 'run' method.
-
setBorderColor(Color)
- Set the border color for this speech bubble.
-
setBorderWidth(int)
- Set the border width for this speech bubble.
-
setBoxColor(Color)
- Set the box color for this speech bubble.
-
setOrientation(int)
- Set the orientation of this speech bubble.
-
setTextColor(Color)
- Set the text color for this speech bubble.
DEFAULT
public static final int DEFAULT
ABOVE_LEFT
public static final int ABOVE_LEFT
ABOVE_RIGHT
public static final int ABOVE_RIGHT
BELOW_LEFT
public static final int BELOW_LEFT
BELOW_RIGHT
public static final int BELOW_RIGHT
SpeechBubble
public SpeechBubble(Actor owner)
- The constructor.
- Parameters:
- owner - the Actor that owns this speech bubble.
getOwner
public Actor getOwner()
- Get the owner of this bubble.
- Returns:
- The owner.
getText
public String getText()
- Get the text for this bubble.
- Returns:
- The current text.
setBoxColor
public void setBoxColor(Color c)
- Set the box color for this speech bubble.
- Parameters:
- c - the color of the box background.
setBorderColor
public void setBorderColor(Color c)
- Set the border color for this speech bubble.
- Parameters:
- c - the color of the box border.
setTextColor
public void setTextColor(Color c)
- Set the text color for this speech bubble.
- Parameters:
- c - the color of the text.
setBorderWidth
public void setBorderWidth(int w)
- Set the border width for this speech bubble.
- Parameters:
- w - the width of the box border.
setOrientation
public void setOrientation(int or)
- Set the orientation of this speech bubble.
- Parameters:
- or - the orientation.
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).
run
public void run()
- The thread 'run' method.
- Overrides:
- run in class Actor
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