net.infonode.tabbedpanel.internal
Class SlopedTabLineBorder

java.lang.Object
  extended by net.infonode.gui.shaped.border.AbstractShapedBorder
      extended by net.infonode.gui.shaped.border.AbstractPolygonBorder
          extended by net.infonode.tabbedpanel.internal.SlopedTabLineBorder
All Implemented Interfaces:
java.io.Serializable, javax.swing.border.Border, ShapedBorder
Direct Known Subclasses:
ShapedGradientTheme.TabBorder

public class SlopedTabLineBorder
extends AbstractPolygonBorder

Since:
1.2.0
Author:
johan
See Also:
Serialized Form

Field Summary
private  boolean bottomLeftRounded
           
private  boolean bottomRightRounded
           
private static int[][][] corners
           
private  boolean drawBottomLine
           
private static int index
           
private  int leftHeight
           
private  float leftSlope
           
private  int rightHeight
           
private  float rightSlope
           
private static long serialVersionUID
           
private  boolean topLeftRounded
           
private  boolean topRightRounded
           
private static int x
           
private static int[] xCoords
           
private static int y
           
private static int[] yCoords
           
 
Constructor Summary
SlopedTabLineBorder()
           
SlopedTabLineBorder(ColorProvider lineColor, ColorProvider highlightColor, boolean drawBottomLine, float leftSlope, float rightSlope, int leftHeight, int rightHeight, boolean bottomLeftRounded, boolean topLeftRounded, boolean topRightRounded, boolean bottomRightRounded)
           
SlopedTabLineBorder(float leftSlope, float rightSlope)
           
SlopedTabLineBorder(float leftSlope, float rightSlope, boolean bottomLeftRounded, boolean topLeftRounded, boolean topRightRounded, boolean bottomRightRounded)
           
SlopedTabLineBorder(float leftSlope, float rightSlope, int leftHeight, int rightHeight)
           
SlopedTabLineBorder(float leftSlope, float rightSlope, int leftHeight, int rightHeight, boolean bottomLeftRounded, boolean topLeftRounded, boolean topRightRounded, boolean bottomRightRounded)
           
 
Method Summary
private static void addCorner(int px, int py, int[] c)
           
private static void addPoint(int px, int py)
           
protected  java.awt.Polygon createPolygon(java.awt.Component c, int width, int height)
           
private static int[] getCorner(int type, float slope, boolean rounded)
           
private static int getEndY(int[] corner)
           
protected  java.awt.Insets getShapedBorderInsets(java.awt.Component c)
           
private static int getStartY(int[] corner)
           
protected  boolean isBottomLeftRounded(java.awt.Component c)
           
protected  boolean lineIsDrawn(int index, java.awt.Polygon polygon)
           
 
Methods inherited from class net.infonode.gui.shaped.border.AbstractPolygonBorder
getBorderInsets, getHighlightOffsetX, getHighlightOffsetY, getShape, getShapedBorderHighlightInsets, isBorderOpaque, isHighlightable, isPointsClockwise, paintBorder, paintHighlight, paintPolygon, 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

corners

private static final int[][][] corners

drawBottomLine

private boolean drawBottomLine

leftSlope

private float leftSlope

rightSlope

private float rightSlope

bottomLeftRounded

private boolean bottomLeftRounded

topLeftRounded

private boolean topLeftRounded

topRightRounded

private boolean topRightRounded

bottomRightRounded

private boolean bottomRightRounded

leftHeight

private int leftHeight

rightHeight

private int rightHeight

xCoords

private static int[] xCoords

yCoords

private static int[] yCoords

x

private static int x

y

private static int y

index

private static int index
Constructor Detail

SlopedTabLineBorder

public SlopedTabLineBorder()

SlopedTabLineBorder

public SlopedTabLineBorder(float leftSlope,
                           float rightSlope)

SlopedTabLineBorder

public SlopedTabLineBorder(float leftSlope,
                           float rightSlope,
                           int leftHeight,
                           int rightHeight)

SlopedTabLineBorder

public SlopedTabLineBorder(float leftSlope,
                           float rightSlope,
                           boolean bottomLeftRounded,
                           boolean topLeftRounded,
                           boolean topRightRounded,
                           boolean bottomRightRounded)

SlopedTabLineBorder

public SlopedTabLineBorder(float leftSlope,
                           float rightSlope,
                           int leftHeight,
                           int rightHeight,
                           boolean bottomLeftRounded,
                           boolean topLeftRounded,
                           boolean topRightRounded,
                           boolean bottomRightRounded)

SlopedTabLineBorder

public SlopedTabLineBorder(ColorProvider lineColor,
                           ColorProvider highlightColor,
                           boolean drawBottomLine,
                           float leftSlope,
                           float rightSlope,
                           int leftHeight,
                           int rightHeight,
                           boolean bottomLeftRounded,
                           boolean topLeftRounded,
                           boolean topRightRounded,
                           boolean bottomRightRounded)
Method Detail

lineIsDrawn

protected boolean lineIsDrawn(int index,
                              java.awt.Polygon polygon)
Overrides:
lineIsDrawn in class AbstractPolygonBorder

getShapedBorderInsets

protected java.awt.Insets getShapedBorderInsets(java.awt.Component c)
Overrides:
getShapedBorderInsets in class AbstractPolygonBorder

isBottomLeftRounded

protected boolean isBottomLeftRounded(java.awt.Component c)

getCorner

private static int[] getCorner(int type,
                               float slope,
                               boolean rounded)

addPoint

private static void addPoint(int px,
                             int py)

addCorner

private static void addCorner(int px,
                              int py,
                              int[] c)

getStartY

private static int getStartY(int[] corner)

getEndY

private static int getEndY(int[] corner)

createPolygon

protected java.awt.Polygon createPolygon(java.awt.Component c,
                                         int width,
                                         int height)
Overrides:
createPolygon in class AbstractPolygonBorder