Browse Source

Pull request #6081: REPORT-60071&REPORT-60082 修复视觉问题&补充国际化

Merge in DESIGN/design from ~FANGLEI/design10.0:feature/x to feature/x

* commit '54b42c5491b22bded9216c6560830033cfbbf261':
  REPORT-60082 修复一处可能npe的问题
  REPORT-60071&REPORT-60082 修复视觉问题&补充国际化
research/11.0
fanglei 3 years ago
parent
commit
24bdcd6c56
  1. 15
      designer-form/src/main/java/com/fr/design/designer/beans/models/NewFormModel.java
  2. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/PredefinedLayoutPane.java
  3. 6
      designer-form/src/main/resources/com/fr/design/form/layouts/config.json
  4. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_1.png
  5. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_10.png
  6. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_11.png
  7. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_12.png
  8. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_13.png
  9. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_14.png
  10. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_15.png
  11. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_16.png
  12. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_17.png
  13. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_18.png
  14. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_2.png
  15. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_3.png
  16. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_4.png
  17. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_5.png
  18. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_6.png
  19. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_7.png
  20. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_8.png
  21. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_9.png

15
designer-form/src/main/java/com/fr/design/designer/beans/models/NewFormModel.java

@ -1,6 +1,7 @@
package com.fr.design.designer.beans.models; package com.fr.design.designer.beans.models;
import com.fr.design.designer.beans.PredefinedLayout; import com.fr.design.designer.beans.PredefinedLayout;
import com.fr.design.i18n.Toolkit;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -9,13 +10,20 @@ import com.fr.third.fasterxml.jackson.databind.ObjectMapper;
import java.io.InputStream; import java.io.InputStream;
import java.io.Serializable; import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class NewFormModel implements Serializable { public class NewFormModel implements Serializable {
private static final String CONFIG_FILE_PATH = "/com/fr/design/form/layouts/config.json"; private static final String CONFIG_FILE_PATH = "/com/fr/design/form/layouts/config.json";
private static NewFormModel holder = null; private static NewFormModel holder = null;
private Map<String, List<PredefinedLayout>> config = new HashMap<>(); private Map<String, List<PredefinedLayout>> config = new LinkedHashMap<>();
private final Map<String, String> i18nMap = new HashMap<String, String>() {{
put("2-4", Toolkit.i18nText("Fine-Design_Layout_Two_To_Four_Module"));
put("5-7", Toolkit.i18nText("Fine-Design_Layout_Five_To_Seven_Module"));
put("multi", Toolkit.i18nText("Fine-Design_Layout_Multi_Module"));
}};
public static NewFormModel getInstance() { public static NewFormModel getInstance() {
if (holder == null) { if (holder == null) {
@ -52,6 +60,9 @@ public class NewFormModel implements Serializable {
} }
public void setConfig(Map<String, List<PredefinedLayout>> config) { public void setConfig(Map<String, List<PredefinedLayout>> config) {
this.config = config; for (String key : config.keySet()) {
String i18nKey = StringUtils.isNotEmpty(i18nMap.get(key)) ? i18nMap.get(key) : key;
this.config.put(i18nKey, config.get(key));
}
} }
} }

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/PredefinedLayoutPane.java

@ -11,6 +11,7 @@ import com.fr.stable.StringUtils;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.CardLayout; import java.awt.CardLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
@ -37,6 +38,7 @@ public class PredefinedLayoutPane extends JPanel {
this.setLayout(cardLayout); this.setLayout(cardLayout);
this.add(realStyle, 0); this.add(realStyle, 0);
this.add(simpleStyle, 1); this.add(simpleStyle, 1);
this.setPreferredSize(new Dimension(235, 134));
this.initListener(); this.initListener();
} }

6
designer-form/src/main/resources/com/fr/design/form/layouts/config.json

@ -1,6 +1,6 @@
{ {
"config":{ "config":{
"2-4模块":[ "2-4":[
{ {
"template":"2-4/1.frm", "template":"2-4/1.frm",
"realStyle":"real_style_1", "realStyle":"real_style_1",
@ -32,7 +32,7 @@
"simpleStyle":"simple_style_6" "simpleStyle":"simple_style_6"
} }
], ],
"5-7模块":[ "5-7":[
{ {
"template":"5-7/1.frm", "template":"5-7/1.frm",
"realStyle":"real_style_7", "realStyle":"real_style_7",
@ -64,7 +64,7 @@
"simpleStyle":"simple_style_12" "simpleStyle":"simple_style_12"
} }
], ],
"多模块":[ "multi":[
{ {
"template":"multi/1.frm", "template":"multi/1.frm",
"realStyle":"real_style_13", "realStyle":"real_style_13",

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 35 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 44 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_11.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 50 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_12.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 54 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_13.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 46 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_14.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 43 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_15.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_16.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 52 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_17.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_18.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 32 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 38 KiB

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Loading…
Cancel
Save