This commit is contained in:
gac-S_Changer
2018-07-06 09:55:46 +02:00
parent eb45f26d1c
commit 8800ea11be
15 changed files with 1597 additions and 879 deletions

View File

@@ -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();