|
|
@ -44,13 +44,14 @@ public class UIRoundedBorder extends LineBorder { |
|
|
|
return lineStyle; |
|
|
|
return lineStyle; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height){ |
|
|
|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height){ |
|
|
|
Color oldColor = g.getColor(); |
|
|
|
Color oldColor = g.getColor(); |
|
|
|
|
|
|
|
|
|
|
|
Graphics2D g2d = (Graphics2D)g; |
|
|
|
Graphics2D g2d = (Graphics2D)g; |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
|
|
|
g2d.setColor(lineColor); |
|
|
|
g2d.setColor(lineColor); |
|
|
|
GraphHelper.draw(g2d, new RoundRectangle2D.Double(x, y, width - 1, height-1, roundedCorner, roundedCorner),lineStyle); |
|
|
|
GraphHelper.draw(g2d, new RoundRectangle2D.Double(x, y, width - 1.0D, height - 1.0D, roundedCorner, roundedCorner), lineStyle); |
|
|
|
g2d.setColor(oldColor); |
|
|
|
g2d.setColor(oldColor); |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
|
|
|
} |
|
|
|
} |
|
|
|