From 81edb605b10a0007f4cf85f6650735dd83e94e5e Mon Sep 17 00:00:00 2001 From: Yvan Date: Thu, 22 Oct 2020 10:39:52 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-41450=20=E3=80=90JDK11=E5=86=92=E7=83=9F?= =?UTF-8?q?=E3=80=91=E6=9C=80=E6=96=B0=E7=9A=84release=EF=BC=8C=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E9=87=8C=E6=9C=89=E9=83=A8=E5=88=86=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E6=A1=86=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=20?= =?UTF-8?q?=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91windows?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E4=B8=8B=EF=BC=8C=E5=9B=A0=E4=B8=BA=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E4=BC=9A=E9=80=A0=E6=88=90=E7=BB=98=E5=88=B6=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8Cbug=E6=88=AA=E5=9B=BE=E4=B8=AD=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E5=AD=97=E4=BD=93=E5=8F=98=E5=A4=A7=E4=BA=86=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E4=BA=86=E5=8F=B3=E4=BE=A7=E7=BB=84=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E5=B7=A6=E8=BE=B9=E6=A1=86=20=E3=80=90=E6=94=B9=E5=8A=A8?= =?UTF-8?q?=E6=80=9D=E8=B7=AF=E3=80=91=E5=9C=A8=E5=B7=A6=E4=BE=A7Label?= =?UTF-8?q?=E5=92=8C=E5=8F=B3=E4=BE=A7=E7=BB=84=E4=BB=B6=E4=B9=8B=E9=97=B4?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0Gap=EF=BC=9B=E5=8F=A6=E5=A4=96=E4=BF=AE?= =?UTF-8?q?=E6=94=B9ToolKit=E5=AF=BC=E5=8C=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/connect/JDBCDefPane.java | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index 683b38e016..d603b56bf2 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java @@ -11,6 +11,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.ilable.ActionLabel; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -90,9 +91,9 @@ public class JDBCDefPane extends JPanel { private IntegerEditor DBCP_MAX_WAIT = new IntegerEditor(); private UITextField DBCP_VALIDATION_QUERY = new UITextField(); - private UIComboBox DBCP_TESTONBORROW = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Yes")}); - private UIComboBox DBCP_TESTONRETURN = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Yes")}); - private UIComboBox DBCP_TESTWHILEIDLE = new UIComboBox(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Yes")}); + private UIComboBox DBCP_TESTONBORROW = new UIComboBox(new String[]{Toolkit.i18nText("Fine-Design_Basic_No"), Toolkit.i18nText("Fine-Design_Basic_Yes")}); + private UIComboBox DBCP_TESTONRETURN = new UIComboBox(new String[]{Toolkit.i18nText("Fine-Design_Basic_No"), Toolkit.i18nText("Fine-Design_Basic_Yes")}); + private UIComboBox DBCP_TESTWHILEIDLE = new UIComboBox(new String[]{Toolkit.i18nText("Fine-Design_Basic_No"), Toolkit.i18nText("Fine-Design_Basic_Yes")}); private IntegerEditor DBCP_TIMEBETWEENEVICTIONRUNSMILLS = new IntegerEditor(); private IntegerEditor DBCP_NUMTESTSPEREVICTIONRUN = new IntegerEditor(); @@ -120,13 +121,13 @@ public class JDBCDefPane extends JPanel { userNameTextField.setName(USER_NAME); passwordTextField = new UIPasswordFieldWithFixedLength(15); dbtypeButton = new UIButton("."); - dbtypeButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Click_Get_Default_URL")); + dbtypeButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Click_Get_Default_URL")); dbtypeButton.addActionListener(dbtypeButtonActionListener); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; JPanel dbtypePane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); - dbtypePane.add(new UILabel((com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database") + ":"))); + dbtypePane.add(new UILabel((Toolkit.i18nText("Fine-Design_Basic_Database") + ":"))); JPanel dbtypeComPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); Component[][] dbtypeComComponents = {{dbtypeComboBox}}; double[] dbtypeRowSize = {p}; @@ -134,10 +135,10 @@ public class JDBCDefPane extends JPanel { dbtypeComPane = TableLayoutHelper.createTableLayoutPane(dbtypeComComponents, dbtypeRowSize, dbtypeColumnSize); JPanel driverPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); - driverPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Driver") + ":")); + driverPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Driver") + ":")); // 选择ODBC数据源的时候的提示链接 JPanel odbcTipsPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); - odbcTipsLink = new ActionLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Odbc_Tips")) { + odbcTipsLink = new ActionLabel(Toolkit.i18nText("Fine-Design_Basic_Odbc_Tips")) { @Override public void paintComponent(Graphics _gfx) { super.paintComponent(_gfx); @@ -146,7 +147,7 @@ public class JDBCDefPane extends JPanel { } }; odbcTipsPane.add(odbcTipsLink); - odbcTipsLink.setPreferredSize(new Dimension(GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Odbc_Tips")), odbcTipsLink.getPreferredSize().height)); + odbcTipsLink.setPreferredSize(new Dimension(GraphHelper.getWidth(Toolkit.i18nText("Fine-Design_Basic_Odbc_Tips")), odbcTipsLink.getPreferredSize().height)); odbcTipsLink.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { String url = CloudCenter.getInstance().acquireUrlByKind("odbc.help"); @@ -167,26 +168,26 @@ public class JDBCDefPane extends JPanel { urlComPane = TableLayoutHelper.createCommonTableLayoutPane(urlComComponents, urlRowSize, urlColumnSize, 4); JPanel userPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); - userPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_UserName") + ":")); + userPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Report_UserName") + ":")); JPanel userComPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - Component[][] userComComponents = {{userNameTextField, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Password") + ":"), passwordTextField}}; + Component[][] userComComponents = {{userNameTextField, new UILabel(Toolkit.i18nText("Fine-Design_Basic_Password") + ":"), passwordTextField}}; double[] userRowSize = {p}; double[] userColumnSize = {f, p, f}; userComPane = TableLayoutHelper.createCommonTableLayoutPane(userComComponents, userRowSize, userColumnSize, 4); JPanel passwordPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); - passwordPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Password") + ":")); + passwordPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Password") + ":")); Component[][] components = {{dbtypePane, dbtypeComPane}, {driverPane, driverComboBoxAndTips}, {urlPane, urlComPane}, {userPane, userComPane},}; double[] rowSize = {p, p, p, p}; double[] columnSize = {p, f, 22}; - JPanel centerPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 6); + JPanel centerPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 6, 6); innerthis.add(centerPanel); JPanel southPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); innerthis.add(southPanel); southPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 4, 20)); - ActionLabel actionLabel = new ActionLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ConnectionPool_Attr")); + ActionLabel actionLabel = new ActionLabel(Toolkit.i18nText("Fine-Design_Basic_ConnectionPool_Attr")); southPanel.add(actionLabel, BorderLayout.EAST); actionLabel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { @@ -331,7 +332,7 @@ public class JDBCDefPane extends JPanel { if (ComparatorUtils.equals(dbtypeComboBox.getSelectedItem(), ("Access"))) { // ben:这个能不能换种处理方案- - JFileChooser filechooser = new JFileChooser(); - filechooser.setDialogTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Open")); + filechooser.setDialogTitle(Toolkit.i18nText("Fine-Design_Basic_Open")); filechooser.setMultiSelectionEnabled(false); filechooser.addChoosableFileFilter(new ChooseFileFilter(new String[]{"accdb", "mdb"}, "Microsoft Office Access")); int result = filechooser.showOpenDialog(DesignerContext.getDesignerFrame()); @@ -373,19 +374,19 @@ public class JDBCDefPane extends JPanel { double[] rowSize = {f, f, f, f, f, f, f, f, f, f, f, f}; double[] columnSize = {f, f}; Component[][] comps = { - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dbcp_Initial_Size") + ":", SwingConstants.RIGHT), DBCP_INITIAL_SIZE}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dbcp_Max_Active") + ":", SwingConstants.RIGHT), DBCP_MAX_ACTIVE}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dbcp_Max_Idle") + ":", SwingConstants.RIGHT), DBCP_MAX_IDLE}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dbcp_Min_Idle") + ":", SwingConstants.RIGHT), DBCP_MIN_IDLE}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Max_Wait_Time") + ":", SwingConstants.RIGHT), DBCP_MAX_WAIT}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dbcp_Validation_Query") + ":", SwingConstants.RIGHT), DBCP_VALIDATION_QUERY}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Borrow") + ":", SwingConstants.RIGHT), DBCP_TESTONBORROW}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Return") + ":", SwingConstants.RIGHT), DBCP_TESTONRETURN}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_While_Idle") + ":", SwingConstants.RIGHT), DBCP_TESTWHILEIDLE}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Evictionruns_millis") + ":", SwingConstants.RIGHT), + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Initial_Size") + ":", SwingConstants.RIGHT), DBCP_INITIAL_SIZE}, + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Max_Active") + ":", SwingConstants.RIGHT), DBCP_MAX_ACTIVE}, + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Max_Idle") + ":", SwingConstants.RIGHT), DBCP_MAX_IDLE}, + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Min_Idle") + ":", SwingConstants.RIGHT), DBCP_MIN_IDLE}, + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Max_Wait_Time") + ":", SwingConstants.RIGHT), DBCP_MAX_WAIT}, + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Validation_Query") + ":", SwingConstants.RIGHT), DBCP_VALIDATION_QUERY}, + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Borrow") + ":", SwingConstants.RIGHT), DBCP_TESTONBORROW}, + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_On_Return") + ":", SwingConstants.RIGHT), DBCP_TESTONRETURN}, + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Test_While_Idle") + ":", SwingConstants.RIGHT), DBCP_TESTWHILEIDLE}, + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Evictionruns_millis") + ":", SwingConstants.RIGHT), DBCP_TIMEBETWEENEVICTIONRUNSMILLS}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dbcp_Num_Test_Per_Evction_Run") + ":", SwingConstants.RIGHT), DBCP_NUMTESTSPEREVICTIONRUN}, - {new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Mix_Evictable_Idle_Time_Millis") + ":", SwingConstants.RIGHT), + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Dbcp_Num_Test_Per_Evction_Run") + ":", SwingConstants.RIGHT), DBCP_NUMTESTSPEREVICTIONRUN}, + {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Connection_Pool_Mix_Evictable_Idle_Time_Millis") + ":", SwingConstants.RIGHT), DBCP_MINEVICTABLEIDLETIMEMILLIS}}; JPanel contextPane = TableLayoutHelper.createGapTableLayoutPane(comps, rowSize, columnSize, 10, 4); @@ -395,7 +396,7 @@ public class JDBCDefPane extends JPanel { @Override protected String title4PopupWindow() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ConnectionPool_Attr"); + return Toolkit.i18nText("Fine-Design_Basic_ConnectionPool_Attr"); } }