private static void drawPressedRect(Graphics g, Rectangle rect,
boolean pressed) {
int w = rect.width;
int h = rect.height;
int x = rect.x;
int y = rect.y;
g.setColor(SystemColor.controlHighlight);
g.drawLine(x + w - 1, y, x + w - 1, y + h - 1);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
g.setColor(SystemColor.controlShadow);
g.drawLine(x + 1, y + 1, x + w - 3, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 3);
g.setColor(SystemColor.controlDkShadow);
g.drawLine(x, y, x + w - 2, y);
g.drawLine(x, y, x, y + h - 2);
g.setColor(pressed ? pressedColor : SystemColor.window);
g.fillRect(x+2, y+2, CB_SIZE - 2, CB_SIZE - 2);
}
DefaultCheckbox.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:cn1
作者:
评论列表
文章目录