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
public class PartialLineBorder
- extends LineBorder
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:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NORTH
static final int NORTH
- See Also:
- Constant Field Values
SOUTH
static final int SOUTH
- See Also:
- Constant Field Values
EAST
static final int EAST
- See Also:
- Constant Field Values
WEST
static final int WEST
- See Also:
- Constant Field Values
HORIZONTAL
static final int HORIZONTAL
- See Also:
- Constant Field Values
VERTICAL
static final int VERTICAL
- See Also:
- Constant Field Values
ALL
static final int ALL
- See Also:
- Constant Field Values
_sides
private int _sides
_roundedCornerSize
private int _roundedCornerSize
PartialLineBorder
public PartialLineBorder(Color color)
PartialLineBorder
public PartialLineBorder(Color color,
int thickness)
PartialLineBorder
public PartialLineBorder(Color color,
int thickness,
boolean roundedCorners)
PartialLineBorder
public PartialLineBorder(Color color,
int thickness,
boolean roundedCorners,
int roundedCornerSize)
PartialLineBorder
public PartialLineBorder(Color color,
int thickness,
int side)
getSides
public int getSides()
setSides
public void setSides(int sides)
getRoundedCornerSize
public int getRoundedCornerSize()
setRoundedCornerSize
public void setRoundedCornerSize(int roundedCornerSize)
paintBorder
public void paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
- Specified by:
paintBorder
in interface Border
- Overrides:
paintBorder
in class LineBorder
getBorderInsets
public Insets getBorderInsets(Component c)
- Specified by:
getBorderInsets
in interface Border
- Overrides:
getBorderInsets
in class LineBorder
getBorderInsets
public Insets getBorderInsets(Component c,
Insets insets)
- Overrides:
getBorderInsets
in class LineBorder
setupShapeAntialiasing
private static Object setupShapeAntialiasing(Graphics g)
- 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
private static void restoreShapeAntialiasing(Graphics g,
Object oldHints)
- Restores the old setting for shape anti-alias.
- Parameters:
g
- oldHints
- the value returned from setupShapeAntialiasing(java.awt.Graphics)
.