Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.awt
Class ColorPaintContext  view ColorPaintContext download ColorPaintContext.java

java.lang.Object
  extended byjava.awt.ColorPaintContext
All Implemented Interfaces:
PaintContext

class ColorPaintContext
extends java.lang.Object
implements PaintContext

This class provides a paint context which will fill a rectanglar region of a raster scan with the given color. However, it is not yet completely implemented.


Nested Class Summary
private  class ColorPaintContext.ColorRaster
          A ColorRaster is a raster that is completely filled with one color.
 
Field Summary
private  ColorPaintContext.ColorRaster cachedRaster
           
(package private)  int color
          The color to fill any raster with.
(package private)  java.awt.image.ColorModel colorModel
           
 
Constructor Summary
(package private) ColorPaintContext(java.awt.image.ColorModel cm, int colorRGB)
          Create the context for a given color.
(package private) ColorPaintContext(int colorRGB)
          Create the context for a given color.
 
Method Summary
 void dispose()
          Release the resources allocated for the paint.
 java.awt.image.ColorModel getColorModel()
          Return the color model of this context.
 java.awt.image.Raster getRaster(int x, int y, int width, int height)
          Return a raster containing the colors for the graphics operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

final int color
The color to fill any raster with. Package visible for use in SystemColor.


colorModel

final java.awt.image.ColorModel colorModel

cachedRaster

private ColorPaintContext.ColorRaster cachedRaster
Constructor Detail

ColorPaintContext

ColorPaintContext(int colorRGB)
Create the context for a given color.


ColorPaintContext

ColorPaintContext(java.awt.image.ColorModel cm,
                  int colorRGB)
Create the context for a given color.

Method Detail

dispose

public void dispose()
Release the resources allocated for the paint. As the color is constant, there aren't any resources.

Specified by:
dispose in interface PaintContext

getColorModel

public java.awt.image.ColorModel getColorModel()
Return the color model of this context.

Specified by:
getColorModel in interface PaintContext

getRaster

public java.awt.image.Raster getRaster(int x,
                                       int y,
                                       int width,
                                       int height)
Return a raster containing the colors for the graphics operation.

Specified by:
getRaster in interface PaintContext