Browse Source

Merge pull request #1476 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit 'a3b428bbf604e124d0993c413662b3f374a5111e':
  REPORT-27732
  fix 漏交
  REPORT-27732 && REPORT-27743 REPORT-27457
feature/big-screen
Hades 5 years ago
parent
commit
4f687fc10f
  1. 3
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogDetailPane.java
  2. 22
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  3. 3
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java
  4. 9
      designer-base/src/test/java/com/fr/file/FILEChooserPaneTest.java

3
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 javax.swing.JPanel;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
public class LogDetailPane extends JPanel{ public class LogDetailPane extends JPanel{
@ -20,7 +21,7 @@ public class LogDetailPane extends JPanel{
fr.setSize(600, 400); fr.setSize(600, 400);
GUICoreUtils.centerWindow(fr); GUICoreUtils.centerWindow(fr);
fr.setResizable(false); 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.setIconImage(BaseUtils.readImageWithCache("com/fr/design/images/buttonicon/history.png"));
fr.getContentPane().setLayout(new BorderLayout()); fr.getContentPane().setLayout(new BorderLayout());
fr.getContentPane().add(this, BorderLayout.CENTER); fr.getContentPane().add(this, BorderLayout.CENTER);

22
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -10,6 +10,7 @@ import com.fr.design.env.RemoteDesignerWorkspaceInfo;
import com.fr.design.fun.DesignerEnvProcessor; import com.fr.design.fun.DesignerEnvProcessor;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox; 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.ilable.UILabel;
import com.fr.design.gui.ipasswordfield.UIPassWordField; import com.fr.design.gui.ipasswordfield.UIPassWordField;
import com.fr.design.gui.itextfield.UITextField; 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.connect.WorkspaceConnectionInfo;
import com.fr.workspace.engine.exception.WorkspaceAuthException; import com.fr.workspace.engine.exception.WorkspaceAuthException;
import javax.swing.BorderFactory; import javax.swing.*;
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.border.EmptyBorder; import javax.swing.border.EmptyBorder;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
@ -295,10 +286,13 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
contentPanel.add(configPanel, BorderLayout.NORTH); contentPanel.add(configPanel, BorderLayout.NORTH);
contentPanel.add(accountPanel, BorderLayout.CENTER); 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.setLayout(new BorderLayout());
this.add(contentPanel, BorderLayout.NORTH); this.add(scrollPane);
this.add(testPanel, BorderLayout.CENTER);
} }
@Override @Override

3
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())) { if (StringUtils.isEmpty(fileName) || StringUtils.isEmpty(filterExtension) || fileFilter.containsExtension(fileExtension.getExtension())) {
return fileName; return fileName;
} }
if (!ComparatorUtils.equals(fileNameExtension, filterExtension)) {
return fileName + filterExtension;
}
return fileNameWithOutExtension + filterExtension; return fileNameWithOutExtension + filterExtension;
} }

9
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); ChooseFileFilter chooseFileFilter2 = new ChooseFileFilter(FileExtension.CPTX, StringUtils.EMPTY);
String result3 = Reflect.on(chooserPane).call("calProperFileName", "WorkBook1.cpt", chooseFileFilter2).get(); 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); ChooseFileFilter chooseFileFilter3 = new ChooseFileFilter(FileExtension.CPT, StringUtils.EMPTY);
String result4 = Reflect.on(chooserPane).call("calProperFileName", "WorkBook1.cptx", chooseFileFilter3).get(); 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); ChooseFileFilter chooseFileFilter5 = new ChooseFileFilter(FileExtension.CPTX, StringUtils.EMPTY);
String result5 = Reflect.on(chooserPane).call("calProperFileName", "WorkBook1.cptx", chooseFileFilter5).get(); String result5 = Reflect.on(chooserPane).call("calProperFileName", "WorkBook1.cptx", chooseFileFilter5).get();
Assert.assertEquals("WorkBook1.cptx", result5); 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);
} }
} }

Loading…
Cancel
Save