net.infonode.tabbedpanel.border
Class OpenContentBorder

java.lang.Object
  extended bynet.infonode.tabbedpanel.border.OpenContentBorder
All Implemented Interfaces:
Border, Serializable

public class OpenContentBorder
extends Object
implements Border, Serializable

OpenContentBorder is a border that draws a 1 pixel wide line border around a component that is used as content area component in a tabbed panel. The border also optionally draws a highlight inside the line on the top and left sides of the component. It is open, i.e. no content border will be drawn where the highlighted tab in the tabbed panel is located.

If the highlighted tab has a ShapedBorder its shape will be used to calculate where the OpenContentBorder should be open.

Version:
$Revision: 1.31 $
See Also:
TabbedPanel, Serialized Form

Constructor Summary
OpenContentBorder()
          Constructor.
OpenContentBorder(Color color)
          Constructs a OpenContentBorder without highlight and with the given color as line color.
OpenContentBorder(Color color, Color highlightColor)
          Constructs a OpenContentBorder with highlight and with the given colors as line color and highlight color.
OpenContentBorder(Color color, int tabLeftInset)
          Constructor.
OpenContentBorder(ColorProvider topLeftLineColor, ColorProvider bottomRightLineColor, ColorProvider highlightColorProvider, int tabLeftInset)
          Constructs a OpenContentBorder with highlight and with the given colors as line color and highlight color.
OpenContentBorder(ColorProvider lineColor, ColorProvider highlightColorProvider, int tabLeftInset)
          Constructs a OpenContentBorder with highlight and with the given colors as line color and highlight color.
 
Method Summary
 Insets getBorderInsets(Component c)
           
 boolean isBorderOpaque()
           
 void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenContentBorder

public OpenContentBorder(Color color,
                         int tabLeftInset)
Constructor.

Parameters:
color - the line color
tabLeftInset - the left border inset of the tab

OpenContentBorder

public OpenContentBorder()
Constructor. Uses the TabbedPane.darkShadow color from the UIManager as line color.


OpenContentBorder

public OpenContentBorder(Color color)
Constructs a OpenContentBorder without highlight and with the given color as line color.

Parameters:
color - the line color

OpenContentBorder

public OpenContentBorder(Color color,
                         Color highlightColor)
Constructs a OpenContentBorder with highlight and with the given colors as line color and highlight color.

Parameters:
color - the line color
highlightColor - the highlight color

OpenContentBorder

public OpenContentBorder(ColorProvider lineColor,
                         ColorProvider highlightColorProvider,
                         int tabLeftInset)
Constructs a OpenContentBorder with highlight and with the given colors as line color and highlight color.

Parameters:
lineColor - the line color provider
highlightColorProvider - the highlight color provider
tabLeftInset - the left border inset of the tab

OpenContentBorder

public OpenContentBorder(ColorProvider topLeftLineColor,
                         ColorProvider bottomRightLineColor,
                         ColorProvider highlightColorProvider,
                         int tabLeftInset)
Constructs a OpenContentBorder with highlight and with the given colors as line color and highlight color.

Parameters:
topLeftLineColor - the line color provider for the top and left lines
bottomRightLineColor - the line color provider for the bottom and right lines
highlightColorProvider - the highlight color provider
tabLeftInset - the left border inset of the tab
Method Detail

paintBorder

public void paintBorder(Component c,
                        Graphics g,
                        int x,
                        int y,
                        int width,
                        int height)
Specified by:
paintBorder in interface Border

getBorderInsets

public Insets getBorderInsets(Component c)
Specified by:
getBorderInsets in interface Border

isBorderOpaque

public boolean isBorderOpaque()
Specified by:
isBorderOpaque in interface Border


Copyright © 2007 NNL Technology AB. All Rights Reserved.