net.infonode.tabbedpanel.internal
Class SlopedTabLineBorder
java.lang.Object
net.infonode.gui.shaped.border.AbstractShapedBorder
net.infonode.gui.shaped.border.AbstractPolygonBorder
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
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 |
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
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)
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