bibliothek.gui.dock.util
Class AbstractPaintableComponent

java.lang.Object
  extended by bibliothek.gui.dock.util.AbstractPaintableComponent
All Implemented Interfaces:
PaintableComponent

public abstract class AbstractPaintableComponent
extends java.lang.Object
implements PaintableComponent

A default implementation of a PaintableComponent.

Author:
Benjamin Sigg

Constructor Summary
AbstractPaintableComponent(BackgroundComponent background, java.awt.Component component, BackgroundPaint paint)
          Creates a new paintable component.
 
Method Summary
protected abstract  void background(java.awt.Graphics g)
          Paints the background of the component.
protected abstract  void border(java.awt.Graphics g)
          Paints the overlay of this component.
protected abstract  void children(java.awt.Graphics g)
          Paints the children of this component.
protected abstract  void foreground(java.awt.Graphics g)
          Paints the foreground of the component.
 java.awt.Component getComponent()
          Gets the Component which is to be painted.
protected abstract  void overlay(java.awt.Graphics g)
          Paints an overlay over the children of this component.
 void paint(java.awt.Graphics g)
          Paints this component using the BackgroundPaint if present.
 void paintBackground(java.awt.Graphics g)
          Invokes the standard algorithm that paints the background of the component.
 void paintBorder(java.awt.Graphics g)
          Invokes the standard algorithm that paints the border of the component.
 void paintChildren(java.awt.Graphics g)
          Invokes the standard algorithm that paints the children of the component.
 void paintForeground(java.awt.Graphics g)
          Invokes the standard algorithm that paints the foreground of the component.
 void paintOverlay(java.awt.Graphics g)
          Invokes the standard algorithm that paints an overlay over the children of the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.util.PaintableComponent
isSolid, isTransparent
 

Constructor Detail

AbstractPaintableComponent

public AbstractPaintableComponent(BackgroundComponent background,
                                  java.awt.Component component,
                                  BackgroundPaint paint)
Creates a new paintable component.

Parameters:
background - the owner of this PaintableComponent, can be null
component - the component which is painted by this object, must not be null
paint - the algorithm to use for painting, can be null
Method Detail

getComponent

public java.awt.Component getComponent()
Description copied from interface: PaintableComponent
Gets the Component which is to be painted.

Specified by:
getComponent in interface PaintableComponent
Returns:
the item to paint

paint

public void paint(java.awt.Graphics g)
Paints this component using the BackgroundPaint if present.

Parameters:
g - the graphics context to use

paintBackground

public void paintBackground(java.awt.Graphics g)
Description copied from interface: PaintableComponent
Invokes the standard algorithm that paints the background of the component. This method should be called at most once.

Specified by:
paintBackground in interface PaintableComponent
Parameters:
g - the graphics context to use, null to just inform this component that the background should not be painted automatically

paintForeground

public void paintForeground(java.awt.Graphics g)
Description copied from interface: PaintableComponent
Invokes the standard algorithm that paints the foreground of the component. This method should be called at most once.

Specified by:
paintForeground in interface PaintableComponent
Parameters:
g - the graphics context to use, null to just inform this component that the foreground should not be painted automatically

paintBorder

public void paintBorder(java.awt.Graphics g)
Description copied from interface: PaintableComponent
Invokes the standard algorithm that paints the border of the component. This method should be called at most once.

Specified by:
paintBorder in interface PaintableComponent
Parameters:
g - the graphics context to use, null to just inform this component that the background should not be painted automatically

paintChildren

public void paintChildren(java.awt.Graphics g)
Description copied from interface: PaintableComponent
Invokes the standard algorithm that paints the children of the component. This method should be called at most once.

Specified by:
paintChildren in interface PaintableComponent
Parameters:
g - the graphics context to use, null to just inform this component that the background should not be painted automatically

paintOverlay

public void paintOverlay(java.awt.Graphics g)
Description copied from interface: PaintableComponent
Invokes the standard algorithm that paints an overlay over the children of the component. This method should be called at most once.

Specified by:
paintOverlay in interface PaintableComponent
Parameters:
g - the graphics context to use, null to just inform this component that the background should not be painted automatically

background

protected abstract void background(java.awt.Graphics g)
Paints the background of the component.

Parameters:
g - the graphics context to use

foreground

protected abstract void foreground(java.awt.Graphics g)
Paints the foreground of the component.

Parameters:
g - the graphics context to use

border

protected abstract void border(java.awt.Graphics g)
Paints the overlay of this component.

Parameters:
g - the graphics context to use

children

protected abstract void children(java.awt.Graphics g)
Paints the children of this component.

Parameters:
g - the graphics context to use

overlay

protected abstract void overlay(java.awt.Graphics g)
Paints an overlay over the children of this component.

Parameters:
g - the graphics context to use