Class SpeechBalloon
java.lang.Object
TextBalloon
SpeechBalloon
public class SpeechBalloon
- extends TextBalloon
SpeechBalloon: this is used to
represent objects
in comic strips which are used to show
what a character is saying. The tip of
tail points to the character who is
talking
Constructor Summary |
SpeechBalloon(java.awt.Point uLeft,
int theWidth,
java.awt.Point tEnd,
java.lang.String theMessage)
Constructor that takes the upper left, width,
tail end, and message to display |
Method Summary |
protected void |
drawTail(int ellipseHeight,
java.awt.Color fillColor,
java.awt.Color outlineColor,
java.awt.Graphics2D g2)
method to draw the tail of the balloon |
static void |
main(java.lang.String[] args)
|
Methods inherited from class TextBalloon |
draw, drawBalloon, drawText, getAttrIterator, getFont, getHeight, getMargin, getMessage, getNumLines, getTailEnd, getUpperLeft, getWidth, setFont, setMargin, setMessage, setTailEnd, setUpperLeft, setWidth |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpeechBalloon
public SpeechBalloon(java.awt.Point uLeft,
int theWidth,
java.awt.Point tEnd,
java.lang.String theMessage)
- Constructor that takes the upper left, width,
tail end, and message to display
- Parameters:
uLeft
- the upper left corner of a rectangle
enclosing the balloontheWidth
- the width of the enclosing rectangletEnd
- the point which is the end of the tail
that shows who is speakingtheMessage
- the message to display
drawTail
protected void drawTail(int ellipseHeight,
java.awt.Color fillColor,
java.awt.Color outlineColor,
java.awt.Graphics2D g2)
- method to draw the tail of the balloon
- Specified by:
drawTail
in class TextBalloon
- Parameters:
ellipseHeight
- the height of the
ellipsefillColor
- the color to bill the
balloon withoutlineColor
- the color to outline
the balloon withg2
- the 2d graphics context
main
public static void main(java.lang.String[] args)