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
- Author:
- Barb Ericson
|
Constructor Summary |
SpeechBalloon(Point uLeft,
int theWidth,
Point tEnd,
String theMessage)
Constructor that takes the upper left, width,
tail end, and message to display |
| 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(Point uLeft,
int theWidth,
Point tEnd,
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,
Color fillColor,
Color outlineColor,
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(String[] args)