Browse Source

REPORT-40495 设计面板-多sheet-windows下韩文名称的sheet不被选中时不显示名称

【问题原因】之前用的Graphics2D的drawString方法,无法画出韩文的sheetName,debug发现走到里面,fontInfo中的font=null,而GraphHelper的drawString方法,这个方法debug走到里面发现font一直是正常的,并且两个方法里面的Graphics2D也都是SunGraphics2D,就很奇怪,没搞懂为啥
【改动思路】将调用Graphics2D的drawString方法替换为调用GraphHelper的drawString方法
feature/big-screen
Yvan 4 years ago
parent
commit
a1b92c6eb8
  1. 3
      designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

3
designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

@ -496,7 +496,8 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
sheetIcon.paintIcon(this, g2d, (int) textX + charWidth, 2); sheetIcon.paintIcon(this, g2d, (int) textX + charWidth, 2);
g2d.setPaint(getForeground()); g2d.setPaint(getForeground());
g2d.drawString(sheetName, (int) textX + charWidth + 14, textAscent); // REPORT-40495 之前的g2d.drawString()无法画出韩文sheetName,修改成GraphHelper的drawString
GraphHelper.drawString(g2d, sheetName, (int) textX + charWidth + 14, textAscent);
} }
/** /**

Loading…
Cancel
Save