All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.bwt.JCBufferedComponent

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----jclass.bwt.JCComponent
                           |
                           +----jclass.bwt.JCBufferedComponent

public abstract class JCBufferedComponent
extends JCComponent
An abstract class which supports components with complex drawing that must be permanently double-buffered. The subclass' paintComponent() method is only called when the component is invalidated (e.g. resized). Otherwise the previously drawn off-screen image is used for repainting.


Constructor Index

 o JCBufferedComponent()
Creates a component.
 o JCBufferedComponent(Applet, String)
Creates a component which reads parameters from the applet's HTML file.

Method Index

 o getDoubleBufferGraphics()
Creates a double-buffer image
 o getDoubleBufferImage()
Returns the double-buffer image previously created in a call to getDoubleBufferGraphics.
 o invalidate()
Nulls out the offscreen buffer as part of invalidation
 o paint(Graphics)
An internal method used to handle repaint events.
 o reshape(int, int, int, int)
Reshapes the Component to the specified bounding box.
 o setDoubleBuffer(boolean)
Must be double-buffered.

Constructors

 o JCBufferedComponent
 public JCBufferedComponent()
Creates a component. No parameters are read from an HTML file.

 o JCBufferedComponent
 public JCBufferedComponent(Applet applet,
                            String name)
Creates a component which reads parameters from the applet's HTML file.

Parameters:
applet - the applet whose PARAM tags are to be read
name - if this is not null, only parameters preceded by this name are read
See Also:
getParameter

Methods

 o setDoubleBuffer
 public void setDoubleBuffer(boolean v)
Must be double-buffered.

Overrides:
setDoubleBuffer in class JCComponent
 o invalidate
 public void invalidate()
Nulls out the offscreen buffer as part of invalidation

Overrides:
invalidate in class Component
 o getDoubleBufferImage
 public Image getDoubleBufferImage()
Returns the double-buffer image previously created in a call to getDoubleBufferGraphics.

Overrides:
getDoubleBufferImage in class JCComponent
 o reshape
 public void reshape(int x,
                     int y,
                     int width,
                     int height)
Reshapes the Component to the specified bounding box.

Overrides:
reshape in class JCComponent
 o getDoubleBufferGraphics
 public synchronized Graphics getDoubleBufferGraphics()
Creates a double-buffer image

Overrides:
getDoubleBufferGraphics in class JCComponent
 o paint
 public void paint(Graphics gc)
An internal method used to handle repaint events.

Overrides:
paint in class JCComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index