Package net.infonode.gui.shaped.border
Class AbstractPolygonBorder
java.lang.Object
net.infonode.gui.shaped.border.AbstractShapedBorder
net.infonode.gui.shaped.border.AbstractPolygonBorder
- All Implemented Interfaces:
Serializable
,Border
,ShapedBorder
- Direct Known Subclasses:
PolygonBorder
,SlopedTabLineBorder
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractPolygonBorder
(ColorProvider lineColor) protected
AbstractPolygonBorder
(ColorProvider lineColor, ColorProvider highlightColor) protected
AbstractPolygonBorder
(ColorProvider lineColor, ColorProvider highlightColor, ColorProvider middleColor, ColorProvider shadowColor) -
Method Summary
Modifier and TypeMethodDescriptionprotected Polygon
createPolygon
(Component c, int width, int height) protected int
getHighlightOffsetX
(int deltaX, int deltaY) protected int
getHighlightOffsetY
(int deltaX, int deltaY) Gets the shape of this border.protected Insets
protected Insets
boolean
protected boolean
isHighlightable
(int deltaX, int deltaY) protected boolean
protected boolean
lineIsDrawn
(int index, Polygon polygon) void
paintBorder
(Component c, Graphics g, int x, int y, int width, int height) protected void
paintHighlight
(Component c, Graphics2D g, Polygon polygon, int width, int height) protected void
paintPolygon
(Component c, Graphics2D g, Polygon polygon, int width, int height) protected void
-
Constructor Details
-
AbstractPolygonBorder
-
AbstractPolygonBorder
-
AbstractPolygonBorder
protected AbstractPolygonBorder(ColorProvider lineColor, ColorProvider highlightColor, ColorProvider middleColor, ColorProvider shadowColor)
-
-
Method Details
-
getShape
Description copied from interface:ShapedBorder
Gets the shape of this border.
- Parameters:
c
- the component to create a shape forx
- the x offsety
- the y offsetwidth
- the widthheight
- the height- Returns:
- the Shape for this border or null if there is no shape and the normal rectangle bounds should be used
-
isBorderOpaque
public boolean isBorderOpaque() -
paintBorder
-
getBorderInsets
-
getShapedBorderInsets
-
getShapedBorderHighlightInsets
-
createPolygon
-
paintPolygon
-
paintHighlight
-
lineIsDrawn
-
isHighlightable
protected boolean isHighlightable(int deltaX, int deltaY) -
isPointsClockwise
-
getHighlightOffsetX
protected int getHighlightOffsetX(int deltaX, int deltaY) -
getHighlightOffsetY
protected int getHighlightOffsetY(int deltaX, int deltaY) -
setPoint
-