net.infonode.tabbedpanel.border
Class TabHighlightBorder

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

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

TabHighlightBorder draws a 1 pixel wide highlight on the top and left side of the tab. It will not draw highlight on the side towards a TabbedPanel's content area if the border is constructed with open border.

Version:
$Revision: 1.19 $
Author:
$Author: jesper $
See Also:
Tab, TabbedPanel, TabbedPanelProperties, Serialized Form

Constructor Summary
TabHighlightBorder()
          Constructs a TabHighlightBorder that acts as an empty border, i.e.
TabHighlightBorder(java.awt.Color color, boolean openBorder)
          Constructs a TabHighlightBorder with the given color as highlight color
TabHighlightBorder(ColorProvider colorProvider, boolean openBorder)
          Constructs a TabHighlightBorder with the given color as highlight color
 
Method Summary
 java.awt.Insets getBorderInsets(java.awt.Component c)
           
 boolean isBorderOpaque()
           
 void paintBorder(java.awt.Component c, 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
 

Constructor Detail

TabHighlightBorder

public TabHighlightBorder()
Constructs a TabHighlightBorder that acts as an empty border, i.e. no highlight is drawn but it will report the same insets as if the highlight was drawn


TabHighlightBorder

public TabHighlightBorder(java.awt.Color color,
                          boolean openBorder)
Constructs a TabHighlightBorder with the given color as highlight color

Parameters:
color - the highlight color
openBorder - when true, no highlighting is drawn on the side towards a TabbedPanel's content area, otherwise false

TabHighlightBorder

public TabHighlightBorder(ColorProvider colorProvider,
                          boolean openBorder)
Constructs a TabHighlightBorder with the given color as highlight color

Parameters:
colorProvider - the highlight color provider
openBorder - when true, no highlighting is drawn on the side towards a TabbedPanel's content area, otherwise false
Method Detail

paintBorder

public void paintBorder(java.awt.Component c,
                        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

isBorderOpaque

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