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

## Interface Shape

All Known Implementing Classes:
  Rectangle

    public interface Shape

A shape that can be drawn on a canvas.

Method Summary
`double` | `getHeight()` Gets the height of the shape.
`double` | `getWidth()` Gets the width of the shape.
`double` | `getX()` Gets the leftmost x-position of the shape.
`double` | `getY()` Gets the topmost y-position of the shape.
`void` | `paintShape(Graphics2D g2)` Paints the shape

Method Detail

### getHeight

    double getHeight()

  Gets the height of the shape.

  Returns:
    the height

### getWidth

    double getWidth()

  Gets the width of the shape.

  Returns:
    the width

### getX

    double getX()

  Gets the leftmost x-position of the shape.

  Returns:
    the leftmost x-position

### getY

    double getY()

  Gets the topmost y-position of the shape.

  Returns:
    the topmost y-position

### paintShape

    void paintShape(Graphics2D g2)

  Paints the shape

  Parameters:
    `g2` - the graphics object

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