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

## teamdev.jxdesktop
Interface Graphics

public interface Graphics

This interface defines drawing operations performed on a native UI element.

Method Summary
`void` | `drawRect(int x, int y, int width, int height)` Draws the outline of the specified rectangle.
`void` | `drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)` Draws an outlined round-cornered rectangle using the color of a current `Pen` object.
`void` | `fillRect(int x, int y, int width, int height)` Fills the specified rectangle.
`java.awt.Color` | `getColor()` Returns the current color.
`Pen` | `getPen()` Returns a Pen object for the current object.
`void` | `setColor(java.awt.Color color)` Sets the current color to the specified color.
`void` | `setPen(Pen pen)` Sets a `Pen` object for the current object.

Method Detail

### setPen

    public void setPen(Pen pen)

  Sets a `Pen` object for the current object.

  Parameters:
    `pen` - a `Pen` object for the current object

### getPen

    public Pen getPen()

  Returns a Pen object for the current object.

  Returns:
    a Pen object for the current object

### setColor

    public void setColor(java.awt.Color color)

  Sets the current color to the specified color.

  Parameters:
    `color` - the specified color

### getColor

    public java.awt.Color getColor()

  Returns the current color.

  Returns:
    the current color

### drawRect

    public void drawRect(int x,
                         int y,
                         int width,
                         int height)

  Draws the outline of the specified rectangle. The left and right edges of the rectangle are at x and x + width. The top and bottom edges are at y and y + height. The rectangle is drawn using the color of a current `Pen` object.

  Parameters:
    `x` - the x coordinate of the rectangle to be drawn
    `y` - the y coordinate of the rectangle to be drawn
    `width` - the width of the rectangle to be drawn
    `height` - the height of the rectangle to be drawn

### drawRoundRect

    public void drawRoundRect(int x,
                              int y,
                              int width,
                              int height,
                              int arcWidth,
                              int arcHeight)

  Draws an outlined round-cornered rectangle using the color of a current `Pen` object. The left and right edges of the rectangle are at x and x + width, respectively. The top and bottom edges of the rectangle are at y and y + height.

  Parameters:
    `x` - the x coordinate of the rectangle to be drawn
    `y` - the y coordinate of the rectangle to be drawn
    `width` - the width of the rectangle to be drawn
    `height` - the height of the rectangle to be drawn
    `arcWidth` - the horizontal diameter of the arc at the four corners
    `arcHeight` - the vertical diameter of the arc at the four corners

### fillRect

    public void fillRect(int x,
                         int y,
                         int width,
                         int height)

  Fills the specified rectangle. The left and right edges of the rectangle are at x and x + width - 1. The top and bottom edges are at y and y + height - 1. The resulting rectangle covers an area width pixels wide by height pixels tall. The rectangle is filled using the current color.

  Parameters:
    `x` - the x coordinate of the rectangle to be filled
    `y` - the y coordinate of the rectangle to be filled
    `width` - the width of the rectangle to be filled
    `height` - the height of the rectangle to be filled

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