Class gjt.DrawnRectangle
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gjt.DrawnRectangle

java.lang.Object
   |
   +----java.awt.Rectangle
           |
           +----gjt.DrawnRectangle

public class DrawnRectangle
extends Rectangle
A Rectangle which draws itself inside of a Component.

DrawnRectangles may have their thickness and line color set, and are capable of reporting their inner bounds (the area inside the lines).

Default thickness is 2.

If not set explicitly, the line color used is three shades darker than the background color of the Component being drawn into.

DrawnRectangles may be clear()ed, which clears both the exterior (the lines) and the interior (the area inside of the lines) of the DrawnRectangle.

DrawnRectangles may also be fill()ed with a specified color by calling fill(Color), or by calling setFillColor(Color) followed by fill().

By default, the fill Color is the background color of the Component drawn into.

See Also:
ThreeDRectangle, EtchedRectangle, Border, EtchedBorder, ThreeDBorder, DrawnRectangleTest

Variable Index

 o _defaultThickness
 o drawInto

Constructor Index

 o DrawnRectangle(Component)
 o DrawnRectangle(Component, int)
 o DrawnRectangle(Component, int, int, int, int)
 o DrawnRectangle(Component, int, int, int, int, int)

Method Index

 o brighter()
 o clear()
 o clearExterior()
 o clearInterior()
 o component()
 o fill()
 o fill(Color)
 o getFillColor()
 o getInnerBounds()
 o getLineColor()
 o getThickness()
 o paint()
 o paramString()
 o setFillColor(Color)
 o setLineColor(Color)
 o setThickness(int)
 o toString()

Variables

 o _defaultThickness
  protected static int _defaultThickness
 o drawInto
  protected Component drawInto

Constructors

 o DrawnRectangle
  public DrawnRectangle(Component drawInto)
 o DrawnRectangle
  public DrawnRectangle(Component drawInto,
                        int thick)
 o DrawnRectangle
  public DrawnRectangle(Component drawInto,
                        int x,
                        int y,
                        int w,
                        int h)
 o DrawnRectangle
  public DrawnRectangle(Component drawInto,
                        int thick,
                        int x,
                        int y,
                        int w,
                        int h)

Methods

 o component
  public Component component()
 o getThickness
  public int getThickness()
 o setThickness
  public void setThickness(int thick)
 o setLineColor
  public void setLineColor(Color lineColor)
 o setFillColor
  public void setFillColor(Color fillColor)
 o fill
  public void fill()
 o getLineColor
  public Color getLineColor()
 o getFillColor
  public Color getFillColor()
 o getInnerBounds
  public Rectangle getInnerBounds()
 o paint
  public void paint()
 o clearInterior
  public void clearInterior()
 o clearExterior
  public void clearExterior()
 o clear
  public void clear()
 o fill
  public void fill(Color color)
 o toString
  public String toString()
Overrides:
toString in class Rectangle
 o paramString
  public String paramString()
 o brighter
  protected Color brighter()

All Packages  Class Hierarchy  This Package  Previous  Next  Index