net.infonode.tabbedpanel.border
Class GradientTabAreaBorder

java.lang.Object
  extended by net.infonode.tabbedpanel.border.GradientTabAreaBorder
All Implemented Interfaces:
java.io.Serializable, javax.swing.border.Border

public class GradientTabAreaBorder
extends java.lang.Object
implements javax.swing.border.Border, java.io.Serializable

Paints a gradient background for a tab area component. The background blends from one color on the component edge opposite to the tabbed panel content panel to the another color on the component edge closest to the tabbed panel content panel.

Since:
ITP 1.1.0
Version:
$Revision: 1.16 $
Author:
$Author: jesper $
See Also:
Serialized Form

Field Summary
private  GradientComponentPainter painter
           
private static long serialVersionUID
           
 
Constructor Summary
GradientTabAreaBorder(java.awt.Color topColor)
          Creates a border where the color of the component edge closest to the tabben panel content panel will be the default control color.
GradientTabAreaBorder(java.awt.Color topColor, java.awt.Color bottomColor)
          Constructor.
GradientTabAreaBorder(ColorProvider topColorProvider, ColorProvider bottomColorProvider)
          Constructor.
 
Method Summary
 java.awt.Insets getBorderInsets(java.awt.Component c)
           
 boolean isBorderOpaque()
           
 void paintBorder(java.awt.Component component, java.awt.Graphics g, int x, int y, int width, int height)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

painter

private GradientComponentPainter painter
Constructor Detail

GradientTabAreaBorder

public GradientTabAreaBorder(java.awt.Color topColor)
Creates a border where the color of the component edge closest to the tabben panel content panel will be the default control color.

Parameters:
topColor - the color of the component edge opposite to the tabbed panel content panel

GradientTabAreaBorder

public GradientTabAreaBorder(java.awt.Color topColor,
                             java.awt.Color bottomColor)
Constructor.

Parameters:
topColor - the color of the component edge opposite to the tabbed panel content panel
bottomColor - the color of the component edge closest to the tabbed panel content panel

GradientTabAreaBorder

public GradientTabAreaBorder(ColorProvider topColorProvider,
                             ColorProvider bottomColorProvider)
Constructor.

Parameters:
topColorProvider - provides the color of the component edge opposite to the tabbed panel content panel
bottomColorProvider - provides the color of the component edge closest to the tabbed panel content panel
Method Detail

isBorderOpaque

public boolean isBorderOpaque()
Specified by:
isBorderOpaque in interface javax.swing.border.Border

paintBorder

public void paintBorder(java.awt.Component component,
                        java.awt.Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Specified by:
paintBorder in interface javax.swing.border.Border

getBorderInsets

public java.awt.Insets getBorderInsets(java.awt.Component c)
Specified by:
getBorderInsets in interface javax.swing.border.Border