|
|
@ -199,36 +199,31 @@ public class DarkButtonBorder implements Border, UIResource { |
|
|
|
boolean paintLeft = DarkUIUtil.hasFocus(left); |
|
|
|
boolean paintLeft = DarkUIUtil.hasFocus(left); |
|
|
|
if (paintLeft) { |
|
|
|
if (paintLeft) { |
|
|
|
int h = height - Math.max(0, getShadowSize(left) - borderSize); |
|
|
|
int h = height - Math.max(0, getShadowSize(left) - borderSize); |
|
|
|
int arc = getFocusArc(left); |
|
|
|
g2.translate(-3 * borderSize + 1, 0); |
|
|
|
g2.translate(-2 * borderSize, 0); |
|
|
|
PaintUtil.paintFocusBorder(g2, 4 * borderSize, h, getFocusArc(left), borderSize); |
|
|
|
PaintUtil.paintLineBorder(g2, -borderSize, borderSize, 3 * borderSize, h, arc); |
|
|
|
g2.translate(-(-3 * borderSize + 1), 0); |
|
|
|
PaintUtil.paintFocusBorder(g2, 3 * borderSize, h, arc, borderSize); |
|
|
|
|
|
|
|
g2.translate(2 * borderSize, 0); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
JComponent right = ButtonConstants.getNeighbour(DarkButtonUI.KEY_RIGHT_NEIGHBOUR, c); |
|
|
|
JComponent right = ButtonConstants.getNeighbour(DarkButtonUI.KEY_RIGHT_NEIGHBOUR, c); |
|
|
|
boolean paintRight = DarkUIUtil.hasFocus(right); |
|
|
|
boolean paintRight = DarkUIUtil.hasFocus(right); |
|
|
|
g2.setColor(focusBorderColor); |
|
|
|
|
|
|
|
if (paintRight) { |
|
|
|
if (paintRight) { |
|
|
|
int h = height - Math.max(0, getShadowSize(right) - borderSize); |
|
|
|
int h = height - Math.max(0, getShadowSize(right) - borderSize); |
|
|
|
g2.translate(width - borderSize, 0); |
|
|
|
g2.translate(width - borderSize - 1, 0); |
|
|
|
PaintUtil.paintFocusBorder(g2, 3 * borderSize, h, getFocusArc(right), borderSize); |
|
|
|
PaintUtil.paintFocusBorder(g2, 4 * borderSize, h, getFocusArc(right), borderSize); |
|
|
|
g2.translate(borderSize - width, 0); |
|
|
|
g2.translate(-(width - borderSize - 1), 0); |
|
|
|
} |
|
|
|
} |
|
|
|
JComponent top = ButtonConstants.getNeighbour(DarkButtonUI.KEY_TOP_NEIGHBOUR, c); |
|
|
|
JComponent top = ButtonConstants.getNeighbour(DarkButtonUI.KEY_TOP_NEIGHBOUR, c); |
|
|
|
boolean paintTop = DarkUIUtil.hasFocus(top); |
|
|
|
boolean paintTop = DarkUIUtil.hasFocus(top); |
|
|
|
if (paintTop) { |
|
|
|
if (paintTop) { |
|
|
|
g2.translate(0, -2 * borderSize); |
|
|
|
g2.translate(0, -3 * borderSize + 1); |
|
|
|
PaintUtil.paintFocusBorder(g2, width, 3 * borderSize, |
|
|
|
PaintUtil.paintFocusBorder(g2, width, 4 * borderSize, getFocusArc(top), borderSize); |
|
|
|
getFocusArc(top), borderSize); |
|
|
|
g2.translate(0, -(-3 * borderSize + 1)); |
|
|
|
g2.translate(0, 2 * borderSize); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
JComponent bottom = ButtonConstants.getNeighbour(DarkButtonUI.KEY_TOP_NEIGHBOUR, c); |
|
|
|
JComponent bottom = ButtonConstants.getNeighbour(DarkButtonUI.KEY_TOP_NEIGHBOUR, c); |
|
|
|
boolean paintBottom = DarkUIUtil.hasFocus(bottom); |
|
|
|
boolean paintBottom = DarkUIUtil.hasFocus(bottom); |
|
|
|
if (paintBottom) { |
|
|
|
if (paintBottom) { |
|
|
|
g2.translate(0, height - borderSize); |
|
|
|
g2.translate(0, height - borderSize - 1); |
|
|
|
PaintUtil.paintFocusBorder(g2, width, 3 * borderSize, |
|
|
|
PaintUtil.paintFocusBorder(g2, width, 4 * borderSize, getFocusArc(bottom), borderSize); |
|
|
|
getFocusArc(bottom), borderSize); |
|
|
|
g2.translate(0, -(height - borderSize - 1)); |
|
|
|
g2.translate(0, borderSize - height); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|