bibliothek.gui.dock.util
Interface PaintableComponent

All Known Implementing Classes:
AbstractBubbleDockTitle, AbstractDockTitle, AbstractPaintableComponent, ArchGradientPainter, BackgroundPanel, BaseTabComponent, BasicButtonDockTitle, BasicDockableDisplayer, BasicDockTitle, BasicStationTitle, BasicTabDockTitle, BubbleButtonDockTitle, BubbleDisplayer, BubbleDockTitle, BubbleTab, CombinedStackDockContentPane, EclipseBasicDockableDisplayer, EclipseButtonTitle, EclipseTabPaneContent, FlatButtonTitle, FlatDockableDisplayer, FlatTab, NoTitleDisplayer, OrientedLabel, RectGradientPainter, SmoothDefaultButtonTitle, SmoothDefaultStationTitle, SmoothDefaultTitle

public interface PaintableComponent

A wrapper around a Component whose paint algorithm may be modified by a BackgroundPaint. This provider of this method may paint some parts automatically if the appropriate method is not called. The usual order in which the paint methods should be executed is:

  1. paintBackground(Graphics)
  2. paintForeground(Graphics)
  3. paintBorder(Graphics)
  4. paintChildren(Graphics)
  5. paintOverlay(Graphics)

Author:
Benjamin Sigg

Method Summary
 java.awt.Component getComponent()
          Gets the Component which is to be painted.
 boolean isSolid()
          If a component is solid, then it paints every pixel with a non-transparent color.
 boolean isTransparent()
          If a component is transparent, then it does not paint anything (except the border).
 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.
 

Method Detail

getComponent

java.awt.Component getComponent()
Gets the Component which is to be painted.

Returns:
the item to paint

isTransparent

boolean isTransparent()
If a component is transparent, then it does not paint anything (except the border).

Returns:
whether the component paints at least one pixel

isSolid

boolean isSolid()
If a component is solid, then it paints every pixel with a non-transparent color.

Returns:
whether every pixel is painted

paintBackground

void paintBackground(java.awt.Graphics g)
Invokes the standard algorithm that paints the background of the component. This method should be called at most once.

Parameters:
g - the graphics context to use, null to just inform this component that the background should not be painted automatically

paintForeground

void paintForeground(java.awt.Graphics g)
Invokes the standard algorithm that paints the foreground of the component. This method should be called at most once.

Parameters:
g - the graphics context to use, null to just inform this component that the foreground should not be painted automatically

paintBorder

void paintBorder(java.awt.Graphics g)
Invokes the standard algorithm that paints the border of the component. This method should be called at most once.

Parameters:
g - the graphics context to use, null to just inform this component that the background should not be painted automatically

paintChildren

void paintChildren(java.awt.Graphics g)
Invokes the standard algorithm that paints the children of the component. This method should be called at most once.

Parameters:
g - the graphics context to use, null to just inform this component that the background should not be painted automatically

paintOverlay

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

Parameters:
g - the graphics context to use, null to just inform this component that the background should not be painted automatically