From 6fc74fc15ba1c7767ba94a95516f857aa63b5724 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 9 Oct 2017 16:03:01 +0800 Subject: [PATCH 1/8] =?UTF-8?q?REPORT-4604=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=B1=9E=E6=80=A7-=E5=BD=A2=E6=80=81-=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AD=97=E5=85=B8-=E5=85=AC=E5=BC=8F=20=20=20?= =?UTF-8?q?=E6=9C=80=E4=B8=8B=E9=9D=A2=E7=9A=84=E6=96=87=E5=AD=97=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E5=92=8C=E5=86=85=E5=AE=B9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 2 +- .../src/com/fr/design/locale/designer_en_US.properties | 2 +- .../src/com/fr/design/locale/designer_ja_JP.properties | 2 +- .../src/com/fr/design/locale/designer_ko_KR.properties | 2 +- .../src/com/fr/design/locale/designer_zh_CN.properties | 2 +- .../src/com/fr/design/locale/designer_zh_TW.properties | 2 +- .../src/com/fr/design/present/dict/FormulaDictPane.java | 2 ++ 7 files changed, 8 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 938f9b1640..59ead52371 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -856,7 +856,7 @@ RP_Authority_Edit=Authority Warnning=Warning RoleName_Can_Not_Be_Null=RoleName_Can_Not_Be_Null Application=Applications -Formula_Dictionary_Display_Examples_Html=the real value is \ +Formula_Dictionary_Display_Examples_Html=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
ECP-error_pwd= FR-Hyperlink_ChartHyperlink= M_Edit-FormatBrush=Format Painter diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 53b7873e48..e7094c00c0 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -859,7 +859,7 @@ RP_Authority_Edit=Permission Warnning=Warning RoleName_Can_Not_Be_Null=Role name can not be null or duplicate Application=Applications -Formula_Dictionary_Display_Examples_Html=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
+Formula_Dictionary_Display_Examples_Html=Tip: the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
ECP-error_pwd=Password Error FR-Hyperlink_ChartHyperlink=Chart Hyperlink M_Edit-FormatBrush=Format Painter diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 57c6eb3bb9..2d6ec86418 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -857,7 +857,7 @@ RP_Authority_Edit=\u6A29\u9650\u7DE8\u96C6 Warnning=\u30EA\u30DE\u30A4\u30F3\u30C9 RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u305A\u3001\u91CD\u8907\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u305B\u3093 Application=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3 -Formula_Dictionary_Display_Examples_Html=\u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002
+Formula_Dictionary_Display_Examples_Html=\u30D2\u30F3\u30C8: \u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002
ECP-error_pwd=\u30D1\u30B9\u30EF\u30FC\u30C9\u30A8\u30E9\u30FC FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF M_Edit-FormatBrush=\u66F8\u5F0F\u30D6\u30E9\u30B7(B) diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 37f64cf57b..586d858699 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -857,7 +857,7 @@ RP_Authority_Edit=\uAD8C\uD55C\uD3B8\uC9D1 Warnning=\uC54C\uB9BC RoleName_Can_Not_Be_Null=\uC5ED\uD560\uC774\uB984\uC740\uBE44\uC5B4\uC788\uAC70\uB098\uC911\uBCF5\uB418\uC5B4\uC11C\uB294\uC548\uB429\uB2C8\uB2E4. Application=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 -Formula_Dictionary_Display_Examples_Html=\uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C
\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100.
  +Formula_Dictionary_Display_Examples_Html=\uD301: \uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C
\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100.
  ECP-error_pwd=\uBE44\uBC00\uBC88\uD638\uC785\uB825\uC624\uB958 FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C M_Edit-FormatBrush=\uC11C\uC2DD\uD504\uB9B0\uD2B8(B) diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 37dee8ad49..4b38fc25e0 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -860,7 +860,7 @@ RP_Authority_Edit=\u6743\u9650\u7F16\u8F91 Warnning=\u63D0\u9192 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D Application=\u5E94\u7528\u7A0B\u5E8F -Formula_Dictionary_Display_Examples_Html=\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C
\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002
  +Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002
  ECP-error_pwd=\u5BC6\u7801\u9519\u8BEF FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE M_Edit-FormatBrush=\u683C\u5F0F\u5237(B) diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 41cb4bed8c..2073e65ae8 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -859,7 +859,7 @@ RP_Authority_Edit=\u6B0A\u9650\u7DE8\u8F2F Warnning=\u63D0\u9192 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907 Application=\u61C9\u7528\u7A0B\u5F0F -Formula_Dictionary_Display_Examples_Html=\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C
\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002
  +Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C
\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002
  ECP-error_pwd=\u5BC6\u78BC\u932F\u8AA4 FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8 M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B) diff --git a/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java b/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java index 6a3130a9c0..dab59eaffe 100644 --- a/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java +++ b/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java @@ -5,6 +5,7 @@ import com.fr.base.Formula; import com.fr.data.impl.FormulaDictionary; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.constants.LayoutConstants; +import com.fr.design.constants.UIConstants; import com.fr.design.editor.editor.FormulaEditor; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; @@ -48,6 +49,7 @@ public class FormulaDictPane extends FurtherBasicBeanPane { int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; UILabel tag = new UILabel(Inter.getLocText("Formula_Dictionary_Display_Examples_Html")); + tag.setForeground(new Color(51, 51, 52)); tag.setPreferredSize(new Dimension(225, 80)); JPanel t = new JPanel(new BorderLayout()); t.add(tag, BorderLayout.CENTER); From d9a13704c3ed3cc881c0927a7149bcf880cef5d4 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 09:21:44 +0800 Subject: [PATCH 2/8] =?UTF-8?q?REPORT-4604=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=B1=9E=E6=80=A7-=E5=85=B6=E4=BB=96-=E6=8F=92?= =?UTF-8?q?=E5=85=A5=E8=A1=8C=E7=AD=96=E7=95=A5=20=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/editor/ValueEditorPaneFactory.java | 2 +- .../editor/editor/SpinnerIntegerEditor.java | 66 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java index 29ee9e60a6..e63b3c9741 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java @@ -202,7 +202,7 @@ public class ValueEditorPaneFactory { FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); return new Editor[]{ new TextEditor(), - new IntegerEditor(), + new SpinnerIntegerEditor(), new DoubleEditor(), new DateEditor(true, Inter.getLocText("Date")), new BooleanEditor(), diff --git a/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java b/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java new file mode 100644 index 0000000000..2366350f69 --- /dev/null +++ b/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java @@ -0,0 +1,66 @@ +package com.fr.design.editor.editor; + +import com.fr.base.Utils; +import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; + +public class SpinnerIntegerEditor extends Editor { + + private UISpinner spinner; + private String oldValue = StringUtils.EMPTY; + + public SpinnerIntegerEditor(){ + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + spinner = new UISpinner(-Integer.MAX_VALUE, Integer.MAX_VALUE, 1, 0); + this.add(spinner, BorderLayout.CENTER); + this.spinner.addKeyListener(textKeyListener); + this.setName(Inter.getLocText("Parameter-Integer")); + } + + @Override + public Integer getValue() { + return new Integer((int) this.spinner.getValue()); + } + + @Override + public void setValue(Integer value) { + if (value == null) { + value = new Integer(0); + } + this.spinner.setValue(value.intValue()); + oldValue = Utils.objectToString(value); + } + + @Override + public boolean accept(Object object) { + return object != null && object instanceof Integer; + } + + public String getIconName() { + return "type_int"; + } + + KeyListener textKeyListener = new KeyAdapter() { + + public void keyReleased(KeyEvent evt) { + int code = evt.getKeyCode(); + + if (code == KeyEvent.VK_ESCAPE) { + spinner.setValue(Double.parseDouble(oldValue)); + } + if (code == KeyEvent.VK_ENTER) { + fireEditingStopped(); + } else { + fireStateChanged(); + } + } + }; +} From 038a911398173b861a8c7236c59b10c747e2b902 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 09:51:01 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/editor/ValueEditorPaneFactory.java | 128 ++++++++++-------- .../design/editor/editor/IntegerEditor.java | 2 +- .../editor/editor/SpinnerIntegerEditor.java | 3 +- .../com/fr/design/locale/designer.properties | 4 +- .../design/locale/designer_en_US.properties | 4 +- .../design/locale/designer_ja_JP.properties | 4 +- .../design/locale/designer_ko_KR.properties | 4 +- .../design/locale/designer_zh_CN.properties | 5 +- .../design/locale/designer_zh_TW.properties | 4 +- .../design/present/dict/FormulaDictPane.java | 4 +- 10 files changed, 86 insertions(+), 76 deletions(-) diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java index e63b3c9741..ebf712cc85 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java @@ -65,9 +65,10 @@ public class ValueEditorPaneFactory { * @return 返回公式编辑器面板 */ public static ValueEditorPane createFormulaValueEditorPane() { - return createValueEditorPane(new Editor[]{new FormulaEditor(Inter.getLocText("Parameter-Formula"))}, + return createValueEditorPane(new Editor[]{new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"))}, StringUtils.EMPTY, StringUtils.EMPTY); } + /** * 创建基本的值编辑器面板 * @@ -138,11 +139,13 @@ public class ValueEditorPaneFactory { /** * 创建不带公式面板的pane + * * @return 编辑器面板 */ - public static ValueEditorPane createBasicEditorWithoutFormulaPane(){ + public static ValueEditorPane createBasicEditorWithoutFormulaPane() { return createValueEditorPane(basicEditorsWithoutFormula(), StringUtils.EMPTY, StringUtils.EMPTY); } + /** * 创建NoCRNoColumn * @@ -154,19 +157,22 @@ public class ValueEditorPaneFactory { /** * 创建数值编辑器 + * * @return 值编辑器 */ - public static ValueEditorPane createNumberValueEditorPane(){ + public static ValueEditorPane createNumberValueEditorPane() { return createValueEditorPane(numberEditors(), StringUtils.EMPTY, StringUtils.EMPTY); } /** * 创建日期编辑器 + * * @return 值编辑器 */ - public static ValueEditorPane createDateValueEditorPane(){ + public static ValueEditorPane createDateValueEditorPane() { return createValueEditorPane(dateEditors(), StringUtils.EMPTY, StringUtils.EMPTY); } + /** * 根据参数paraUseType 创建编辑器类型. * @@ -199,7 +205,7 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ public static Editor[] basicEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new TextEditor(), new SpinnerIntegerEditor(), @@ -216,7 +222,7 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ public static Editor[] formEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new TextEditor(), new IntegerEditor(), @@ -234,7 +240,7 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ public static Editor[] extendedEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new TextEditor(), new IntegerEditor(), @@ -247,35 +253,37 @@ public class ValueEditorPaneFactory { }; } - /** - * 带单元格组的编辑器 - * @return 值编辑器 - */ - public static Editor[] extendedCellGroupEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); - return new Editor[]{ - new TextEditor(), - new IntegerEditor(), - new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), - new BooleanEditor(), - formulaEditor, - new ParameterEditor(), - new ColumnRowEditor(Inter.getLocText("Cell")), - new ColumnRowGroupEditor(Inter.getLocText("Cell_Group")) - }; - } - - /** - * 只有单元格和单元格组的编辑器 - * @return 编辑器b - */ - public static Editor[] cellGroupEditor() { - return new Editor[] { - new ColumnRowEditor(Inter.getLocText("Cell")), - new ColumnRowGroupEditor(Inter.getLocText("Cell_Group")) - }; - } + /** + * 带单元格组的编辑器 + * + * @return 值编辑器 + */ + public static Editor[] extendedCellGroupEditors() { + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); + return new Editor[]{ + new TextEditor(), + new IntegerEditor(), + new DoubleEditor(), + new DateEditor(true, Inter.getLocText("Date")), + new BooleanEditor(), + formulaEditor, + new ParameterEditor(), + new ColumnRowEditor(Inter.getLocText("Cell")), + new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group")) + }; + } + + /** + * 只有单元格和单元格组的编辑器 + * + * @return 编辑器b + */ + public static Editor[] cellGroupEditor() { + return new Editor[]{ + new ColumnRowEditor(Inter.getLocText("Cell")), + new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group")) + }; + } /** * URL的一些编辑器. @@ -302,7 +310,7 @@ public class ValueEditorPaneFactory { return new Editor[]{ new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName), new DateEditor(true, Inter.getLocText("Date")), - new FormulaEditor(Inter.getLocText("Parameter-Formula")) + new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")) }; } @@ -312,7 +320,7 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ public static Editor[] allEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); // formulaEditor.setEnabled(true); return new Editor[]{ new TextEditor(), @@ -331,9 +339,10 @@ public class ValueEditorPaneFactory { /** * 不带公式编辑器 + * * @return 编辑器不带公式 */ - public static Editor[] basicEditorsWithoutFormula(){ + public static Editor[] basicEditorsWithoutFormula() { return new Editor[]{ new TextEditor(), new IntegerEditor(), @@ -349,7 +358,7 @@ public class ValueEditorPaneFactory { * @return 编辑器 */ public static Editor[] noCRnoColumnEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new TextEditor(), new IntegerEditor(), @@ -363,10 +372,11 @@ public class ValueEditorPaneFactory { /** * 数值编辑器 - * @return 编辑器 + * + * @return 编辑器 */ public static Editor[] numberEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new IntegerEditor(), new DoubleEditor(), @@ -377,10 +387,11 @@ public class ValueEditorPaneFactory { /** * 日期编辑器 + * * @return 编辑器 */ public static Editor[] dateEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ new DateEditor(true, Inter.getLocText("Date")), formulaEditor, @@ -394,7 +405,7 @@ public class ValueEditorPaneFactory { * @return 存储过程的编辑器 */ public static Editor[] StoreProcedureEditors() { - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); formulaEditor.setEnabled(true); return new Editor[]{ new CursorEditor(), @@ -422,7 +433,7 @@ public class ValueEditorPaneFactory { list.add(new DateEditor(true, Inter.getLocText("Date"))); list.add(new BooleanEditor()); - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); formulaEditor.setEnabled(true); list.add(formulaEditor); @@ -436,30 +447,29 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ private static List createEditors4Chart(int paraUseType) { - if(paraUseType == ParameterTableModel.CHART_PIE_USE) { + if (paraUseType == ParameterTableModel.CHART_PIE_USE) { return getPieEditor(); - } else if(paraUseType == ParameterTableModel.CHART_MAP_USE) { + } else if (paraUseType == ParameterTableModel.CHART_MAP_USE) { return getMapEditor(); - } else if(paraUseType == ParameterTableModel.CHART_GIS_USE) { + } else if (paraUseType == ParameterTableModel.CHART_GIS_USE) { return getGisEditor(); - } else if(paraUseType == ParameterTableModel.CHART__XY_USE) { + } else if (paraUseType == ParameterTableModel.CHART__XY_USE) { return getXYEditor(); - } else if(paraUseType == ParameterTableModel.CHART_BUBBLE_USE) { + } else if (paraUseType == ParameterTableModel.CHART_BUBBLE_USE) { return getBubbbleEdtor(); - } else if(paraUseType == ParameterTableModel.CHART_NO_USE) { + } else if (paraUseType == ParameterTableModel.CHART_NO_USE) { return getChartNoUseEditor(); - } else if(paraUseType == ParameterTableModel.CHART_METER_USE) { + } else if (paraUseType == ParameterTableModel.CHART_METER_USE) { return getMeterEditor(); - } else if(paraUseType == ParameterTableModel.CHART_STOCK_USE) { + } else if (paraUseType == ParameterTableModel.CHART_STOCK_USE) { return getStockEditor(); - } else if(paraUseType == ParameterTableModel.CHART_GANTT_USE) { + } else if (paraUseType == ParameterTableModel.CHART_GANTT_USE) { return getGanttEditor(); - } else if(paraUseType == ParameterTableModel.FORM_ELEMENTCASE_USE) { + } else if (paraUseType == ParameterTableModel.FORM_ELEMENTCASE_USE) { return getFormElementCaseEditor(); - } else if(paraUseType == ParameterTableModel.FORM_CHART_USE) { - return getFormChartEditor(); - } - else { + } else if (paraUseType == ParameterTableModel.FORM_CHART_USE) { + return getFormChartEditor(); + } else { return getChartEditor(); } } diff --git a/designer_base/src/com/fr/design/editor/editor/IntegerEditor.java b/designer_base/src/com/fr/design/editor/editor/IntegerEditor.java index b1661277a2..ff69446baf 100644 --- a/designer_base/src/com/fr/design/editor/editor/IntegerEditor.java +++ b/designer_base/src/com/fr/design/editor/editor/IntegerEditor.java @@ -18,7 +18,7 @@ public class IntegerEditor extends NumberEditor { } public IntegerEditor(Integer value) { - super(value, Inter.getLocText("Parameter-Integer")); + super(value, Inter.getLocText("FR-Designer_Parameter_Integer")); } @Override diff --git a/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java b/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java index 2366350f69..5448a08680 100644 --- a/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java +++ b/designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java @@ -6,7 +6,6 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.Inter; import com.fr.stable.StringUtils; -import javax.swing.*; import java.awt.*; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -22,7 +21,7 @@ public class SpinnerIntegerEditor extends Editor { spinner = new UISpinner(-Integer.MAX_VALUE, Integer.MAX_VALUE, 1, 0); this.add(spinner, BorderLayout.CENTER); this.spinner.addKeyListener(textKeyListener); - this.setName(Inter.getLocText("Parameter-Integer")); + this.setName(Inter.getLocText("FR-Designer_Parameter_Integer")); } @Override diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 59ead52371..f006d5afbc 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -856,7 +856,7 @@ RP_Authority_Edit=Authority Warnning=Warning RoleName_Can_Not_Be_Null=RoleName_Can_Not_Be_Null Application=Applications -Formula_Dictionary_Display_Examples_Html=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
+FR-Designer-Formula_Dictionary_Display_Examples_Html=the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
ECP-error_pwd= FR-Hyperlink_ChartHyperlink= M_Edit-FormatBrush=Format Painter @@ -1425,7 +1425,7 @@ Out_Thick_Border_Line=Out Thick Border Line FR-App-File_Lookup_range= ReportColumns-Columns_to=Columns to Transparent=Transparent -Parameter-Integer=Integer +FR-Designer_Parameter_Integer=Integer PDF-Print_Setting=PDF Print Setting Server-Embedded_Server=Embedded Server M_Server-Server_Config_Manager=Server Configuration Manager diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index e7094c00c0..7392e95897 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -859,7 +859,7 @@ RP_Authority_Edit=Permission Warnning=Warning RoleName_Can_Not_Be_Null=Role name can not be null or duplicate Application=Applications -Formula_Dictionary_Display_Examples_Html=Tip: the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
+FR-Designer-Formula_Dictionary_Display_Examples_Html=Tip: the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$,
the result is 1, 2, ..., 100 and -1, -2, ..., -100.
ECP-error_pwd=Password Error FR-Hyperlink_ChartHyperlink=Chart Hyperlink M_Edit-FormatBrush=Format Painter @@ -1427,7 +1427,7 @@ Out_Thick_Border_Line=Thick Border FR-App-File_Lookup_range=Search range ReportColumns-Columns_to=Split To Transparent=Transparent -Parameter-Integer=Integer +FR-Designer_Parameter_Integer=Integer PDF-Print_Setting=PDF Print Setting Server-Embedded_Server=Built-in server M_Server-Server_Config_Manager=Server Configuration Manager diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index 2d6ec86418..aa65d9ba45 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -857,7 +857,7 @@ RP_Authority_Edit=\u6A29\u9650\u7DE8\u96C6 Warnning=\u30EA\u30DE\u30A4\u30F3\u30C9 RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u305A\u3001\u91CD\u8907\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u305B\u3093 Application=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3 -Formula_Dictionary_Display_Examples_Html=\u30D2\u30F3\u30C8: \u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002
+FR-Designer-Formula_Dictionary_Display_Examples_Html=\u30D2\u30F3\u30C8: \u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002
ECP-error_pwd=\u30D1\u30B9\u30EF\u30FC\u30C9\u30A8\u30E9\u30FC FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF M_Edit-FormatBrush=\u66F8\u5F0F\u30D6\u30E9\u30B7(B) @@ -1427,7 +1427,7 @@ Out_Thick_Border_Line=\u30DC\u30C3\u30AF\u30B9\u30D5\u30EC\u30FC\u30E0\u30E9\u30 FR-App-File_Lookup_range=\u691C\u7D22\u7BC4\u56F2 ReportColumns-Columns_to=\u306E\u3088\u3046\u306B\u6539\u5217\u3059\u308B Transparent=\u900F\u660E -Parameter-Integer=\u6574\u6570\u578B +FR-Designer_Parameter_Integer=\u6574\u6570\u578B PDF-Print_Setting=PDF\u5370\u5237\u8A2D\u5B9A Server-Embedded_Server=\u5185\u8535\u30B5\u30FC\u30D0\u30FC M_Server-Server_Config_Manager=\u30B5\u30FC\u30D0\u30FC\u914D\u7F6E(S) diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index 586d858699..a600453f5b 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -857,7 +857,7 @@ RP_Authority_Edit=\uAD8C\uD55C\uD3B8\uC9D1 Warnning=\uC54C\uB9BC RoleName_Can_Not_Be_Null=\uC5ED\uD560\uC774\uB984\uC740\uBE44\uC5B4\uC788\uAC70\uB098\uC911\uBCF5\uB418\uC5B4\uC11C\uB294\uC548\uB429\uB2C8\uB2E4. Application=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 -Formula_Dictionary_Display_Examples_Html=\uD301: \uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C
\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100.
  +FR-Designer-Formula_Dictionary_Display_Examples_Html=\uD301: \uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C
\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100.
  ECP-error_pwd=\uBE44\uBC00\uBC88\uD638\uC785\uB825\uC624\uB958 FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C M_Edit-FormatBrush=\uC11C\uC2DD\uD504\uB9B0\uD2B8(B) @@ -1426,7 +1426,7 @@ Out_Thick_Border_Line=\uAD75\uC740\uBC14\uAE65\uCABD\uD14C\uB450\uB9AC\uC120 FR-App-File_Lookup_range=\uBC94\uC704\uAC80\uC0C9 ReportColumns-Columns_to=\uC140\uB098\uB204\uAE30 Transparent=\uD22C\uBA85 -Parameter-Integer=\uC804\uCCB4\uD0C0\uC785 +FR-Designer_Parameter_Integer=\uC804\uCCB4\uD0C0\uC785 PDF-Print_Setting=PDF\uC778\uC1C4\uC124\uC815 Server-Embedded_Server=\uB0B4\uC7A5\uB41C\uC11C\uBC84 M_Server-Server_Config_Manager=\uC11C\uBC84\uAD6C\uC131 diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 4b38fc25e0..984a94a542 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -860,7 +860,7 @@ RP_Authority_Edit=\u6743\u9650\u7F16\u8F91 Warnning=\u63D0\u9192 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D Application=\u5E94\u7528\u7A0B\u5E8F -Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002
  +FR-Designer-Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002
  ECP-error_pwd=\u5BC6\u7801\u9519\u8BEF FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE M_Edit-FormatBrush=\u683C\u5F0F\u5237(B) @@ -1243,6 +1243,7 @@ Rose_Red=\u73AB\u7470\u7EA2 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u65CB\u8F6C\u503C\u5FC5\u987B\u5728\u8D1F90\u5EA6\u523090\u5EA6 HF-Move_Left=\u5DE6\u79FB Cell_Group=\u5355\u5143\u683C\u7EC4 +FR-Designer-Cell_Group=\u5355\u5143\u683C\u7EC4 Week=\u5468 PageSetup-Orientation=\u65B9\u5411 M-Open_Recent=\u6700\u8FD1\u6253\u5F00\u7684 @@ -1428,7 +1429,7 @@ Out_Thick_Border_Line=\u7C97\u5323\u6846\u7EBF FR-App-File_Lookup_range=\u67E5\u627E\u8303\u56F4 ReportColumns-Columns_to=\u5206\u680F\u6210 Transparent=\u900F\u660E -Parameter-Integer=\u6574\u578B +FR-Designer_Parameter_Integer=\u6574\u578B PDF-Print_Setting=PDF\u6253\u5370\u8BBE\u7F6E Server-Embedded_Server=\u5167\u7F6E\u7684\u670D\u52A1\u5668 M_Server-Server_Config_Manager=\u670D\u52A1\u5668\u914D\u7F6E diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 2073e65ae8..e2a9d856a8 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -859,7 +859,7 @@ RP_Authority_Edit=\u6B0A\u9650\u7DE8\u8F2F Warnning=\u63D0\u9192 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907 Application=\u61C9\u7528\u7A0B\u5F0F -Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C
\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002
  +FR-Designer-Formula_Dictionary_Display_Examples_Html=\u63D0\u793A\uFF1A\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C
\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002
  ECP-error_pwd=\u5BC6\u78BC\u932F\u8AA4 FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8 M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B) @@ -1426,7 +1426,7 @@ Out_Thick_Border_Line=\u7C97\u5323\u6846\u7DDA FR-App-File_Lookup_range=\u67E5\u627E\u7BC4\u570D ReportColumns-Columns_to=\u5206\u6B04\u6210 Transparent=\u900F\u660E -Parameter-Integer=\u6574\u578B +FR-Designer_Parameter_Integer=\u6574\u578B PDF-Print_Setting=PDF\u5217\u5370\u8A2D\u5B9A Server-Embedded_Server=\u5167\u7F6E\u7684\u4F3A\u670D\u5668 M_Server-Server_Config_Manager=\u4F3A\u670D\u5668\u914D\u7F6E(S) diff --git a/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java b/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java index dab59eaffe..bcc41943f8 100644 --- a/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java +++ b/designer_base/src/com/fr/design/present/dict/FormulaDictPane.java @@ -48,14 +48,14 @@ public class FormulaDictPane extends FurtherBasicBeanPane { double[] rowSize = {p, p, p}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; - UILabel tag = new UILabel(Inter.getLocText("Formula_Dictionary_Display_Examples_Html")); + UILabel tag = new UILabel(Inter.getLocText("FR-Designer-Formula_Dictionary_Display_Examples_Html")); tag.setForeground(new Color(51, 51, 52)); tag.setPreferredSize(new Dimension(225, 80)); JPanel t = new JPanel(new BorderLayout()); t.add(tag, BorderLayout.CENTER); Formula vf = new Formula("$$$"); - valueFormulaEditor = new FormulaEditor("", vf); + valueFormulaEditor = new FormulaEditor(StringUtils.EMPTY, vf); JPanel valueFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, LEFT_BORDER, 0)); valueFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0, -LEFT_BORDER, 0, -LEFT_BORDER)); From 75f86a0c851f9cd256ddfcf9c7ef3f944bb64558 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 10:00:50 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 1 + designer_base/src/com/fr/design/locale/designer_en_US.properties | 1 + designer_base/src/com/fr/design/locale/designer_ja_JP.properties | 1 + designer_base/src/com/fr/design/locale/designer_ko_KR.properties | 1 + designer_base/src/com/fr/design/locale/designer_zh_TW.properties | 1 + 5 files changed, 5 insertions(+) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index f006d5afbc..3d7e807f33 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -1240,6 +1240,7 @@ Rose_Red=Rose Red StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=The value of rotation must between -90 and 90 degrees HF-Move_Left=To the left Cell_Group=Cell Group +FR-Designer-Cell_Group=Cell Group Week=Week PageSetup-Orientation=Orientation M-Open_Recent=Open Recent diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index 7392e95897..1658fecd6c 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -1242,6 +1242,7 @@ Rose_Red=Rose Red StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=Rotation value must between -90 and 90 degrees HF-Move_Left=Left shift Cell_Group=Cell Group +FR-Designer-Cell_Group=Cell Group Week=Week PageSetup-Orientation=Orientation M-Open_Recent=Open Recent diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index aa65d9ba45..d1ea8fbd0a 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -1240,6 +1240,7 @@ Rose_Red=\u30ED\u30FC\u30BA\u30EC\u30C3\u30C9 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u56DE\u8EE2\u5024\u306F-90\u304B\u308990\u5EA6 HF-Move_Left=\u5DE6\u3078\u79FB\u52D5\u3059\u308B Cell_Group=\u30BB\u30EB\u7D44 +FR-Designer-Cell_Group=\u30BB\u30EB\u7D44 Week=\u5468 PageSetup-Orientation=\u65B9\u5411 M-Open_Recent=\u6700\u8FD1\u958B\u3044\u305F\u3082\u306E diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index a600453f5b..667b1ba0f8 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -1241,6 +1241,7 @@ Rose_Red=\uB85C\uC988\uBE68\uAC15 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\uD68C\uC804\uAC12\uC740-90\uB3C4\uC5D0\uC11C 90\uB3C4\uAE4C\uC9C0 HF-Move_Left=\uC67C\uCABD\uC73C\uB85C\uC774\uB3D9 Cell_Group=\uC140\uADF8\uB8F9 +FR-Designer-Cell_Group=\uC140\uADF8\uB8F9 Week=\uC8FC PageSetup-Orientation=\uBC29\uD5A5 M-Open_Recent=\uCD5C\uADFC\uC5F4\uC5B4\uBCF8 diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index e2a9d856a8..b316f6ec7e 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -1242,6 +1242,7 @@ Rose_Red=\u73AB\u7470\u7D05 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u65CB\u8F49\u503C\u5FC5\u9808\u5728\u8CA090\u5EA6\u523090\u5EA6 HF-Move_Left=\u5DE6\u79FB Cell_Group=\u5132\u5B58\u683C\u7D44 +FR-Designer-Cell_Group=\u5132\u5B58\u683C\u7D44 Week=\u5468 PageSetup-Orientation=\u65B9\u5411 M-Open_Recent=\u958B\u555F\u6700\u8FD1\u4F7F\u7528\u6A94 From 1f6a78c23db6a7dba4a537a4992c255d7f27f010 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 11:29:06 +0800 Subject: [PATCH 5/8] =?UTF-8?q?REPORT-4767=20[9.0=E5=86=85=E6=B5=8B]=20?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7-?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E6=8F=90=E4=BA=A4=E6=9D=A1=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=B1=BB=E5=9E=8B=E6=97=B6=EF=BC=8C=E5=87=A0?= =?UTF-8?q?=E4=B8=AA=E5=9B=BE=E6=A0=87=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= =?UTF-8?q?=20REPORT-4604=20=E8=AE=BE=E8=AE=A1=E5=99=A8=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=8F=92=E5=85=A5=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E5=85=83=E7=B4=A0=20=E5=9B=BE=E8=A1=A8=E5=92=8C=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E9=83=BD=E6=98=BE=E7=A4=BA=E5=9C=A8=E4=B8=AD=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/insert/flot/ChartFloatAction.java | 29 ++++++++++++++-- .../actions/insert/flot/ImageFloatAction.java | 31 ++++++++++++++++-- .../fr/design/images/buttonicon/type_bool.png | Bin 362 -> 440 bytes .../fr/design/images/buttonicon/type_date.png | Bin 310 -> 317 bytes .../design/images/buttonicon/type_double.png | Bin 468 -> 522 bytes .../design/images/buttonicon/type_formula.png | Bin 306 -> 299 bytes .../fr/design/images/buttonicon/type_int.png | Bin 509 -> 395 bytes .../design/images/buttonicon/type_string.png | Bin 1295 -> 317 bytes 8 files changed, 55 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java b/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java index ce05628da4..292d4f2876 100644 --- a/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java +++ b/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java @@ -4,6 +4,7 @@ package com.fr.design.actions.insert.flot; import com.fr.base.BaseUtils; +import com.fr.base.DynamicUnitList; import com.fr.base.Style; import com.fr.base.chart.BaseChartCollection; import com.fr.design.actions.ElementCaseAction; @@ -16,10 +17,14 @@ import com.fr.design.menu.MenuKeySet; import com.fr.design.module.DesignModuleFactory; import com.fr.general.FRLogger; import com.fr.general.Inter; +import com.fr.grid.Grid; import com.fr.grid.selection.FloatSelection; +import com.fr.report.ReportHelper; import com.fr.report.cell.FloatElement; +import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.Constants; import com.fr.stable.bridge.StableFactory; +import com.fr.stable.unit.FU; import com.fr.stable.unit.OLDPIX; import javax.swing.*; @@ -85,11 +90,31 @@ public class ChartFloatAction extends ElementCaseAction { FloatElement newFloatElement; try { newFloatElement = new FloatElement(chartDialog.getChartCollection().clone()); - newFloatElement.setLeftDistance(new OLDPIX(20)); - newFloatElement.setTopDistance(new OLDPIX(20)); newFloatElement.setWidth(new OLDPIX(BaseChartCollection.CHART_DEFAULT_WIDTH)); newFloatElement.setHeight(new OLDPIX(BaseChartCollection.CHART_DEFAULT_HEIGHT)); + Grid grid = reportPane.getGrid(); + TemplateElementCase report = reportPane.getEditingElementCase(); + DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report); + DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report); + int horizentalScrollValue = grid.getHorizontalValue(); + int verticalScrollValue = grid.getVerticalValue(); + + int resolution = grid.getResolution(); + int floatWdith = newFloatElement.getWidth().toPixI(resolution); + int floatHeight = newFloatElement.getWidth().toPixI(resolution); + + int leftDifference = (grid.getWidth() - floatWdith) > 0 ? (grid.getWidth() - floatWdith) : 0; + int topDifference = (grid.getHeight() - floatHeight) > 0 ? (grid.getHeight() - floatHeight) : 0; + FU evtX_fu = FU.valueOfPix((leftDifference) / 2, resolution); + FU evtY_fu = FU.valueOfPix((topDifference) / 2, resolution); + + FU leftDistance = FU.getInstance(evtX_fu.toFU() + columnWidthList.getRangeValue(0, horizentalScrollValue).toFU()); + FU topDistance = FU.getInstance(evtY_fu.toFU() + rowHeightList.getRangeValue(0, verticalScrollValue).toFU()); + + newFloatElement.setLeftDistance(leftDistance); + newFloatElement.setTopDistance(topDistance); + Style style = newFloatElement.getStyle(); if (style != null) { newFloatElement.setStyle(style.deriveBorder(Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black)); diff --git a/designer/src/com/fr/design/actions/insert/flot/ImageFloatAction.java b/designer/src/com/fr/design/actions/insert/flot/ImageFloatAction.java index 78b408347f..9861499bf9 100644 --- a/designer/src/com/fr/design/actions/insert/flot/ImageFloatAction.java +++ b/designer/src/com/fr/design/actions/insert/flot/ImageFloatAction.java @@ -4,6 +4,7 @@ package com.fr.design.actions.insert.flot; import com.fr.base.BaseUtils; +import com.fr.base.DynamicUnitList; import com.fr.base.ScreenResolution; import com.fr.design.actions.ElementCaseAction; import com.fr.design.dialog.BasicDialog; @@ -14,9 +15,12 @@ import com.fr.design.mainframe.ElementCasePane; import com.fr.design.menu.MenuKeySet; import com.fr.design.report.SelectImagePane; import com.fr.general.Inter; +import com.fr.grid.Grid; import com.fr.grid.selection.FloatSelection; +import com.fr.report.ReportHelper; import com.fr.report.cell.FloatElement; import com.fr.report.cell.cellattr.CellImage; +import com.fr.report.elementcase.TemplateElementCase; import com.fr.stable.CoreGraphHelper; import com.fr.stable.unit.FU; @@ -87,12 +91,33 @@ public class ImageFloatAction extends ElementCaseAction { CoreGraphHelper.waitForImage(image); floatElement.setValue(image); - - int resolution = ScreenResolution.getScreenResolution(); + Grid grid = reportPane.getGrid(); + int resolution = grid.getResolution(); floatElement.setWidth(FU.valueOfPix(image.getWidth(null), resolution)); floatElement.setHeight(FU.valueOfPix(image.getHeight(null), resolution)); + TemplateElementCase report = reportPane.getEditingElementCase(); + DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report); + DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report); + int horizentalScrollValue = grid.getHorizontalValue(); + int verticalScrollValue = grid.getVerticalValue(); + + int floatWdith = floatElement.getWidth().toPixI(resolution); + int floatHeight = floatElement.getHeight().toPixI(resolution); + + int leftDifference = (grid.getWidth() - floatWdith) > 0 ? (grid.getWidth() - floatWdith) : 0; + int topDifference = (grid.getHeight() - floatHeight) > 0 ? (grid.getHeight() - floatHeight) : 0; + FU evtX_fu = FU.valueOfPix((leftDifference) / 2, resolution); + FU evtY_fu = FU.valueOfPix((topDifference) / 2, resolution); + + FU leftDistance = FU.getInstance(evtX_fu.toFU() + columnWidthList.getRangeValue(0, horizentalScrollValue).toFU()); + FU topDistance = FU.getInstance(evtY_fu.toFU() + rowHeightList.getRangeValue(0, verticalScrollValue).toFU()); + + floatElement.setLeftDistance(leftDistance); + floatElement.setTopDistance(topDistance); + floatElement.setStyle(cellImage.getStyle()); - reportPane.addFloatElementToCenterOfElementPane(floatElement); +// reportPane.addFloatElementToCenterOfElementPane(floatElement); + reportPane.getEditingElementCase().addFloatElement(floatElement); reportPane.setSelection(new FloatSelection(floatElement.getName())); returnValue = true; diff --git a/designer_base/src/com/fr/design/images/buttonicon/type_bool.png b/designer_base/src/com/fr/design/images/buttonicon/type_bool.png index 7b0dfd3af67cf54b1bc3cb3725193ed45eac8929..e20938ff1676b3e9102c3c82fed306b898f747b0 100644 GIT binary patch literal 440 zcmV;p0Z0CcP)Px$a!Eu%R5%f1V4yN!1es@IVzTxBe+Dm7%w}X{*mma38E>q5jEznHW0k-oh)WL> z9z7UR4h{}17=ma5L>p*qY+?TS^Ox6z3?<4yPft&F28KWLnV1-79yoB|51OM;xI`KF z`t|E3kS-Ask$M!}SU3d3#KgqX?EnAY1&oZWw%fOF|B1y66d?>3nwpyWhK7bRgH(aM z3N&m1(5wAt&Ky65q7w%P#XwMi1JmP#d-onJ0vY<|&6`G$K4QEIGato3P=K?su{r@0 zt>yju_qYH1_rDP6)dXU^iq$}n;IU)J9{&H&?!dsns0=i?n^>>H3R#{m_l4MFE3XwBO~J;kUWUy;o<57vB5b4#2^(sc<|t#l9JMvzkmO#aB#54 i9XfRA8>waxr5*s%if$qQ-IGZG0000o5#&M>6O*m~|1)@@yOxoWVcVHAXS~tHN#V1A z6oU*ud-e?2G7ukVq2d4ktbhLh|9uI>rvxyeYqqww<^@`~o{{mtFuEK$e6SBd8jX!D zb%8;``Qyj06h=nIooCLRIACmS0yfjw*z^|ApQ@M^Fy20U_Ou$NI6?$&0myJ*kZc7? zePw57*F`8{U?5}&vRZUDJc!PmIevVF6n zn?p4pfDB!}e7OS9)dxUqpl=)^BO@Px*i;1|OF)>ah7PD<0M(0A=;VPrh5!Hn07*qo IM6N<$f}f|CkN^Mx diff --git a/designer_base/src/com/fr/design/images/buttonicon/type_date.png b/designer_base/src/com/fr/design/images/buttonicon/type_date.png index c38c9d3dde1ec396276e374f687997562551cd72..3a0ad5c7473b04905677f98cd26b14fc5918282e 100644 GIT binary patch literal 317 zcmV-D0mA-?P)Px#_en%SR5%f>R7(!RAP{A$iKb~cdV|IrfF45c;5B*$W1^?Au3UAg^bWm%F5R{0 z5SxB7q!h~nhMD)?JV=1Ckq4lj5F$~EZHH}FWe}I-75#Cm{K7YWWcF=OSS;sSWF zl=q|a9fqNQ`hIga6vQTAoLokp=VcT{m!c?E^Z9I_rs>;7rfTdyQ3~bpr7<00526oarzyavqDZ~gz zj#QIGnVQ9x{XTZ3y6cwy1T4_^%C{^s4DPElr?JK&f|NSGz4sd-#OT~(i+zZ5y`tfY zK-7ukId0q_2PB&HX^VJ{yQ&|jj=>thWH=p{msqg|CFEiZPFhSLz#KQ(fcq3&o%pb6 zV!)zW8@VF2odM*|TA!`a|+&deBd227&b+&wRRt-zJo^C=A^ZLMuS>mibn&efeAzqhq(Or0f5_V{PjYe`~Uy|07*qo IM6N<$f`%N5Bme*a diff --git a/designer_base/src/com/fr/design/images/buttonicon/type_double.png b/designer_base/src/com/fr/design/images/buttonicon/type_double.png index 4cdd73fb4f88fbe783804a0ca504d813169386a7..1701ff8d6c3d39b7dfd77c9981c0b063bb606c78 100644 GIT binary patch literal 522 zcmV+l0`>igP)Px$#7RU!R5%gElRHZTK@i7x?~)iof(W9GAtd-{>^5g0q|j1~WkAqqVZ%AE#G!hy?iGrRMj-_Fk7A>{GEoJUBK zdBN2*^^@lbP!uJ3QJItBb54YxPNzpq)0|^WepA(lJF(u4?O0)}Wu7sHP7$(qoRC~D z7hsIF`}7q^rBV}wEQW;c7m$#dHH26UfJGtV7S=Z!jpn(c%#;B_M9i}2t|Yxqin$Az z$z+BQqDL6}*D=P15Vb9S$z~UpF-A84nI%NIN+y+ih)p?lE}*U(TafT1%Tx#OCx0ztLj@%ofv)XgucMnC$o%j96)t~p%bt&-Y6yWyvMFPfBK~-x9efKaD z2_3_CSm8i!!{N{g_htU-XEd8lnn)yWZQC9X1_xHF)#`gcoIi6u0AWj+{)oiy^8f$< M07*qoM6N<$g3D&@Bme*a literal 468 zcmV;_0W1EAP)lp%tzNzQFGw7y&XkFX>Fb|AU@lB4 z294qapdRgi{}_1~7#Od^R5~~~u>AS+C*c48|3>%jJtzf^Tz?!&?&*v-E%e7{YA+!^p^Z?*D&=XdwQ}%*?p)@85r$k@aG=j8Ia;stGDc zNH07U5mJcH5`1#-$i%0J7`bK3mgxb5F9=yJFy7X|eSj=M4x62w{oT)>KNEm@<)Qi? z0>$P~%?BVumoHzg0Ce>M5F6+lhsemt2Ou_80mu>%rmCR>Y8U`nYljA<$b6~*0000< KMNUMnLSTYD7Sc!n diff --git a/designer_base/src/com/fr/design/images/buttonicon/type_formula.png b/designer_base/src/com/fr/design/images/buttonicon/type_formula.png index cffd7e46132c2d3c1d907704d9fb02c1b663f944..278ddc985a7d4afe8965b131366a65ca0ec1fde5 100644 GIT binary patch literal 299 zcmV+`0o4A9P)Px#*Aevl{6JN zE(DnCq>Z5gkP^m8fbf`>69B2JGz~$a6AV6@!3IDCVyz0)CYWoa0;NKJRc(h`D&#@< z(uB}prKUe?Xv7O7jmQ7QU;bPAF2=cIWlVp@o~%tO@1K`NpACx17DaZo);`E5o9Ee$ x{0%)~PTRJ9S(f*%>-K57JJoglis8)GyaB#URY!+C2V(#L002ovPDHLkV1kq5dS(Cs literal 306 zcmV-20nPr2P)Px$MM*?KR5%f1V4yN!1es@IVzTxBe+Dm7%w}X{*mma38E>q5jEznHW0k-oh)WL> z9zA49vEb8XWo0Gy`}c3h|Nog^o;h>k06w)aIlKn`{P}w>Fsv*Y82+9IY9Pu$oL)9I zHj8Iq_%9EPtXVMIiJ`F?Xk%j|$iVQghmnyrg^`i*7cmCG)L=F6$B$o?K(Ah5X8!jB zXs|d?F+VUo4PbHXX%}xSgA6%)_H-q>Vfgr1y^K!-AvvlW2=+24qvH!l9Io1mL!7$8;NpuM zBY`=o9GFHsV0sxDnaaZ;I9 z5GOZ5aImzS2-V3YL!gi*;A(Nu$;l2XlB7w_d%+hvH0{uWARdH!@9ulwz3<+I zcYsiZilV|ON^RSUcoI2ADKPA;$f_0!g-OS8&j4n&ZM*T6&*!H-&$|R5E@Ix&X=&du zjL&Q~cLTr$gm4pr!0-Bgz$p59o<$wU+ron@naoENlO*XKU{-^0;!a^ zNn==`>ic1dolo*{0n0K^I1btjsO!2zmC!x%E~1Na&1SQss<}P9Oi>j1D#IuFxJ5|- zMadpu;l~yl!|*(J7ltt9`%q-DBp)m22SD;8yuEB$)*;OUJ_z-uX|@5x1|gwJ_k*lw zOvx!ytYdHQ0iHGPYMLg{39D2p zk@{g{+M{5Q(7`#XpjN9bqe?n)v0+QEqemVpF+P&KkY%~!y6y%d=6+Bw7`qt!izoB- z&D87ldAzkwlc;93TrNM;^;nG-q2E|Zf0gVT3VW~Yq#x;y00000NkvXXu0mjfQLE*A diff --git a/designer_base/src/com/fr/design/images/buttonicon/type_string.png b/designer_base/src/com/fr/design/images/buttonicon/type_string.png index 0101426ea2ef6e5c3925cf7a5b8e843740b5dd4f..b9aafab2d01a40d146f8a71666a9d98fc58f323d 100644 GIT binary patch delta 290 zcmV+-0p0$O3cUi5B!2;OQb$4nuFf3k0002@Nkl_)?2o7A*RM4kb%O+_+sBapdW_!^ngF`hNBFH$Qs4Yb( zreSn7YyKw*yVE=q7;~tSWH@1qD6N|2aaOktHbbx|vI`O2*~^&c*_HWl^wRle5_K2JHrY`P_4=8~^|S07*qoM6N<$g6nXF`2YX_ literal 1295 zcmbVMZA=?w9KWWD6R0K=7e=Bxu6%ID_U^g9U+Cz|wWX0(EJeB)W!K&VJ?Xvd?yxN; z*ew%791+8ZZN7w!Xf&F**bl~tI=0NHe9<@-aelzJX|fL(opI9)@HwF92Qm{cxqIGz zzu*7$x$*8~%u?S{k71Z4-pQuW*krsr>d<#${2mJ$cI%Oh-Xjm_MNWlSke9O%kBi(O zOhJw>AN&lqW0;v2(iuII=wfoRXy*)!y(B7#jbZH_C56ikK^@P+K|%5pzs#N?aDn#| zeXazRP{J@TbdIR7XC#@AIz%7x z6B|xt65V)MRw3@PQ??xCrf@f~1BcV&@jQUj6rf0oCIM{&9>zg46oqd-1hS^`15ApI zZrVaCKatmUg(1mev1l(k?6NvY0-w)kXwb9`A#7S%(z%jN(yTQF7HT=Y@AMqKM?O;5pp+}IYarOOH=Q&5wK)f}qF zfVDH-GKJGS(*w*C;+@6pErV% z007H^XxLrT*p3T)4%!KV5h~2O0EkdQSI`>_`RGs-P;O6{s&V6zrgKsb*6a$%?k1PL zDVGVWkke%~Ez5;k2XyCUUDoolf`@xtc%LBga#1sivk@x`RpCjOcwI7ZqI$lQR1nhM9tKHkdA5%HCL8 z>oE74?lt=lm3DRBzOV7i=Z_xTo!@bO=)wA{tJCe(Yilcy9$S67y!QLr>z+Hgv5LuU z-mkouJom{r);Hd4oA_>NX(_PWKelJO-}LpFZ|g@_{(7d@YW*}FjYfIk!$+@QS&i3$ zh&C2G=AOwe}kk2j!^)ug+P_-+TG+SLE`M@!69f zR~sHTpIXG`W1#7Y=12DIoGLU=S|ZgWCl4)VPs|)OJ$JdYjf~CQYN|H7hcjZ}-Jd#I zCi)utlV^7wr{1~0aN_W?ouB*R+z%vsUX}chBde{EIJK d>cs*T6V^0s`}4;ed#lDTDjrF)Z-)*X{u_i$yZ!(G From 9473835b57450873139c2965d8a34b2b8b0dab87 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 12:02:55 +0800 Subject: [PATCH 6/8] =?UTF-8?q?REPORT-4888=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/data/datapane/VerticalChoosePane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java b/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java index 9f90737b6b..1e9f89d96e 100644 --- a/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java +++ b/designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java @@ -15,6 +15,7 @@ import javax.swing.*; import java.awt.*; public class VerticalChoosePane extends ChoosePane implements DesignerBean { + private static final int RIGHTBORDER = 5; public VerticalChoosePane(Previewable previewable) { this(previewable, -1); @@ -36,7 +37,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean { JPanel rs = new JPanel(new BorderLayout(0, 0)); rs.add(tableNameComboBox, BorderLayout.CENTER); rs.add(GUICoreUtils.createFlowPane(new Component[]{new RefreshLabel(this), previewLabel}, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); - + rs.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, -RIGHTBORDER)); UILabel l1 = new UILabel(Inter.getLocText("FR-Designer_Database"), UILabel.LEFT); UILabel l2 = new UILabel(Inter.getLocText("FR-Designer_Model"), UILabel.LEFT); UILabel l3 = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Database", "FR-Designer_Table"}), UILabel.LEFT); From bf588b70c9549cb73be8f1ba07be74973a24a628 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 10 Oct 2017 16:20:26 +0800 Subject: [PATCH 7/8] =?UTF-8?q?REPORT-4999=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E7=9A=84=E5=B0=8F=E9=97=AE=E9=A2=98-?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E9=9D=A0=E5=B7=A6=E6=88=96=E9=9D=A0=E5=8F=B3?= =?UTF-8?q?=E7=AD=89=E8=AE=BE=E7=BD=AE=E6=97=B6=EF=BC=8C=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9A=84=E5=9C=B0=E6=96=B9=E4=BC=9A=E5=8F=98?= =?UTF-8?q?=E6=88=90=E7=A9=BA=E7=99=BD=E5=86=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REPORT-4888 设计器交互修改-优化加粗、倾斜、下划线点击触发效果 --- .../fr/design/actions/ButtonGroupAction.java | 4 +- .../actions/cell/style/AlignmentAction.java | 40 ++++------ .../cell/style/ReportFontBoldAction.java | 76 +++++++++---------- .../cell/style/ReportFontItalicAction.java | 9 +-- .../cell/style/ReportFontUnderlineAction.java | 8 +- .../com/fr/design/actions/UpdateAction.java | 4 + .../fr/design/gui/ibutton/UIToggleButton.java | 14 +++- .../fr/design/gui/style/AlignmentPane.java | 14 ++-- .../com/fr/design/utils/gui/GUICoreUtils.java | 27 +++++++ 9 files changed, 106 insertions(+), 90 deletions(-) diff --git a/designer/src/com/fr/design/actions/ButtonGroupAction.java b/designer/src/com/fr/design/actions/ButtonGroupAction.java index e3f20f70bf..b45a5d34a1 100644 --- a/designer/src/com/fr/design/actions/ButtonGroupAction.java +++ b/designer/src/com/fr/design/actions/ButtonGroupAction.java @@ -6,12 +6,12 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.mainframe.ElementCasePane; public abstract class ButtonGroupAction extends ElementCaseAction{ - protected Icon[] iconArray; + protected Icon[][] iconArray; protected Integer[] valueArray; private UIButtonGroup group; - protected ButtonGroupAction(ElementCasePane t, Icon[] iconArray, Integer[] valueArray) { + protected ButtonGroupAction(ElementCasePane t, Icon[][] iconArray, Integer[] valueArray) { super(t); this.iconArray = iconArray; this.valueArray = valueArray; diff --git a/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java b/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java index c3b690c97e..b7857fb7ee 100644 --- a/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java +++ b/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java @@ -21,20 +21,16 @@ import javax.swing.*; public class AlignmentAction extends ButtonGroupAction implements StyleActionInterface { - private static final Icon[] normalBlackIcon = new Icon[]{ - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")}; + private static final Icon[][] icons = new Icon[][]{ + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}}; - private static final Icon[] toggleWhiteIcon = new Icon[]{ - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}; private static final Integer[] valueArray = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT}; public AlignmentAction(ElementCasePane t) { - super(t, normalBlackIcon, valueArray); + super(t, icons, valueArray); } @@ -49,24 +45,14 @@ public class AlignmentAction extends ButtonGroupAction implements StyleActionInt return style.deriveHorizontalAlignment(getSelectedValue()); } - /** - * 更新Style - * - * @param style style - */ - public void updateStyle(Style style) { - UIButtonGroup buttonGroup = createToolBarComponent(); - int selected = BaseUtils.getAlignment4Horizontal(style); - for (int i = 0; i < normalBlackIcon.length; i++) { - UIToggleButton button = buttonGroup.getButton(i); - Icon currentIcon = button.getIcon(); - Icon newIcon = selected == valueArray[i] ? toggleWhiteIcon[i] : normalBlackIcon[i]; - if (newIcon != currentIcon) { - button.setIcon(newIcon); - } - } - setSelectedIndex(selected); - } + /** + * 更新Style + * + * @param style style + */ + public void updateStyle(Style style) { + setSelectedIndex(BaseUtils.getAlignment4Horizontal(style)); + } /** * executeActionReturnUndoRecordNeeded diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java index 0abe5ff4b2..0c1af52b0c 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java @@ -21,42 +21,36 @@ import javax.swing.*; public class ReportFontBoldAction extends AbstractStyleAction implements ToggleButtonUpdateAction { private UIToggleButton button; protected Style style; - private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"); - private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png"); + private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png")}; public ReportFontBoldAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-bold")); - this.setSmallIcon(blackIcon); + this.setSmallIcon(icons, true); } - /** - * 根据按钮状态获取格式 - * - * @param style - * @param defStyle - * @return - */ - @Override - public Style executeStyle(Style style, Style defStyle) { - button = createToolBarComponent(); - button.setIcon(getToggleButtonIcon(button.isSelected())); - button.setSelected(!button.isSelected()); - if (button.isSelected()) { - setSelectedFont(style); - button.setSelected(false); - } else { - setUnselectedFont(style); - button.setSelected(true); - } + /** + * 根据按钮状态获取格式 + * + * @param style + * @param defStyle + * @return + */ + @Override + public Style executeStyle(Style style, Style defStyle) { + createToolBarComponent().setSelected(!createToolBarComponent().isSelected()); + if (createToolBarComponent().isSelected()) { + setSelectedFont(style); + createToolBarComponent().setSelected(false); + } else { + setUnselectedFont(style); + createToolBarComponent().setSelected(true); + } return this.style; } - protected Icon getToggleButtonIcon(boolean isSelected) { - return isSelected ? blackIcon : whiteIcon; - } protected void setSelectedFont(Style style) { this.style = StyleUtils.boldReportFont(style); @@ -66,22 +60,20 @@ public class ReportFontBoldAction extends AbstractStyleAction implements ToggleB this.style = StyleUtils.unBoldReportFont(style); } - /** - * Update Style. - */ - @Override - public void updateStyle(Style style) { - if (style == null) { - return; - } - FRFont frFont = style.getFRFont(); - if (frFont == null) { - return; - } - button = createToolBarComponent(); - button.setSelected(isStyle(frFont)); - button.setIcon(getToggleButtonIcon(!button.isSelected())); - } + /** + * Update Style. + */ + @Override + public void updateStyle(Style style) { + if (style == null) { + return; + } + FRFont frFont = style.getFRFont(); + if (frFont == null) { + return; + } + createToolBarComponent().setSelected(isStyle(frFont)); + } protected boolean isStyle(FRFont frFont) { return frFont.isBold(); @@ -95,7 +87,7 @@ public class ReportFontBoldAction extends AbstractStyleAction implements ToggleB @Override public UIToggleButton createToolBarComponent() { if (button == null) { - button = GUICoreUtils.createToolBarComponent(this); + button = GUICoreUtils.createToolBarComponentWhiteIcon(this); button.setEventBannded(true); } return button; diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java index 7857cefe8b..9f9f218859 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java @@ -17,14 +17,13 @@ import javax.swing.*; */ public class ReportFontItalicAction extends ReportFontBoldAction { - private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"); - private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png"); + private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png")}; public ReportFontItalicAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-italic")); - this.setSmallIcon(blackIcon); + this.setSmallIcon(icons, true); } @@ -36,10 +35,6 @@ public class ReportFontItalicAction extends ReportFontBoldAction { this.style = StyleUtils.unItalicReportFont(style); } - protected Icon getToggleButtonIcon(boolean isSelected) { - return isSelected ? blackIcon : whiteIcon; - } - protected boolean isStyle(FRFont frFont) { return frFont.isItalic(); } diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java index 96369867db..dc4fbe7880 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java @@ -18,14 +18,13 @@ import javax.swing.*; */ public class ReportFontUnderlineAction extends ReportFontBoldAction { - private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"); - private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png"); + private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png")}; public ReportFontUnderlineAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-Underline")); - this.setSmallIcon(blackIcon); + this.setSmallIcon(icons, true); } protected void setSelectedFont (Style style) { @@ -36,9 +35,6 @@ public class ReportFontUnderlineAction extends ReportFontBoldAction { this.style = StyleUtils.setReportFontUnderline(style, false); } - protected Icon getToggleButtonIcon(boolean isSelected) { - return isSelected ? blackIcon : whiteIcon; - } protected boolean isStyle(FRFont frFont) { return frFont.getUnderline() != Constants.LINE_NONE; diff --git a/designer_base/src/com/fr/design/actions/UpdateAction.java b/designer_base/src/com/fr/design/actions/UpdateAction.java index eb0ede5fa4..8c458b53f7 100644 --- a/designer_base/src/com/fr/design/actions/UpdateAction.java +++ b/designer_base/src/com/fr/design/actions/UpdateAction.java @@ -139,6 +139,10 @@ public abstract class UpdateAction extends ShortCut implements Action { this.putValue(Action.SMALL_ICON, smallIcon); } + public void setSmallIcon(Icon[] smallIcon, boolean white) { + this.putValue(Action.SMALL_ICON, smallIcon); + } + /** * Returns the mnemonic property setting. * diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java b/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java index c51a72acdf..0a5351048d 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java @@ -48,7 +48,7 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{ } /** - * 需要反白的按钮接口 + * 需要反白的按钮接口(组合按钮情况-UIButtonGroup) * support icons[normalIcon, selectedIcon] * @param icons */ @@ -67,6 +67,18 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{ addMouseListener(getMouseListener()); } + /** + * 需要反白的按钮接口(单个按钮情况)-再次点击取消选中状态 + * support icons[normalIcon, selectedIcon] + * @param icons + */ + public UIToggleButton(Icon[] icons, boolean needRelease) { + super(icons[0], null, icons[1]); + setSelectedIcon(icons[1]); + setExtraPainted(true); + addMouseListener(getMouseListener()); + } + public void setGlobalName(String name){ toggleButtonName = name ; } diff --git a/designer_base/src/com/fr/design/gui/style/AlignmentPane.java b/designer_base/src/com/fr/design/gui/style/AlignmentPane.java index 116c853424..f0e760cfd0 100644 --- a/designer_base/src/com/fr/design/gui/style/AlignmentPane.java +++ b/designer_base/src/com/fr/design/gui/style/AlignmentPane.java @@ -80,11 +80,15 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO imageLayoutComboBox = new UIComboBox(LAYOUT); initTextRotationCombox(); - Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), - BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}; + Icon[][] hAlignmentIconArray = {{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png")}, + {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}}; +// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), +// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), +// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), +// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}; Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT, Integer.valueOf(Constants.DISTRIBUTED), Constants.NULL}; hAlignmentPane = new UIButtonGroup(hAlignmentIconArray, hAlignment); hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Left"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Right"), diff --git a/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java b/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java index b68418cc35..0225cf5424 100644 --- a/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java +++ b/designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java @@ -221,6 +221,33 @@ public abstract class GUICoreUtils{ return (UIToggleButton) object; } + /** + * 创建工具栏组件-反白icon + * @param updateAction 更新动作 + * @return UIToggleButton 按钮 + * + */ + public static UIToggleButton createToolBarComponentWhiteIcon(UpdateAction updateAction) { + UIToggleButton button = new UIToggleButton((Icon[]) updateAction.getValue(Action.SMALL_ICON), true); + button.set4ToolbarButton(); + Integer mnemonicInteger = (Integer) updateAction.getValue(Action.MNEMONIC_KEY); + if (mnemonicInteger != null) { + button.setMnemonic((char) mnemonicInteger.intValue()); + } + + button.addActionListener(updateAction); + + button.registerKeyboardAction(updateAction, updateAction.getAccelerator(), JComponent.WHEN_IN_FOCUSED_WINDOW); + + updateAction.putValue(UIToggleButton.class.getName(), button); + button.setText(StringUtils.EMPTY); + button.setEnabled(updateAction.isEnabled()); + + button.setToolTipText(ActionFactory.createButtonToolTipText(updateAction)); + + return button; + } + /** * 设置一个窗口 * From a71f01976c475a4a39323f76ce24ec4448f87fc9 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Wed, 11 Oct 2017 09:49:24 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/cell/style/AlignmentAction.java | 4 +- .../cell/style/ReportFontBoldAction.java | 4 +- .../cell/style/ReportFontItalicAction.java | 4 +- .../cell/style/ReportFontUnderlineAction.java | 4 +- .../design/editor/ValueEditorPaneFactory.java | 79 ++++++++++--------- 5 files changed, 48 insertions(+), 47 deletions(-) diff --git a/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java b/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java index b7857fb7ee..acc9b6302b 100644 --- a/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java +++ b/designer/src/com/fr/design/actions/cell/style/AlignmentAction.java @@ -21,7 +21,7 @@ import javax.swing.*; public class AlignmentAction extends ButtonGroupAction implements StyleActionInterface { - private static final Icon[][] icons = new Icon[][]{ + private static final Icon[][] ICONS = new Icon[][]{ {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png")}, {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png")}, {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}}; @@ -30,7 +30,7 @@ public class AlignmentAction extends ButtonGroupAction implements StyleActionInt private static final Integer[] valueArray = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT}; public AlignmentAction(ElementCasePane t) { - super(t, icons, valueArray); + super(t, ICONS, valueArray); } diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java index 0c1af52b0c..7b62ffb513 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java @@ -21,13 +21,13 @@ import javax.swing.*; public class ReportFontBoldAction extends AbstractStyleAction implements ToggleButtonUpdateAction { private UIToggleButton button; protected Style style; - private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png")}; + private final static Icon[] ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png")}; public ReportFontBoldAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-bold")); - this.setSmallIcon(icons, true); + this.setSmallIcon(ICONS, true); } /** diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java index 9f9f218859..66e2d97cf0 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java @@ -17,13 +17,13 @@ import javax.swing.*; */ public class ReportFontItalicAction extends ReportFontBoldAction { - private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png")}; + private final static Icon[] ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png")}; public ReportFontItalicAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-italic")); - this.setSmallIcon(icons, true); + this.setSmallIcon(ICONS, true); } diff --git a/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java b/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java index dc4fbe7880..b44d696ce5 100644 --- a/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java +++ b/designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java @@ -18,13 +18,13 @@ import javax.swing.*; */ public class ReportFontUnderlineAction extends ReportFontBoldAction { - private final static Icon[] icons = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png")}; + private final static Icon[] ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png")}; public ReportFontUnderlineAction(ElementCasePane t) { super(t); this.setName(Inter.getLocText("FRFont-Underline")); - this.setSmallIcon(icons, true); + this.setSmallIcon(ICONS, true); } protected void setSelectedFont (Style style) { diff --git a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java index ebf712cc85..4000176bbd 100644 --- a/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java +++ b/designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java @@ -210,7 +210,7 @@ public class ValueEditorPaneFactory { new TextEditor(), new SpinnerIntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor }; @@ -227,7 +227,7 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor, new WidgetNameEditor(Inter.getLocText("Widget")) @@ -245,11 +245,11 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor, new ParameterEditor(), - new ColumnRowEditor(Inter.getLocText("Cell")) + new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")) }; } @@ -264,11 +264,11 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor, new ParameterEditor(), - new ColumnRowEditor(Inter.getLocText("Cell")), + new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")), new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group")) }; } @@ -280,7 +280,7 @@ public class ValueEditorPaneFactory { */ public static Editor[] cellGroupEditor() { return new Editor[]{ - new ColumnRowEditor(Inter.getLocText("Cell")), + new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")), new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group")) }; } @@ -309,7 +309,7 @@ public class ValueEditorPaneFactory { public static Editor[] dateEditors(String popupName, String textEditorValue) { return new Editor[]{ new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")) }; } @@ -326,11 +326,11 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor, new ParameterEditor(), - new ColumnRowEditor(Inter.getLocText("Cell")), + new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")), new ColumnSelectedEditor(), //23328 allEditors中删除控件选项 // new WidgetNameEditor(Inter.getLocText("Widget")) @@ -347,7 +347,7 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), }; } @@ -363,7 +363,7 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor, new ParameterEditor(), @@ -393,7 +393,7 @@ public class ValueEditorPaneFactory { public static Editor[] dateEditors() { FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); return new Editor[]{ - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), formulaEditor, new ParameterEditor(), }; @@ -412,7 +412,7 @@ public class ValueEditorPaneFactory { new TextEditor(), new IntegerEditor(), new DoubleEditor(), - new DateEditor(true, Inter.getLocText("Date")), + new DateEditor(true, Inter.getLocText("FR-Designer_Date")), new BooleanEditor(), formulaEditor }; @@ -430,7 +430,7 @@ public class ValueEditorPaneFactory { list.add(new TextEditor()); list.add(new IntegerEditor()); list.add(new DoubleEditor()); - list.add(new DateEditor(true, Inter.getLocText("Date"))); + list.add(new DateEditor(true, Inter.getLocText("FR-Designer_Date"))); list.add(new BooleanEditor()); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); @@ -447,30 +447,31 @@ public class ValueEditorPaneFactory { * @return 值编辑器 */ private static List createEditors4Chart(int paraUseType) { - if (paraUseType == ParameterTableModel.CHART_PIE_USE) { - return getPieEditor(); - } else if (paraUseType == ParameterTableModel.CHART_MAP_USE) { - return getMapEditor(); - } else if (paraUseType == ParameterTableModel.CHART_GIS_USE) { - return getGisEditor(); - } else if (paraUseType == ParameterTableModel.CHART__XY_USE) { - return getXYEditor(); - } else if (paraUseType == ParameterTableModel.CHART_BUBBLE_USE) { - return getBubbbleEdtor(); - } else if (paraUseType == ParameterTableModel.CHART_NO_USE) { - return getChartNoUseEditor(); - } else if (paraUseType == ParameterTableModel.CHART_METER_USE) { - return getMeterEditor(); - } else if (paraUseType == ParameterTableModel.CHART_STOCK_USE) { - return getStockEditor(); - } else if (paraUseType == ParameterTableModel.CHART_GANTT_USE) { - return getGanttEditor(); - } else if (paraUseType == ParameterTableModel.FORM_ELEMENTCASE_USE) { - return getFormElementCaseEditor(); - } else if (paraUseType == ParameterTableModel.FORM_CHART_USE) { - return getFormChartEditor(); - } else { - return getChartEditor(); + switch (paraUseType) { + case ParameterTableModel.CHART_PIE_USE: + return getPieEditor(); + case ParameterTableModel.CHART_MAP_USE: + return getMapEditor(); + case ParameterTableModel.CHART_GIS_USE: + return getGisEditor(); + case ParameterTableModel.CHART__XY_USE: + return getXYEditor(); + case ParameterTableModel.CHART_BUBBLE_USE: + return getBubbbleEdtor(); + case ParameterTableModel.CHART_NO_USE: + return getChartNoUseEditor(); + case ParameterTableModel.CHART_METER_USE: + return getMeterEditor(); + case ParameterTableModel.CHART_STOCK_USE: + return getStockEditor(); + case ParameterTableModel.CHART_GANTT_USE: + return getGanttEditor(); + case ParameterTableModel.FORM_ELEMENTCASE_USE: + return getFormElementCaseEditor(); + case ParameterTableModel.FORM_CHART_USE: + return getFormChartEditor(); + default: + return getChartEditor(); } }