diff --git a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogDetailPane.java b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogDetailPane.java index 5ea260f469..0ed6386168 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogDetailPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogDetailPane.java @@ -6,6 +6,7 @@ import javax.swing.JFrame; import javax.swing.JPanel; import com.fr.base.BaseUtils; +import com.fr.design.i18n.Toolkit; import com.fr.design.utils.gui.GUICoreUtils; public class LogDetailPane extends JPanel{ @@ -20,7 +21,7 @@ public class LogDetailPane extends JPanel{ fr.setSize(600, 400); GUICoreUtils.centerWindow(fr); fr.setResizable(false); - fr.setTitle("日志"); + fr.setTitle(Toolkit.i18nText("Fine-Design_Basic_Log")); fr.setIconImage(BaseUtils.readImageWithCache("com/fr/design/images/buttonicon/history.png")); fr.getContentPane().setLayout(new BorderLayout()); fr.getContentPane().add(this, BorderLayout.CENTER); diff --git a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java index 4871bb769c..9ea2f7019e 100644 --- a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java +++ b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java @@ -10,6 +10,7 @@ import com.fr.design.env.RemoteDesignerWorkspaceInfo; import com.fr.design.fun.DesignerEnvProcessor; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ipasswordfield.UIPassWordField; import com.fr.design.gui.itextfield.UITextField; @@ -25,17 +26,7 @@ import com.fr.workspace.WorkContext; import com.fr.workspace.connect.WorkspaceConnectionInfo; import com.fr.workspace.engine.exception.WorkspaceAuthException; -import javax.swing.BorderFactory; -import javax.swing.BoxLayout; -import javax.swing.JDialog; -import javax.swing.JFileChooser; -import javax.swing.JPanel; -import javax.swing.JTextPane; -import javax.swing.SwingConstants; -import javax.swing.SwingUtilities; -import javax.swing.SwingWorker; -import javax.swing.ToolTipManager; -import javax.swing.UIManager; +import javax.swing.*; import javax.swing.border.EmptyBorder; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; @@ -295,10 +286,13 @@ public class RemoteEnvPane extends BasicBeanPane { contentPanel.add(configPanel, BorderLayout.NORTH); contentPanel.add(accountPanel, BorderLayout.CENTER); - + JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + panel.add(contentPanel, BorderLayout.NORTH); + panel.add(testPanel, BorderLayout.CENTER); + panel.setPreferredSize(new Dimension(440, 600)); + UIScrollPane scrollPane = new UIScrollPane(panel); this.setLayout(new BorderLayout()); - this.add(contentPanel, BorderLayout.NORTH); - this.add(testPanel, BorderLayout.CENTER); + this.add(scrollPane); } @Override diff --git a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java index ac76405d9f..efb1e3a38b 100644 --- a/designer-base/src/main/java/com/fr/file/FILEChooserPane.java +++ b/designer-base/src/main/java/com/fr/file/FILEChooserPane.java @@ -505,6 +505,9 @@ public class FILEChooserPane extends BasicPane { if (StringUtils.isEmpty(fileName) || StringUtils.isEmpty(filterExtension) || fileFilter.containsExtension(fileExtension.getExtension())) { return fileName; } + if (!ComparatorUtils.equals(fileNameExtension, filterExtension)) { + return fileName + filterExtension; + } return fileNameWithOutExtension + filterExtension; } diff --git a/designer-base/src/test/java/com/fr/file/FILEChooserPaneTest.java b/designer-base/src/test/java/com/fr/file/FILEChooserPaneTest.java index c8431a8621..79a3ea0f2e 100644 --- a/designer-base/src/test/java/com/fr/file/FILEChooserPaneTest.java +++ b/designer-base/src/test/java/com/fr/file/FILEChooserPaneTest.java @@ -25,15 +25,20 @@ public class FILEChooserPaneTest { ChooseFileFilter chooseFileFilter2 = new ChooseFileFilter(FileExtension.CPTX, StringUtils.EMPTY); String result3 = Reflect.on(chooserPane).call("calProperFileName", "WorkBook1.cpt", chooseFileFilter2).get(); - Assert.assertEquals("WorkBook1.cptx", result3); + Assert.assertEquals("WorkBook1.cpt.cptx", result3); ChooseFileFilter chooseFileFilter3 = new ChooseFileFilter(FileExtension.CPT, StringUtils.EMPTY); String result4 = Reflect.on(chooserPane).call("calProperFileName", "WorkBook1.cptx", chooseFileFilter3).get(); - Assert.assertEquals("WorkBook1.cpt", result4); + Assert.assertEquals("WorkBook1.cptx.cpt", result4); ChooseFileFilter chooseFileFilter5 = new ChooseFileFilter(FileExtension.CPTX, StringUtils.EMPTY); String result5 = Reflect.on(chooserPane).call("calProperFileName", "WorkBook1.cptx", chooseFileFilter5).get(); Assert.assertEquals("WorkBook1.cptx", result5); + + ChooseFileFilter chooseFileFilter6 = new ChooseFileFilter(FileExtension.CPT, StringUtils.EMPTY); + String result6 = Reflect.on(chooserPane).call("calProperFileName", "WorkBook1.xls", chooseFileFilter6).get(); + Assert.assertEquals("WorkBook1.xls.cpt", result6); + } }