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

## jcckit.graphic
Class Rectangle

    java.lang.Object
      jcckit.graphic.BasicGraphicalElement
          jcckit.graphic.Rectangle

All Implemented Interfaces:
  GraphicalElement

Direct Known Subclasses:
  Oval

public class Rectangle
extends BasicGraphicalElement

A rectangle.

Author:
  Franz-Josef Elmer

Constructor Summary
`Rectangle(GraphPoint center, double width, double height, GraphicAttributes attributes)` Creates a new instance.

Method Summary
`GraphPoint` | `getCenter()` Returns the center of this element.
`double` | `getHeight()` Returns the height of this element.
`double` | `getWidth()` Returns the width of this element.
`void` | `renderWith(Renderer renderer)` Renders this rectangle with the specified `Renderer`.

Methods inherited from class jcckit.graphic.BasicGraphicalElement
`getGraphicAttributes, isClosed`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Rectangle

    public Rectangle(GraphPoint center,
                     double width,
                     double height,
                     GraphicAttributes attributes)

  Creates a new instance.

Parameters:
  `center` - The position of the center of this element.
  `width` - The width.
  `height` - The height.
  `attributes` - Drawing attributes. Can be `null`.

Method Detail

### getCenter

    public GraphPoint getCenter()

  Returns the center of this element.

### getWidth

    public double getWidth()

  Returns the width of this element.

### getHeight

    public double getHeight()

  Returns the height of this element.

### renderWith

    public void renderWith(Renderer renderer)

  Renders this rectangle with the specified `Renderer`.

  Parameters:
    `renderer` - An instance of `RectangleRenderer`.
  Throws:
    `java.lang.IllegalArgumentException` - if `renderer` is not an instance of `RectangleRenderer`.

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