From 9d9cbacef0bd50a56148f4b7ae28648ca1f9db31 Mon Sep 17 00:00:00 2001 From: hugh Date: Thu, 12 Jan 2017 12:35:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E5=91=BD=E5=90=8D=E4=B9=8B=E7=B1=BB=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/FormulaPane.java | 19 +++++++++---------- .../fr/design/formula/FunctionConstants.java | 3 +-- .../com/fr/design/formula/FunctionGroup.java | 4 ++++ .../fun/FunctionGroupDefineProvider.java | 12 ------------ .../fun/impl/AbstractFunctionGroup.java | 10 +++++++--- .../com/fr/design/locale/designer.properties | 6 ++++++ .../design/locale/designer_en_US.properties | 6 ++++++ .../design/locale/designer_ja_JP.properties | 6 ++++++ .../design/locale/designer_ko_KR.properties | 6 ++++++ .../design/locale/designer_zh_CN.properties | 6 ++++++ .../design/locale/designer_zh_TW.properties | 6 ++++++ 11 files changed, 57 insertions(+), 27 deletions(-) delete mode 100644 designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java diff --git a/designer_base/src/com/fr/design/formula/FormulaPane.java b/designer_base/src/com/fr/design/formula/FormulaPane.java index 8703458979..260ca917b7 100644 --- a/designer_base/src/com/fr/design/formula/FormulaPane.java +++ b/designer_base/src/com/fr/design/formula/FormulaPane.java @@ -8,7 +8,6 @@ import com.fr.design.border.UIRoundedBorder; import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; -import com.fr.design.fun.FunctionGroupDefineProvider; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; @@ -74,7 +73,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ String text = formulaTextArea.getText(); // 判断在中文输入状态是否还包含提示符 要删掉 //Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column - String tip = "\n\n\n" + Inter.getLocText("FR-Design_FormulaPane_Tips"); + String tip = "\n\n\n" + Inter.getLocText("FR-Designer_FormulaPane_Tips"); if(text.contains(tip)) { text = text.substring(0, text.indexOf(tip)); insertPosition = 0; @@ -144,7 +143,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ JPanel searchPane = new JPanel(new BorderLayout(4, 4)); searchPane.add(keyWordTextField, BorderLayout.CENTER); - UIButton searchButton = new UIButton(Inter.getLocText("FR-Design_FormulaPane_Search")); + UIButton searchButton = new UIButton(Inter.getLocText("FR-Designer_FormulaPane_Search")); searchPane.add(searchButton, BorderLayout.EAST); tipsPane.add(searchPane, BorderLayout.NORTH); initKeyWordTextFieldKeyListener(); @@ -477,7 +476,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ if (content.trim().equals("=")) { this.formulaTextArea.setForeground(Color.gray); //Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column - this.formulaTextArea.setText("\n\n\n" + Inter.getLocText("FR-Design_FormulaPane_Tips")); + this.formulaTextArea.setText("\n\n\n" + Inter.getLocText("FR-Designer_FormulaPane_Tips")); this.formulaTextArea.setCaretPosition(0); ifHasBeenWriten = 0; this.listModel.removeAllElements(); @@ -620,7 +619,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ functionTypeListModel.addElement(FunctionConstants.CUSTOM); functionTypeListModel.addElement(FunctionConstants.PLUGIN); //hugh:自定义函数分组 - Set groups = ExtraClassManager.getInstance().getArray(FunctionGroupDefineProvider.MARK_STRING); + Set groups = ExtraClassManager.getInstance().getArray(FunctionGroup.MARK_STRING); if(!groups.isEmpty()){ for(Mutable group : groups){ functionTypeListModel.addElement(group); @@ -702,7 +701,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea); desScrollPane.setBorder(null); - this.add(this.createNamePane(Inter.getLocText("FR-Design_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST); + this.add(this.createNamePane(Inter.getLocText("FR-Designer_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST); descriptionTextArea.setBackground(new Color(255, 255, 225)); descriptionTextArea.setLineWrap(true); descriptionTextArea.setWrapStyleWord(true); @@ -775,7 +774,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ UIScrollPane variablesTreePane = new UIScrollPane(variablesTree); variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); this.add(this.createNamePane( - Inter.getLocText("FR-Design_FormulaPane_Variables") + ":", variablesTreePane), BorderLayout.CENTER); + Inter.getLocText("FR-Designer_FormulaPane_Variables") + ":", variablesTreePane), BorderLayout.CENTER); variablesTree.setRootVisible(false); variablesTree.setShowsRootHandles(true); variablesTree.addMouseListener(applyTextMouseListener); @@ -804,7 +803,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ private class LookDetailAction extends UpdateAction { public LookDetailAction() { - this.setName(Inter.getLocText("FR-Design_FormulaPane_Function_Detail")); + this.setName(Inter.getLocText("FR-Designer_FormulaPane_Function_Detail")); this.setMnemonic('L'); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png")); } @@ -819,7 +818,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ BasicPane basicPane = new BasicPane() { @Override protected String title4PopupWindow() { - return Inter.getLocText("FR-Design_FormulaPane_Function_Detail"); + return Inter.getLocText("FR-Designer_FormulaPane_Function_Detail"); } }; basicPane.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -915,7 +914,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ variableResolver.resolveColumnNames()).createMutableTreeNode()); // Set cutReport Variable - rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Design_FormulaPane_Variables"), + rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Designer_FormulaPane_Variables"), BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"), variableResolver.resolveCurReportVariables()).createMutableTreeNode()); diff --git a/designer_base/src/com/fr/design/formula/FunctionConstants.java b/designer_base/src/com/fr/design/formula/FunctionConstants.java index 5acb506df0..372409583d 100644 --- a/designer_base/src/com/fr/design/formula/FunctionConstants.java +++ b/designer_base/src/com/fr/design/formula/FunctionConstants.java @@ -1,7 +1,6 @@ package com.fr.design.formula; import com.fr.base.FRContext; -import com.fr.design.fun.FunctionGroupDefineProvider; import com.fr.file.FunctionManager; import com.fr.file.FunctionManagerProvider; import com.fr.function.*; @@ -99,7 +98,7 @@ public abstract class FunctionConstants { Collections.addAll(all, PLUGIN.getDescriptions()); Collections.addAll(all, CUSTOM.getDescriptions()); //hugh:自定义函数分组 - Set groups = ExtraClassManager.getInstance().getArray(FunctionGroupDefineProvider.MARK_STRING); + Set groups = ExtraClassManager.getInstance().getArray(FunctionGroup.MARK_STRING); if(!groups.isEmpty()){ for(Mutable group : groups){ Collections.addAll(all, ((FunctionGroup)group).getDescriptions()); diff --git a/designer_base/src/com/fr/design/formula/FunctionGroup.java b/designer_base/src/com/fr/design/formula/FunctionGroup.java index 4764454ede..b2d181b125 100644 --- a/designer_base/src/com/fr/design/formula/FunctionGroup.java +++ b/designer_base/src/com/fr/design/formula/FunctionGroup.java @@ -2,6 +2,10 @@ package com.fr.design.formula; public interface FunctionGroup { + + int CURRENT_LEVEL = 1; + String MARK_STRING = "FunctionGroup"; + String getGroupName(); NameAndDescription[] getDescriptions(); } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java b/designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java deleted file mode 100644 index 906a567712..0000000000 --- a/designer_base/src/com/fr/design/fun/FunctionGroupDefineProvider.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.fr.design.fun; - -import com.fr.design.formula.FunctionGroup; -import com.fr.stable.fun.mark.Mutable; -import com.fr.stable.script.FunctionDef; - -public interface FunctionGroupDefineProvider extends Mutable,FunctionGroup{ - int CURRENT_LEVEL = 1; - String MARK_STRING = "FunctionGroupDefineProvider"; - - public FunctionDef[] getFunctionDefs(); -} diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java b/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java index 12cfce71ed..6743393623 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractFunctionGroup.java @@ -1,14 +1,15 @@ package com.fr.design.fun.impl; import com.fr.design.formula.FunctionDefNAD; +import com.fr.design.formula.FunctionGroup; import com.fr.design.formula.NameAndDescription; -import com.fr.design.fun.FunctionGroupDefineProvider; import com.fr.stable.fun.mark.API; +import com.fr.stable.fun.mark.Mutable; import com.fr.stable.script.FunctionDef; -@API(level = FunctionGroupDefineProvider.CURRENT_LEVEL) -public abstract class AbstractFunctionGroup implements FunctionGroupDefineProvider { +@API(level = FunctionGroup.CURRENT_LEVEL) +public abstract class AbstractFunctionGroup implements Mutable, FunctionGroup { @Override public int currentAPILevel() { @@ -31,4 +32,7 @@ public abstract class AbstractFunctionGroup implements FunctionGroupDefineProvid return nads; } + public FunctionDef[] getFunctionDefs(){ + return new FunctionDef[0]; + } } diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 9f7923265c..88782f8408 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -510,3 +510,9 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= + +FR-Designer_FormulaPane_Tips=Tips\:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column +FR-Designer_FormulaPane_Variables=Variables +FR-Designer_FormulaPane_Formula_Description=Formula_Description +FR-Designer_FormulaPane_Function_Detail=Function Detail +FR-Designer_FormulaPane_Search=Search \ No newline at end of file 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 b21847d0e4..a156ba4d43 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 @@ -510,3 +510,9 @@ FR-Designer_Create_Tree=Build Tree FR-Designer_Set_Callback_Function=Set Callback Function FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= + +FR-Designer_FormulaPane_Tips=Tips\:You can input B1 to get the data in the second cell of the first row +FR-Designer_FormulaPane_Variables=Variables +FR-Designer_FormulaPane_Formula_Description=Formula Description +FR-Designer_FormulaPane_Function_Detail=Function Detail +FR-Designer_FormulaPane_Search=Search 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 5ec06064b1..e285674c8b 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 @@ -489,3 +489,9 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= + +FR-Designer_FormulaPane_Tips=\u30D2\u30F3\u30C8\:B1\u3092\u5165\u529B +FR-Designer_FormulaPane_Variables=\u5909\u6570 +FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAC\u660E +FR-Designer_FormulaPane_Function_Detail=\u95A2\u6570\u660E\u7D30 +FR-Designer_FormulaPane_Search=\u691C\u7D22 \ No newline at end of file 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 3e27c558fb..74b556358f 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 @@ -484,3 +484,9 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= + +FR-Designer_FormulaPane_Tips=\uC54C\uB9BC\: B1\uC744\uC785\uB825\uD558\uC5EC\uCCAB\uBC88\uC9F8\uD589\uB450\uBC88\uC9F8\uC5F4\uC758\uB370\uC774\uD130\uB97C\uC785\uB825\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4. +FR-Designer_FormulaPane_Variables=\uBCC0\uC218 +FR-Designer_FormulaPane_Formula_Description=\uC218\uC2DD\uC124\uBA85 +FR-Designer_FormulaPane_Function_Detail=\uD568\uC218\uC0C1\uC138\uC0AC\uD56D +FR-Designer_FormulaPane_Search=\uAC80\uC0C9 \ No newline at end of file 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 d43f8746bb..e45bafdd07 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 @@ -514,3 +514,9 @@ FR-Designer_Create_Tree=\u6784\u5EFA\u6811 FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570 FR-Designer_ConfirmDialog_Content=\u662F\u5426\u786E\u5B9A\u5220\u9664tab\u63A7\u4EF6 FR-Designer_ConfirmDialog_Title=FineReport 8.0 + +FR-Designer_FormulaPane_Tips=\u63D0\u793A\:\u60A8\u53EF\u4EE5\u901A\u8FC7\u8F93\u5165B1\u6765\u5199\u5165\u7B2C\u4E00\u884C\u7B2C\u4E8C\u5217\u7684\u6570\u636E\u3002 +FR-Designer_FormulaPane_Variables=\u53D8\u91CF +FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8BF4\u660E +FR-Designer_FormulaPane_Function_Detail=\u51FD\u6570\u660E\u7EC6 +FR-Designer_FormulaPane_Search=\u641C\u7D22 \ No newline at end of file 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 58868eb0db..ecb1063cc6 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 @@ -502,3 +502,9 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= + +FR-Designer_FormulaPane_Tips=\u63D0\u793A\:\u60A8\u53EF\u4EE5\u901A\u904E\u8F38\u5165B1\u4F86\u5BEB\u5165\u7B2C\u4E00\u5217\u7B2C\u4E8C\u6B04\u7684\u8CC7\u6599\u3002 +FR-Designer_FormulaPane_Variables=\u8B8A\u91CF +FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAA\u660E +FR-Designer_FormulaPane_Function_Detail=\u51FD\u6578\u660E\u7D30 +FR-Designer_FormulaPane_Search=\u641C\u7D22 \ No newline at end of file