Browse Source

Merge pull request #5691 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '7d81ef2e0b453d2371000f8db7b6d031a208c876':
  REPORT-58573 打开11.0制作的模板不向上兼容提示- 提示内容中应建议升级至11
  REPORT-58200 初次安装的10.0设计器,用户目录下会生成.finereport80缓存文件
  REPORT-50784 单元格文本包含生僻字情况下,双击单元格进入编辑状态后字符无法用默认字体绘制
  无jira 忽略异常
feature/10.0
superman 3 years ago
parent
commit
d0ff7afe77
  1. 3
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 8
      designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java
  3. 3
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  4. 13
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java
  5. 7
      designer-base/src/test/java/com/fr/design/utils/DesignUtilsTest.java
  6. 11
      designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

3
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -390,9 +390,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
} }
File envHome = new File(userHome + File.separator + "." + ProductConstants.APP_NAME + version); File envHome = new File(userHome + File.separator + "." + ProductConstants.APP_NAME + version);
if (!envHome.exists()) {
StableUtils.mkdirs(envHome);
}
return envHome.getAbsolutePath(); return envHome.getAbsolutePath();
} }

8
designer-base/src/main/java/com/fr/design/gui/itextfield/EditTextField.java

@ -13,6 +13,9 @@ import javax.swing.text.PlainDocument;
* Number Field. * Number Field.
*/ */
public class EditTextField extends UIGridTextField { public class EditTextField extends UIGridTextField {
private static final String I18NProperty = "i18n";
private int maxLength = 24; private int maxLength = 24;
public EditTextField() { public EditTextField() {
@ -39,7 +42,11 @@ public class EditTextField extends UIGridTextField {
} }
class TextDocument extends PlainDocument { class TextDocument extends PlainDocument {
private Object defaultI18NProperty;
public TextDocument() { public TextDocument() {
defaultI18NProperty = getProperty(I18NProperty);
} }
@Override @Override
@ -49,6 +56,7 @@ public class EditTextField extends UIGridTextField {
Toolkit.getDefaultToolkit().beep(); Toolkit.getDefaultToolkit().beep();
return; return;
} }
putProperty(I18NProperty, defaultI18NProperty);
super.insertString(offset, s, a); super.insertString(offset, s, a);
} }
} }

3
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -47,6 +47,7 @@ import com.fr.design.menu.NameSeparator;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.preview.PagePreview; import com.fr.design.preview.PagePreview;
import com.fr.design.ui.util.UIUtil; import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.DesignUtils;
import com.fr.design.worker.save.CallbackSaveWorker; import com.fr.design.worker.save.CallbackSaveWorker;
import com.fr.design.worker.save.EmptyCallBackSaveWorker; import com.fr.design.worker.save.EmptyCallBackSaveWorker;
import com.fr.design.write.submit.DBManipulationInWidgetEventPane; import com.fr.design.write.submit.DBManipulationInWidgetEventPane;
@ -1071,7 +1072,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
public boolean isOldDesigner() { public boolean isOldDesigner() {
String xmlDesignerVersion = getTarget().getXMLDesignerVersion(); String xmlDesignerVersion = getTarget().getXMLDesignerVersion();
if (isHigherThanCurrent(xmlDesignerVersion)) { if (isHigherThanCurrent(xmlDesignerVersion)) {
String infor = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Template_Version_Not_Match", StringUtils.parseVersion(xmlDesignerVersion)); String infor = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Template_Version_Not_Match", DesignUtils.parseVersion(xmlDesignerVersion));
String moreInfo = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Version_Tip_More_Info"); String moreInfo = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Server_Version_Tip_More_Info");
new InformationWarnPane(infor, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).show(); new InformationWarnPane(infor, moreInfo, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")).show();
return true; return true;

13
designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

@ -425,4 +425,17 @@ public class DesignUtils {
return true; return true;
} }
/**
* FR25.0版本出来需要进行适配下
*
* @param xmlDesignerVersion
* @return
*/
public static String parseVersion(String xmlDesignerVersion) {
if (StringUtils.isNotEmpty(xmlDesignerVersion)) {
return String.valueOf(xmlDesignerVersion.charAt(0) - 'A');
}
return xmlDesignerVersion;
}
} }

7
designer-base/src/test/java/com/fr/design/utils/DesignUtilsTest.java

@ -3,6 +3,7 @@ package com.fr.design.utils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import java.net.ServerSocket; import java.net.ServerSocket;
@ -29,4 +30,10 @@ public class DesignUtilsTest extends TestCase {
assertTrue(DesignUtils.isPortOccupied()); assertTrue(DesignUtils.isPortOccupied());
} }
@Test
public void testParseVersion() {
Assert.assertEquals("10", DesignUtils.parseVersion("KAA"));
Assert.assertEquals("11", DesignUtils.parseVersion("LAA"));
}
} }

11
designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

@ -799,10 +799,13 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@Override @Override
public void run() { public void run() {
popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); try {
popup.updatePane(designer); popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY);
popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog()); popup.updatePane(designer);
popup.setRelativeBounds(bounds); popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible() && !isShowPluginDialog());
popup.setRelativeBounds(bounds);
} catch (Exception ignored) {
}
} }
}); });
} }

Loading…
Cancel
Save