diva.util.java2d
Interface PaintedObject

All Known Subinterfaces:
PaintedGraphic
All Known Implementing Classes:
PaintedList, PaintedString

public interface PaintedObject

The interface for a set of utility classes that paint shapes or other kinds of graphical objects. The purpose of these classes is to provide a simple interface for basic graphical drawing operations. Generally, they combine a number of different objects from the Java2D API in the most commonly useful way.


Method Summary
 java.awt.geom.Rectangle2D getBounds()
          Get the bounding box of the object when painted.
 void paint(java.awt.Graphics2D g)
          Paint the shape.
 

Method Detail

getBounds

public java.awt.geom.Rectangle2D getBounds()
Get the bounding box of the object when painted. Implementations of this method should take account of the thickness of the stroke, if there is one.

paint

public void paint(java.awt.Graphics2D g)
Paint the shape. Implementations are expected to redraw the entire object. Whether or not the paint overwrites fields in the graphics context such as the current paint, stroke, and composite, depends on the implementing class.


Contact 
©2002-2018 U.C. Regents