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

## element
Interface Drawable

All Known Implementing Classes:
  Rect, Pt, Line, Text

public interface Drawable
extends java.lang.Cloneable

The interface describing graphic objects that can be drawn in a drawing window.

Method Summary
`int` | `bottom()` Return the bottom coordinate of the bounding box of the object
`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
`void` | `drawOn(DrawingWindow d)` Draw this object (in the current mode) on a drawing window
`void` | `fillOn(DrawingWindow d)` Draw a filled version of this object (in the current mode) on a drawing window
`int` | `height()` Return the height of the bounding box of the object
`int` | `left()` Return the leftmost coordinate of bounding box of object
`int` | `right()` Return the rightmost coordinate of the bounding box of the object
`int` | `top()` Return the top coordinate of the bounding box of the object
`int` | `width()` Return the width of the bounding box of the object

Method Detail

### height

    public int height()

  Return the height of the bounding box of the object
  Returns:
    height of the bounding box of the object

### width

    public int width()

  Return the width of the bounding box of the object
  Returns:
    the width of the bounding box of the object

### left

    public int left()

  Return the leftmost coordinate of bounding box of object
  Returns:
    the leftmost coordinate of the bounding box of the object

### right

    public int right()

  Return the rightmost coordinate of the bounding box of the object
  Returns:
    the rightmost coordinate of the bounding box of the object

### bottom

    public int bottom()

  Return the bottom coordinate of the bounding box of the object
  Returns:
    the bottom coordinate of the bounding box of the object

### top

    public int top()

  Return the top coordinate of the bounding box of the object
  Returns:
    the top coordinate of the bounding box of the object

### center

    public void center(Pt p)

  Reset the center of the object to be at point p. Dimensions remain unchanged
  Parameters:
    `p` - the new center of the object

### center

    public Pt center()

  Return the center of the object
  Returns:
    the center of the object

### drawOn

    public void drawOn(DrawingWindow d)

  Draw this object (in the current mode) on a drawing window
  Parameters:
    `d` - the drawing window to be targeted
  See Also:
    `DrawingWindow.draw(element.Drawable)`, `DrawingWindow.paintMode()`, `DrawingWindow.invertMode()`

### fillOn

    public void fillOn(DrawingWindow d)

  Draw a filled version of this object (in the current mode) on a drawing window
  Parameters:
    `d` - the drawing window
  See Also:
    `DrawingWindow.fill(element.Drawable)`, `DrawingWindow.paintMode()`, `DrawingWindow.invertMode()`

### clearOn

    public void clearOn(DrawingWindow d)

  Erase a filled version of this object (in the current mode) on a drawing window
  Parameters:
    `d` - the drawing window
  See Also:
    `DrawingWindow.clear(element.Drawable)`

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