Browse Source

Merging in latest from upstream (DESIGN/design:refs/heads/release/10.0)

* commit '8346e043d684a530c688bfed0ed064c99655d1f6':
  REPORT-9377
  REPORT-9377
  REPORT-9377
  REPORT-9377
  REPORT-9654【10.0二轮回归】导出excel文件名不对
master
yaoh.wu 6 years ago
parent
commit
87e1a57379
  1. 43
      designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
  2. 2
      designer-form/src/main/java/com/fr/design/mainframe/actions/EmbeddedFormExportExportAction.java
  3. 2
      designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java

43
designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java

@ -33,7 +33,8 @@ public class AboutPane extends JPanel {
private static final int DEFAULT_GAP = 12;
private static final String COPYRIGHT_LABEL = "\u00A9 ";
private static final String BUILD_PREFIX = " ";
private static final String COMPANY_TELEPHONE = CloudCenter.getInstance().acquireUrlByKind("company_telephone");
private static final String COMPANY_TELEPHONE = CloudCenter.getInstance().acquireUrlByKind("help.compNo");
private static final String PRESIDENT_PHONE = CloudCenter.getInstance().acquireUrlByKind("help.PNo");
public AboutPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -79,6 +80,9 @@ public class AboutPane extends JPanel {
contentPane.add(urlActionPane);
contentPane.add(emailPane);
contentPane.add(getRemarkPane());
if (shouldShowThanks()) {
addThankPane(contentPane);
}
@ -111,6 +115,43 @@ public class AboutPane extends JPanel {
return true;
}
private JPanel getRemarkPane(){
String remark = Inter.getLocText("Fine-Designer_About_Remark_Info",PRESIDENT_PHONE);
UILabel label = new UILabel();
label.setSize(new Dimension(580,30));
//用THML标签进行拼接,以实现自动换行
StringBuilder builder = new StringBuilder("<html>");
char[] chars = remark.toCharArray();
//获取字体计算大小
FontMetrics fontMetrics = label.getFontMetrics(label.getFont());
int start = 0;
int len = 0;
while (start + len < remark.length()) {
while (true) {
len++;
if (start + len > remark.length())
break;
if (fontMetrics.charsWidth(chars, start, len)
> label.getWidth()) {
break;
}
}
builder.append(chars, start, len-1).append("<br/>");
start = start + len - 1;
len = 0;
}
//拼接剩余部分
builder.append(chars, start, remark.length()-start);
builder.append("</html>");
JPanel jPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
label.setText(builder.toString());
jPanel.add(label);
return jPanel;
}
//添加鸣谢面板
private void addThankPane(JPanel contentPane) {
BBSGuestPaneProvider pane = StableFactory.getMarkedInstanceObjectFromClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPaneProvider.class);

2
designer-form/src/main/java/com/fr/design/mainframe/actions/EmbeddedFormExportExportAction.java

@ -137,7 +137,7 @@ public class EmbeddedFormExportExportAction extends JTemplateAction<JForm>{
FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("FR-Designer_Finish_Export") + "!");
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Inter.getLocText("FR-Designer_Exported_successfully") + "\n" + filePath);
Inter.getLocText("FR-Designer_Exported_successfully") + "\n" + fileGetName);
} catch (Exception exp) {
this.setProgress(100);
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);

2
designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java

@ -130,7 +130,7 @@ public abstract class AbstractExportAction extends JWorkBookAction {
FRContext.getLogger().info("\"" + fileGetName + "\"" + Inter.getLocText("FR-Designer_Finish_Export") + "!");
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(),
Inter.getLocText("FR-Designer_Exported_successfully") + "\n" + filePath);
Inter.getLocText("FR-Designer_Exported_successfully") + "\n" + fileGetName);
} catch (Exception exp) {
this.setProgress(100);
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);

Loading…
Cancel
Save