From a1b92c6eb83cf3134ec50a6a23f9e2c80ea87ddd Mon Sep 17 00:00:00 2001 From: Yvan Date: Fri, 25 Sep 2020 11:50:22 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-40495=20=E8=AE=BE=E8=AE=A1=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF-=E5=A4=9Asheet-windows=E4=B8=8B=E9=9F=A9=E6=96=87?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E7=9A=84sheet=E4=B8=8D=E8=A2=AB=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E6=97=B6=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E7=94=A8=E7=9A=84Graphics2D=E7=9A=84drawStri?= =?UTF-8?q?ng=E6=96=B9=E6=B3=95=EF=BC=8C=E6=97=A0=E6=B3=95=E7=94=BB?= =?UTF-8?q?=E5=87=BA=E9=9F=A9=E6=96=87=E7=9A=84sheetName=EF=BC=8Cdebug?= =?UTF-8?q?=E5=8F=91=E7=8E=B0=E8=B5=B0=E5=88=B0=E9=87=8C=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?fontInfo=E4=B8=AD=E7=9A=84font=3Dnull=EF=BC=8C=E8=80=8CGraphHel?= =?UTF-8?q?per=E7=9A=84drawString=E6=96=B9=E6=B3=95=EF=BC=8C=E8=BF=99?= =?UTF-8?q?=E4=B8=AA=E6=96=B9=E6=B3=95debug=E8=B5=B0=E5=88=B0=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=E5=8F=91=E7=8E=B0font=E4=B8=80=E7=9B=B4=E6=98=AF?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E7=9A=84=EF=BC=8C=E5=B9=B6=E4=B8=94=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E6=96=B9=E6=B3=95=E9=87=8C=E9=9D=A2=E7=9A=84Graphics2?= =?UTF-8?q?D=E4=B9=9F=E9=83=BD=E6=98=AFSunGraphics2D=EF=BC=8C=E5=B0=B1?= =?UTF-8?q?=E5=BE=88=E5=A5=87=E6=80=AA=EF=BC=8C=E6=B2=A1=E6=90=9E=E6=87=82?= =?UTF-8?q?=E4=B8=BA=E5=95=A5=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D?= =?UTF-8?q?=E8=B7=AF=E3=80=91=E5=B0=86=E8=B0=83=E7=94=A8Graphics2D?= =?UTF-8?q?=E7=9A=84drawString=E6=96=B9=E6=B3=95=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E4=B8=BA=E8=B0=83=E7=94=A8GraphHelper=E7=9A=84drawString?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/SheetNameTabPane.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java index 52f1fe1f0c..0c7c359f0a 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java @@ -134,7 +134,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse * 编辑的对象实例 */ private ReportComponentComposite reportComposite; - + private int selectedIndex = -1; private JPanel buttonPane; @@ -332,7 +332,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse leftButton.setEnabled(buttonEnabled); rightButton.setEnabled(buttonEnabled); } - + /** * 抽出来方便OEM * @return @@ -417,10 +417,10 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse // 画两个添加sheet图标 iconLocation = isOvertakeWidth ? (int) (maxWidth) : addIconlocation + GRAP; - + paintAddButton(g2d); } - + protected void paintAddButton(Graphics2D g2d){ getAddWorkSheet().paintIcon(this, g2d, iconLocation, 3); ADD_POLY_SHEET.paintIcon(this, g2d, iconLocation + getAddWorkSheet().getIconWidth() + ICON_SEP_DISTANCE, 3); @@ -496,7 +496,8 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse sheetIcon.paintIcon(this, g2d, (int) textX + charWidth, 2); 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); } /** @@ -626,7 +627,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse processRightMouseButton(evtX, evtY); } } - + private void processRightMouseButton(int evtX, int evtY){ MenuDef def = new MenuDef(); addInsertGridShortCut(def); @@ -636,14 +637,14 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse def.updateMenu(); GUICoreUtils.showPopupMenu(tabPop, this, evtX - 1, evtY - 1); } - + private void processLeftMouseButton(int evtX){ if (evtX > iconLocation && evtX < iconLocation + GRID_TOSHEET_RIGHT) { firstInsertActionPerformed(); } else if (evtX > iconLocation + POLY_TOSHEET_LEFT && evtX < iconLocation + POLY_TOSHEET_RIGHT) { new PolyReportInsertAction().actionPerformed(null); } - + } protected void addInsertGridShortCut(MenuDef def){ @@ -847,7 +848,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse } protected class GridReportInsertAction extends SheetInsertAction { - + @Override protected TemplateReport newTemplateReport() { return new WorkSheet();