sun.porting.graphicssystem
Interface GeometryProvider

All Superinterfaces:
sun.awt.DrawingSurfaceInfo

public interface GeometryProvider
extends sun.awt.DrawingSurfaceInfo

The GeometryProvider interface is what allows a Graphics object to clip to a window. Each time a Graphics object is used for a draw, it is required to consult its associated GeometryProvider in order to first lock the drawing surface, and then obtain the current transformation and clipping information for the operation. If the drawing surface is an offscreen image, the implementation of the GeometryProvider interface is trivial; if it is a window, the window system lock, window's onscreen location, current clip area and background are made available via this interface.


Method Summary
 java.awt.Color getBackgroundColor()
          Get the background color, if any, that this object is supposed to have.
 Object getLock()
          Get the lock object associated with the GeometryProvider.
 int getValidationID()
          Get the validation identifier.
 
Methods inherited from interface sun.awt.DrawingSurfaceInfo
getBounds, getClip, getSurface, lock, unlock
 

Method Detail

getLock

Object getLock()
Get the lock object associated with the GeometryProvider. All operations must acquire this lock as the first thing they do, and hold the lock until the draw has been completed. If the object being drawn is a window, this can prevent the windows from being moved during the draw; in any case it also prevents more than one thread from drawing to the same object at the same time.

Returns:
An Object to be used as the lock for the current draw operation.

getValidationID

int getValidationID()
Get the validation identifier. This is the same number that is returned by lock(); if it has not changed since the previous acquisition of the lock, the clipping information can be assumed not to have changed.

Returns:
The change identifier.

getBackgroundColor

java.awt.Color getBackgroundColor()
Get the background color, if any, that this object is supposed to have. This allows surfaces to stack in either an opaque or a transparent manner (a return value of null indicates that the object is transparent).

Returns:
A java.awt.Color object describing the background color for the drawing surface.