All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gjt.DoubleBufferedContainer

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----gjt.DoubleBufferedContainer

public class DoubleBufferedContainer
extends Container
A double-buffered container that can be used for animation (see Playfield) or for dragging and dropping lightweight components. A DoubleBufferedContainer has 2 offscreen buffers: one for the background (alone), and a workplace buffer for drawing into offscreen. DoubleBufferedContainer provides a number of methods for controlling blitting between background, workplace and the screen itself. For instance, blitBackgroundToWorkplace() blits the entire background to the workpace buffer, but not to the screen. Later on, one could invoke blitWorkPlaceToScreen(Rectangle), and the workplace would be blitted to the screen, clipped by the specified rectangle.

See Also:
Playfield, DoubleBufferedContainerTest

Variable Index

 o buffers

Constructor Index

 o DoubleBufferedContainer()
 o DoubleBufferedContainer(Image)

Method Index

 o blitBackgroundToWorkplace()
 o blitBackgroundToWorkplace(Rectangle)
 o blitWorkplaceToScreen()
 o blitWorkplaceToScreen(Rectangle)
 o eraseComponent(Component)
 o eraseComponent(Component, boolean)
 o moveComponent(Component, Point)
 o paint(Graphics)
 o paintBackground()
 o paintBackground(Graphics)
 o paintBackground(Rectangle)
 o paintComponent(Component)
 o paintComponent(Component, boolean)
 o paintComponents(Rectangle, boolean)
 o paintOverlappingComponents(Component)
 o setWallpaperImage(Image)
 o update(Graphics)
 o windowDamaged(Graphics)

Variables

 o buffers
 protected DoubleBufferedContainer. OffscreenBuffer buffers

Constructors

 o DoubleBufferedContainer
 public DoubleBufferedContainer()
 o DoubleBufferedContainer
 public DoubleBufferedContainer(Image wallpaperImage)

Methods

 o setWallpaperImage
 public void setWallpaperImage(Image image)
 o update
 public void update(Graphics g)
Overrides:
update in class Component
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Container
 o blitWorkplaceToScreen
 public void blitWorkplaceToScreen()
 o blitBackgroundToWorkplace
 public void blitBackgroundToWorkplace()
 o blitWorkplaceToScreen
 public void blitWorkplaceToScreen(Rectangle clip)
 o blitBackgroundToWorkplace
 public void blitBackgroundToWorkplace(Rectangle clip)
 o paintComponents
 public void paintComponents(Rectangle clip,
                             boolean update)
 o paintComponent
 public void paintComponent(Component comp)
 o eraseComponent
 public void eraseComponent(Component comp)
 o paintComponent
 public void paintComponent(Component comp,
                            boolean update)
 o eraseComponent
 public void eraseComponent(Component comp,
                            boolean update)
 o moveComponent
 public void moveComponent(Component comp,
                           Point newLoc)
 o windowDamaged
 protected boolean windowDamaged(Graphics g)
 o paintOverlappingComponents
 protected void paintOverlappingComponents(Component comp)
 o paintBackground
 protected void paintBackground()
 o paintBackground
 protected void paintBackground(Rectangle clip)
 o paintBackground
 protected void paintBackground(Graphics g)

All Packages  Class Hierarchy  This Package  Previous  Next  Index