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 intprivate 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 intFields 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) intintgetSides()voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) private static voidrestoreShapeAntialiasing(Graphics g, Object oldHints) Restores the old setting for shape anti-alias.voidsetRoundedCornerSize(int roundedCornerSize) voidsetSides(int sides) private static ObjectSetups the graphics to draw shape using anti-alias.Methods inherited from class javax.swing.border.LineBorder
createBlackLineBorder, createGrayLineBorder, getLineColor, getRoundedCorners, getThickness, isBorderOpaqueMethods 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:
paintBorderin interfaceBorder- Overrides:
paintBorderin classLineBorder
-
getBorderInsets
- Specified by:
getBorderInsetsin interfaceBorder- Overrides:
getBorderInsetsin classAbstractBorder
-
getBorderInsets
- Overrides:
getBorderInsetsin 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).
-