net.infonode.tabbedpanel.internal
Class TwoColoredLineBorder

java.lang.Object
  extended by net.infonode.gui.shaped.border.AbstractShapedBorder
      extended by net.infonode.gui.shaped.border.AbstractPolygonBorder
          extended by net.infonode.gui.shaped.border.PolygonBorder
              extended by net.infonode.gui.shaped.border.RoundedCornerBorder
                  extended by net.infonode.tabbedpanel.internal.TwoColoredLineBorder
All Implemented Interfaces:
java.io.Serializable, javax.swing.border.Border, ShapedBorder

public class TwoColoredLineBorder
extends RoundedCornerBorder

TwoColoredLineBorder draws a 1 pixel wide line. The border can have one color for the top and left line and another color for the bottom and right line.

Since:
ITP 1.2.0
Version:
$Revision: 1.7 $
Author:
$Author: jesper $
See Also:
TitledTab, TabbedPanel, Serialized Form

Field Summary
private  ColorProvider bottomRightColor
           
private  boolean open
           
private  boolean roundCorners
           
private static long serialVersionUID
           
private  ColorProvider topLeftColor
           
 
Constructor Summary
TwoColoredLineBorder(ColorProvider topLeftColor, ColorProvider bottomRightColor, boolean roundCorners, boolean open)
          Constructs a TwoColoredLineBorder
 
Method Summary
protected  void paintPolygon(java.awt.Component c, java.awt.Graphics2D g, java.awt.Polygon polygon, int width, int height)
           
 
Methods inherited from class net.infonode.gui.shaped.border.RoundedCornerBorder
getShapedBorderInsets
 
Methods inherited from class net.infonode.gui.shaped.border.PolygonBorder
createPolygon
 
Methods inherited from class net.infonode.gui.shaped.border.AbstractPolygonBorder
getBorderInsets, getHighlightOffsetX, getHighlightOffsetY, getShape, getShapedBorderHighlightInsets, isBorderOpaque, isHighlightable, isPointsClockwise, lineIsDrawn, paintBorder, paintHighlight, setPoint
 
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

topLeftColor

private ColorProvider topLeftColor

bottomRightColor

private ColorProvider bottomRightColor

roundCorners

private boolean roundCorners

open

private boolean open
Constructor Detail

TwoColoredLineBorder

public TwoColoredLineBorder(ColorProvider topLeftColor,
                            ColorProvider bottomRightColor,
                            boolean roundCorners,
                            boolean open)
Constructs a TwoColoredLineBorder

Parameters:
topLeftColor - the colorprovider for the top and left lines
bottomRightColor - the colorprovider for the bottom and right lines
roundCorners - true for round corners on the side facing away from the tab area
open - true for no border on the side towards the tab area
Method Detail

paintPolygon

protected void paintPolygon(java.awt.Component c,
                            java.awt.Graphics2D g,
                            java.awt.Polygon polygon,
                            int width,
                            int height)
Overrides:
paintPolygon in class AbstractPolygonBorder