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

## element
Class Text

    java.lang.Object
      |
      +--element.Text

public class Text
extends java.lang.Object
implements Drawable

Copyright (c) 1997 McGraw-Hill All Rights Reserved.

Permission to use, copy, modify, and distribute this software and its documentation for NON-COMMERCIAL purposes and without fee is hereby granted provided that this copyright notice appears in all copies. Please refer to the file "copyright.html" for further important copyright and licensing information.

MCGRAW-HILL MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. MCGRAW-HILL SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.

Constructor Summary
`Text(char c)`
`Text(long i)`
`Text(java.lang.Object s)`
`Text(java.lang.Object s, int left, int bottom)`
`Text(java.lang.Object s, Pt p)`
`Text(java.lang.String s)`
`Text(java.lang.String s, int left, int bottom)`
`Text(Text that)`

Method Summary
`int` | `bottom()` Return the bottom coordinate of the bounding box of the object
`void` | `bottom(int y)`
`Pt` | `center()` Return the center of the object
`void` | `center(Pt p)` Reset the center of the object to be at point p.
`void` | `clearOn(DrawingWindow d)` Erase a filled version of this object (in the current mode) on a drawing window
`java.lang.Object` | `clone()` post: returns a distinct copy of the Object
`boolean` | `contains(Pt p)`
`void` | `drawOn(DrawingWindow d)` Draw this object (in the current mode) on a drawing window
`boolean` | `equals(java.lang.Object other)` post: returns true if two texts are equal
`void` | `fillOn(DrawingWindow d)` Draw a filled version of this object (in the current mode) on a drawing window
`java.awt.Font` | `font()`
`int` | `hashCode()` post: returns suitable hash code
`int` | `height()` Return the height of the bounding box of the object
`int` | `left()` Return the leftmost coordinate of bounding box of object
`void` | `left(int x)`
`int` | `right()` Return the rightmost coordinate of the bounding box of the object
`void` | `right(int x)`
`java.lang.String` | `string()`
`int` | `top()` Return the top coordinate of the bounding box of the object
`void` | `top(int y)`
`java.lang.String` | `toString()` post: returns a string representation of Object
`int` | `width()` Return the width of the bounding box of the object

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Text

    public Text(java.lang.String s)

  Parameters:
    `s` -

### Text

    public Text(char c)

  Parameters:
    `c` -

### Text

    public Text(long i)

  Parameters:
    `i` -

### Text

    public Text(java.lang.Object s)

  Parameters:
    `s` -

### Text

    public Text(java.lang.Object s,
                int left,
                int bottom)

  Parameters:
    `s` -
    `left` -
    `bottom` -

### Text

    public Text(java.lang.String s,
                int left,
                int bottom)

  Parameters:
    `s` -
    `left` -
    `bottom` -

### Text

    public Text(java.lang.Object s,
                Pt p)

### Text

    public Text(Text that)

  Parameters:
    `that` -

Method Detail

### left

    public int left()

  Description copied from interface: Drawable
  Return the leftmost coordinate of bounding box of object
  Specified by:
    left in interface Drawable
  Returns:

### right

    public int right()

  Description copied from interface: Drawable
  Return the rightmost coordinate of the bounding box of the object
  Specified by:
    right in interface Drawable
  Returns:

### top

    public int top()

  Description copied from interface: Drawable
  Return the top coordinate of the bounding box of the object
  Specified by:
    top in interface Drawable
  Returns:

### bottom

    public int bottom()

  Description copied from interface: Drawable
  Return the bottom coordinate of the bounding box of the object
  Specified by:
    bottom in interface Drawable
  Returns:

### left

    public void left(int x)

  Parameters:
    `x` -

### right

    public void right(int x)

  Parameters:
    `x` -

### top

    public void top(int y)

  Parameters:
    `y` -

### bottom

    public void bottom(int y)

  Parameters:
    `y` -

### width

    public int width()

  Description copied from interface: Drawable
  Return the width of the bounding box of the object
  Specified by:
    width in interface Drawable
  Returns:

### height

    public int height()

  Description copied from interface: Drawable
  Return the height of the bounding box of the object
  Specified by:
    height in interface Drawable
  Returns:

### center

    public Pt center()

  Description copied from interface: Drawable
  Return the center of the object
  Specified by:
    center in interface Drawable
  Returns:

### center

    public void center(Pt p)

  Description copied from interface: Drawable
  Reset the center of the object to be at point p. Dimensions remain unchanged
  Specified by:
    center in interface Drawable
  Parameters:
    `p` -

### contains

    public boolean contains(Pt p)

  Parameters:
    `p` -
  Returns:

### fillOn

    public void fillOn(DrawingWindow d)

  Description copied from interface: Drawable
  Draw a filled version of this object (in the current mode) on a drawing window
  Specified by:
    fillOn in interface Drawable
  Parameters:
    `d` -

### clearOn

    public void clearOn(DrawingWindow d)

  Description copied from interface: Drawable
  Erase a filled version of this object (in the current mode) on a drawing window
  Specified by:
    clearOn in interface Drawable
  Parameters:
    `d` -

### drawOn

    public void drawOn(DrawingWindow d)

  Description copied from interface: Drawable
  Draw this object (in the current mode) on a drawing window
  Specified by:
    drawOn in interface Drawable
  Parameters:
    `d` -

### hashCode

    public int hashCode()

  post: returns suitable hash code
  Overrides:
    hashCode in class java.lang.Object
  Returns:

### equals

    public boolean equals(java.lang.Object other)

  post: returns true if two texts are equal
  Overrides:
    equals in class java.lang.Object
  Parameters:
    `other` -
  Returns:

### clone

    public java.lang.Object clone()

  post: returns a distinct copy of the Object
  Overrides:
    clone in class java.lang.Object
  Returns:

### string

    public java.lang.String string()

  Returns:

### font

    public java.awt.Font font()

  Returns:

### toString

    public java.lang.String toString()

  post: returns a string representation of Object
  Overrides:
    toString in class java.lang.Object
  Returns:

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