bibliothek.gui.dock.util
Interface AWTComponentCaptureStrategy


public interface AWTComponentCaptureStrategy

Used to capture an image of a Component which either is from AWT, or has children from AWT.

Author:
Benjamin Sigg

Field Summary
static AWTComponentCaptureStrategy PAINT_ALL_STRATEGY
          This strategy calls Component.paintAll(Graphics) on the given component.
static AWTComponentCaptureStrategy RECURSIVE_PAINT_STRATEGY
          This strategy calls Component.paintAll(Graphics) recursively on all Components.
static AWTComponentCaptureStrategy SCREEN_CAPTURE_STRATEGY
          This strategy just takes a real screen capture of the area in which the component is supposed to be.
static PropertyKey<AWTComponentCaptureStrategy> STRATEGY
          The PropertyKey for a AWTComponentCaptureStrategy.
 
Method Summary
 BufferedImage createCapture(DockController controller, Component component)
          Creates a new image that has the same size as component and contains all the things painted on component.
 

Field Detail

SCREEN_CAPTURE_STRATEGY

static final AWTComponentCaptureStrategy SCREEN_CAPTURE_STRATEGY
This strategy just takes a real screen capture of the area in which the component is supposed to be.


RECURSIVE_PAINT_STRATEGY

static final AWTComponentCaptureStrategy RECURSIVE_PAINT_STRATEGY
This strategy calls Component.paintAll(Graphics) recursively on all Components.


PAINT_ALL_STRATEGY

static final AWTComponentCaptureStrategy PAINT_ALL_STRATEGY
This strategy calls Component.paintAll(Graphics) on the given component.


STRATEGY

static final PropertyKey<AWTComponentCaptureStrategy> STRATEGY
The PropertyKey for a AWTComponentCaptureStrategy.

Method Detail

createCapture

BufferedImage createCapture(DockController controller,
                            Component component)
Creates a new image that has the same size as component and contains all the things painted on component.

Parameters:
controller - the controller for which the image is needed
component - the component to paint, its width and height must be at least 1.
Returns:
the new image or null if no image can be created