Package edu.wisc.ssec.mcidasv.ui
Class PartialLineBorder
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.LineBorder
edu.wisc.ssec.mcidasv.ui.PartialLineBorder
- All Implemented Interfaces:
Serializable
,Border
This is a better version of LineBorder which allows you to show line only at one side or several
sides and supports rounded corner.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private int
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
(package private) static final int
Fields inherited from class javax.swing.border.LineBorder
lineColor, roundedCorners, thickness
-
Constructor Summary
ConstructorsConstructorDescriptionPartialLineBorder
(Color color) PartialLineBorder
(Color color, int thickness) PartialLineBorder
(Color color, int thickness, boolean roundedCorners) PartialLineBorder
(Color color, int thickness, boolean roundedCorners, int roundedCornerSize) PartialLineBorder
(Color color, int thickness, int side) -
Method Summary
Modifier and TypeMethodDescriptiongetBorderInsets
(Component c, Insets insets) int
int
getSides()
void
paintBorder
(Component c, Graphics g, int x, int y, int width, int height) private static void
restoreShapeAntialiasing
(Graphics g, Object oldHints) Restores the old setting for shape anti-alias.void
setRoundedCornerSize
(int roundedCornerSize) void
setSides
(int sides) private static Object
Setups the graphics to draw shape using anti-alias.Methods inherited from class javax.swing.border.LineBorder
createBlackLineBorder, createGrayLineBorder, getLineColor, getRoundedCorners, getThickness, isBorderOpaque
Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle
-
Field Details
-
NORTH
- See Also:
-
SOUTH
- See Also:
-
EAST
- See Also:
-
WEST
- See Also:
-
HORIZONTAL
- See Also:
-
VERTICAL
- See Also:
-
ALL
- See Also:
-
_sides
-
_roundedCornerSize
-
-
Constructor Details
-
PartialLineBorder
-
PartialLineBorder
-
PartialLineBorder
-
PartialLineBorder
-
PartialLineBorder
-
-
Method Details
-
getSides
-
setSides
-
getRoundedCornerSize
-
setRoundedCornerSize
-
paintBorder
- Specified by:
paintBorder
in interfaceBorder
- Overrides:
paintBorder
in classLineBorder
-
getBorderInsets
- Specified by:
getBorderInsets
in interfaceBorder
- Overrides:
getBorderInsets
in classAbstractBorder
-
getBorderInsets
- Overrides:
getBorderInsets
in classLineBorder
-
setupShapeAntialiasing
Setups the graphics to draw shape using anti-alias.- Parameters:
g
-- Returns:
- the old hints. You will need this value as the third parameter in
restoreShapeAntialiasing(java.awt.Graphics,Object)
.
-
restoreShapeAntialiasing
Restores the old setting for shape anti-alias.- Parameters:
g
-oldHints
- the value returned fromsetupShapeAntialiasing(java.awt.Graphics)
.
-