diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/NewFormModel.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/NewFormModel.java index 4e4b688b9..141f6b1f3 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/NewFormModel.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/NewFormModel.java @@ -1,6 +1,7 @@ package com.fr.design.designer.beans.models; import com.fr.design.designer.beans.PredefinedLayout; +import com.fr.design.i18n.Toolkit; import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; @@ -9,13 +10,20 @@ import com.fr.third.fasterxml.jackson.databind.ObjectMapper; import java.io.InputStream; import java.io.Serializable; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; public class NewFormModel implements Serializable { private static final String CONFIG_FILE_PATH = "/com/fr/design/form/layouts/config.json"; private static NewFormModel holder = null; - private Map> config = new HashMap<>(); + private Map> config = new LinkedHashMap<>(); + + private final Map i18nMap = new HashMap() {{ + 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() { if (holder == null) { @@ -52,6 +60,9 @@ public class NewFormModel implements Serializable { } public void setConfig(Map> 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)); + } } } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/PredefinedLayoutPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/PredefinedLayoutPane.java index 56048a142..bde9b07ee 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/PredefinedLayoutPane.java +++ b/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 java.awt.CardLayout; import java.awt.Color; +import java.awt.Dimension; import java.awt.Graphics; import java.awt.Rectangle; import java.awt.event.MouseAdapter; @@ -37,6 +38,7 @@ public class PredefinedLayoutPane extends JPanel { this.setLayout(cardLayout); this.add(realStyle, 0); this.add(simpleStyle, 1); + this.setPreferredSize(new Dimension(235, 134)); this.initListener(); } diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/config.json b/designer-form/src/main/resources/com/fr/design/form/layouts/config.json index 5237356d5..c5cd8728a 100644 --- a/designer-form/src/main/resources/com/fr/design/form/layouts/config.json +++ b/designer-form/src/main/resources/com/fr/design/form/layouts/config.json @@ -1,6 +1,6 @@ { "config":{ - "2-4模块":[ + "2-4":[ { "template":"2-4/1.frm", "realStyle":"real_style_1", @@ -32,7 +32,7 @@ "simpleStyle":"simple_style_6" } ], - "5-7模块":[ + "5-7":[ { "template":"5-7/1.frm", "realStyle":"real_style_7", @@ -64,7 +64,7 @@ "simpleStyle":"simple_style_12" } ], - "多模块":[ + "multi":[ { "template":"multi/1.frm", "realStyle":"real_style_13", diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_1.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_1.png index a16bcaaf4..d6ee05eb1 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_1.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_1.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_10.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_10.png index b42ed791f..336632c70 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_10.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_10.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_11.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_11.png index 952167a2f..4a2853a25 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_11.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_11.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_12.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_12.png index 409ca492c..9158fc4f5 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_12.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_12.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_13.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_13.png index 4f036d918..2bded5b37 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_13.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_13.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_14.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_14.png index 71a861fd1..72f66f0fb 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_14.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_14.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_15.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_15.png index c82b9ff87..01bf22aa4 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_15.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_15.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_16.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_16.png index e17f585be..f77a6d314 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_16.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_16.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_17.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_17.png index 9a0e78fd1..9c8912c57 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_17.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_17.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_18.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_18.png old mode 100644 new mode 100755 index b7f3c2375..0dfc8d2e4 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_18.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_18.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_2.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_2.png old mode 100644 new mode 100755 index ee0ac88f7..b2cea53fc Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_2.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_2.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_3.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_3.png index 94eef9e73..11bf06fcd 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_3.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_3.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_4.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_4.png index d3e03a59b..a94bfb48a 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_4.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_4.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_5.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_5.png index 070671f6a..c2332ca04 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_5.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_5.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_6.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_6.png index 578b92b7f..0d2a54771 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_6.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_6.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_7.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_7.png index c2b8ee994..db33b311d 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_7.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_7.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_8.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_8.png index bc81f209f..a22ca8f5b 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_8.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_8.png differ diff --git a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_9.png b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_9.png index c3178ecd2..346d958df 100644 Binary files a/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_9.png and b/designer-form/src/main/resources/com/fr/design/form/layouts/images/real_style_9.png differ