|
|
|
@ -179,34 +179,6 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
|
|
|
|
|
g2d.setClip(oldClip); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 重载Border画法 |
|
|
|
|
* |
|
|
|
|
* @param g |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
protected void paintBorder(Graphics g) { |
|
|
|
|
if (isToolBarComponent) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
Graphics2D g2d = (Graphics2D) g; |
|
|
|
|
g2d.setColor(UIConstants.SHADOW_GREY); |
|
|
|
|
|
|
|
|
|
int width = 0; |
|
|
|
|
for (int i = 0; i < labelButtonList.size() - 1; i++) { |
|
|
|
|
width += labelButtonList.get(i).getWidth() + 1; |
|
|
|
|
int height = labelButtonList.get(i).getHeight(); |
|
|
|
|
g.drawLine(width, 0, width, height); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1; |
|
|
|
|
|
|
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
|
|
|
|
g2d.drawRoundRect(0, 0, width, getHeight() - 1, UIConstants.BUTTON_GROUP_ARC, UIConstants.BUTTON_GROUP_ARC); |
|
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* setSelectedItem |
|
|
|
|
* |
|
|
|
|