本文整理了Java中javax.swing.JButton.paintBorder()
方法的一些代码示例,展示了JButton.paintBorder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JButton.paintBorder()
方法的具体详情如下:
包路径:javax.swing.JButton
类名称:JButton
方法名:paintBorder
暂无
代码示例来源:origin: Exslims/MercuryTrade
@Override
protected void paintBorder(Graphics g) {
if (!this.getModel().isPressed()) {
super.paintBorder(g);
}
}
};
代码示例来源:origin: Exslims/MercuryTrade
@Override
protected void paintBorder(Graphics g) {
if (!this.getModel().isPressed()) {
super.paintBorder(g);
}
}
};
代码示例来源:origin: com.synaptix/SynaptixSwing
protected void paintBorder(Graphics g) {
super.paintBorder(g);
if (red) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(COLOR_TODAY);
g2.setStroke(new BasicStroke(2));
g2.drawRoundRect(HALF_WIDTH, HALF_WIDTH, this.getWidth()
- HALF_WIDTH - 1, this.getHeight() - HALF_WIDTH - 1,
this.getWidth(), this.getHeight());
}
}
代码示例来源:origin: gwlucastrig/Tinfour
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
int w = getWidth();
int h = getHeight();
Insets i = getInsets();
int fx = i.left;
int fy = i.top;
int fw = w - fx - i.right;
int fh = h - fy - i.bottom;
g.setColor(colorChoice);
g.fillRect(fx, fy, fw, fh);
super.paintBorder(g);
}
}
代码示例来源:origin: com.synaptix/SynaptixSwing
protected void paintBorder(Graphics g) {
super.paintBorder(g);
ButtonModel model = this.getModel();
if (model.isSelected()) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(COLOR_TODAY);
g2.setStroke(new BasicStroke(2));
g2.drawRoundRect(HALF_WIDTH, HALF_WIDTH, this.getWidth()
- HALF_WIDTH - 1, this.getHeight() - HALF_WIDTH - 1,
this.getWidth(), this.getHeight());
}
}
代码示例来源:origin: com.synaptix/SynaptixSwing
protected void paintBorder(Graphics g) {
super.paintBorder(g);
ButtonModel model = this.getModel();
if (model.isSelected()) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(COLOR_TODAY);
g2.setStroke(new BasicStroke(2));
g2.drawRoundRect(HALF_WIDTH, HALF_WIDTH, this.getWidth()
- HALF_WIDTH - 1, this.getHeight() - HALF_WIDTH - 1,
this.getWidth(), this.getHeight());
}
}
内容来源于网络,如有侵权,请联系作者删除!