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
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private booleanbottomLeftRoundedprivate booleanbottomRightRoundedprivate static int[][][]cornersprivate booleandrawBottomLineprivate static intindexprivate intleftHeightprivate floatleftSlopeprivate intrightHeightprivate floatrightSlopeprivate static longserialVersionUIDprivate booleantopLeftRoundedprivate booleantopRightRoundedprivate static intxprivate static int[]xCoordsprivate static intyprivate static int[]yCoords
-
Constructor Summary
Constructors Constructor Description SlopedTabLineBorder()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)SlopedTabLineBorder(ColorProvider lineColor, ColorProvider highlightColor, boolean drawBottomLine, float leftSlope, float rightSlope, int leftHeight, int rightHeight, boolean bottomLeftRounded, boolean topLeftRounded, boolean topRightRounded, boolean bottomRightRounded)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidaddCorner(int px, int py, int[] c)private static voidaddPoint(int px, int py)protected java.awt.PolygoncreatePolygon(java.awt.Component c, int width, int height)private static int[]getCorner(int type, float slope, boolean rounded)private static intgetEndY(int[] corner)protected java.awt.InsetsgetShapedBorderInsets(java.awt.Component c)private static intgetStartY(int[] corner)protected booleanisBottomLeftRounded(java.awt.Component c)protected booleanlineIsDrawn(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
-
-
-
-
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:
lineIsDrawnin classAbstractPolygonBorder
-
getShapedBorderInsets
protected java.awt.Insets getShapedBorderInsets(java.awt.Component c)
- Overrides:
getShapedBorderInsetsin classAbstractPolygonBorder
-
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:
createPolygonin classAbstractPolygonBorder
-
-