bibliothek.gui.dock.util
Interface BackgroundPaint


@Todo(target=VERSION_1_1_1,
      compatibility=BREAK_MINOR,
      priority=MINOR,
      description="allow BackgroundPaint to enabled/disable transparency")
public interface BackgroundPaint

A BackgroundPaint is used to paint the background of various Components of this framework.
Please note that some items provided by a DockTheme do not use a BackgroundPaint because they already paint their background in a specific way.

Author:
Benjamin Sigg

Method Summary
 void install(BackgroundComponent component)
          Informs this paint that is will be used by component.
 void paint(BackgroundComponent background, PaintableComponent paintable, java.awt.Graphics g)
          Paints the background component using the graphics context g.
 void uninstall(BackgroundComponent component)
          Informs this paint that it is no longer used by component.
 

Method Detail

install

void install(BackgroundComponent component)
Informs this paint that is will be used by component.

Parameters:
component - the component that is going to use this paint, not null

uninstall

void uninstall(BackgroundComponent component)
Informs this paint that it is no longer used by component.

Parameters:
component - the component that no longer uses this paint, not null

paint

void paint(BackgroundComponent background,
           PaintableComponent paintable,
           java.awt.Graphics g)
Paints the background component using the graphics context g. The exact behavior of this method may depend on the type of component.
This method should be aware of the methods PaintableComponent.paintBackground(Graphics) and PaintableComponent.paintForeground(Graphics): Further more implementations should follow these guide lines to prevent artifacts while painting:

Parameters:
background - the component to paint, is installed on this paint, not null
paintable - the part of the component that is to be painted, may be a child-Component
g - the graphics context to use
Throws:
java.lang.IllegalArgumentException - if component is not equal to background or not a child of background