This commit is contained in:
@@ -143,8 +143,9 @@ public class Sample extends DeviceBase {
|
||||
}
|
||||
|
||||
Font getLabelFont() {
|
||||
//return new Font("Times New Roman", Font.PLAIN, 8);
|
||||
return new Font("Courier New", Font.PLAIN, 8);
|
||||
////return new Font("Times New Roman", Font.PLAIN, 8);
|
||||
//return new Font("Courier New", Font.PLAIN, 8);
|
||||
return new Font("Tahoma", Font.PLAIN, 8);
|
||||
}
|
||||
|
||||
Point getLabelPosition(String text, Graphics g) {
|
||||
@@ -175,12 +176,12 @@ public class Sample extends DeviceBase {
|
||||
}
|
||||
g.setColor(getBorderColor(drawBackground));
|
||||
g.drawOval(position.x - size / 2, position.y - size / 2, size, size);
|
||||
|
||||
String text = String.valueOf(index + 1);
|
||||
Point labelPosition = getLabelPosition(text, g);
|
||||
|
||||
if (getNormalDrawSize()>10){
|
||||
String text = String.valueOf(index + 1);
|
||||
g.setColor(getLabelColor(drawBackground));
|
||||
g.setFont(getLabelFont());
|
||||
Point labelPosition = getLabelPosition(text, g);
|
||||
g.drawString(text, labelPosition.x, labelPosition.y);
|
||||
}
|
||||
g.setPaintMode();
|
||||
|
||||
Reference in New Issue
Block a user