Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class ThoughtBalloon

    java.lang.Object
      TextBalloon
          ThoughtBalloon

    public class ThoughtBalloon

extends TextBalloon

ThoughtBalloon: this is used to represent objects in comic strips which are used to show what a character is thinking. The tip of tail points to the character who is doing the thinking

Author:
  Barb Ericson ericson@cc.gatech.edu Copyright 2005

Constructor Summary
`ThoughtBalloon(Point uLeft, int theWidth, Point tEnd, String theMessage)` Constructor that takes the upper left, width, tail end, and message to display

Method Summary
`Point` | `drawCircle(Point circleTop, double heading, double width, double distance, Point startPoint, Color fillColor, Color outlineColor, Graphics2D g2)` Method to draw a circle of a given width
`protected void` | `drawTail(int ellipseHeight, Color fillColor, Color outlineColor, Graphics2D g2)` Method to draw the thought ballon using the passed graphics context
`static void` | `main(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`

Constructor Detail

### ThoughtBalloon

    public ThoughtBalloon(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 balloon
    `theWidth` - the width of the enclosing rectangle
    `tEnd` - the point which is the end of the tail that shows who is speaking
    `theMessage` - the message to display

Method Detail

### drawCircle

    public Point drawCircle(Point circleTop,
                            double heading,
                            double width,
                            double distance,
                            Point startPoint,
                            Color fillColor,
                            Color outlineColor,
                            Graphics2D g2)

  Method to draw a circle of a given width

  Parameters:
    `circleTop` - the top point on the circle
    `heading` - the heading in degrees with 0 being north
    `width` - the width of the circle
    `distance` - the distance from the start point
    `startPoint` - the point to start the distance from
    `g2` - the 2d graphics context used for drawing
  Returns:
    a point on the circle at the given distance away from the start point

### drawTail

    protected void drawTail(int ellipseHeight,
                            Color fillColor,
                            Color outlineColor,
                            Graphics2D g2)

  Method to draw the thought ballon using the passed graphics context

  Specified by:
    `drawTail` in class `TextBalloon`
  Parameters:
    `ellipseHeight` - the height of the ellipse
    `fillColor` - the color to fill the tail with
    `outlineColor` - the color to outline the tail with
    `g2` - the 2D graphics context

### main

    public static void main(String[] args)

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD