Package net.infonode.tabbedpanel.border
Class GradientTabAreaBorder
- java.lang.Object
-
- 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.SerializablePaints 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 $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private GradientComponentPainterpainterprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.InsetsgetBorderInsets(java.awt.Component c)booleanisBorderOpaque()voidpaintBorder(java.awt.Component component, java.awt.Graphics g, int x, int y, int width, int height)
-
-
-
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 panelbottomColor- 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 panelbottomColorProvider- provides the color of the component edge closest to the tabbed panel content panel
-
-
Method Detail
-
isBorderOpaque
public boolean isBorderOpaque()
- Specified by:
isBorderOpaquein interfacejavax.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:
paintBorderin interfacejavax.swing.border.Border
-
getBorderInsets
public java.awt.Insets getBorderInsets(java.awt.Component c)
- Specified by:
getBorderInsetsin interfacejavax.swing.border.Border
-
-