From cdb7de829520a8bfa2cbb2a1c3c6398b4e553f22 Mon Sep 17 00:00:00 2001 From: lonord Date: Wed, 18 Jan 2017 11:12:47 +0800 Subject: [PATCH] =?UTF-8?q?pmd=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/locale/designer.properties | 8 +++++++- .../src/com/fr/design/locale/designer_en_US.properties | 8 +++++++- .../src/com/fr/design/locale/designer_ja_JP.properties | 8 +++++++- .../src/com/fr/design/locale/designer_ko_KR.properties | 8 +++++++- .../src/com/fr/design/locale/designer_zh_CN.properties | 8 +++++++- .../src/com/fr/design/locale/designer_zh_TW.properties | 8 +++++++- .../src/com/fr/design/write/submit/CustomJobPane.java | 2 +- 7 files changed, 43 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index fbb7111a42..1c4173c68a 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -518,4 +518,10 @@ FR-Designer_FormulaPane_Function_Detail=Function Detail FR-Designer_FormulaPane_Search=Search FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= + +FR-Designer_ClassName_panel=ClassName +FR-Designer_Description_panel=Description +FR-Designer_Edit_panel=Edit +FR-Designer_Property_panel=Property +FR-Designer_Select_panel=Select 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 2278113192..d0dbe5b3a8 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 @@ -518,4 +518,10 @@ FR-Designer_FormulaPane_Function_Detail=Function Detail FR-Designer_FormulaPane_Search=Search FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= + +FR-Designer_ClassName_panel=Class Name +FR-Designer_Description_panel=Description +FR-Designer_Edit_panel=Edit +FR-Designer_Property_panel=Property +FR-Designer_Select_panel=Sel \ No newline at end of file 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 efe89b5b90..8a71eb3909 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 @@ -497,4 +497,10 @@ FR-Designer_FormulaPane_Function_Detail=\u95A2\u6570\u660E\u7D30 FR-Designer_FormulaPane_Search=\u691C\u7D22 FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= + +FR-Designer_ClassName_panel=\u985E\u540D +FR-Designer_Description_panel=\u8A18\u8FF0 +FR-Designer_Edit_panel=\u7DE8\u96C6 +FR-Designer_Property_panel=\u5C5E\u6027 +FR-Designer_Select_panel=\u9078\u629E \ 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 0d2995ab26..be6576cc9b 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 @@ -492,4 +492,10 @@ FR-Designer_FormulaPane_Function_Detail=\uD568\uC218\uC0C1\uC138\uC0AC\uD56D FR-Designer_FormulaPane_Search=\uAC80\uC0C9 FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= + +FR-Designer_ClassName_panel=\uD074\uB798\uC2A4\uB124\uC784 +FR-Designer_Description_panel=\uC124\uBA85 +FR-Designer_Edit_panel=\uD3B8\uC9D1 +FR-Designer_Property_panel=\uC18D\uC131 +FR-Designer_Select_panel=\uC120\uD0DD \ 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 a5040a19d8..4a67bea211 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 @@ -522,4 +522,10 @@ FR-Designer_FormulaPane_Function_Detail=\u51FD\u6570\u660E\u7EC6 FR-Designer_FormulaPane_Search=\u641C\u7D22 FR-Designer_Tab_carousel=tab\u8F6E\u64AD FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD -FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694 \ No newline at end of file +FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694 + +FR-Designer_ClassName_panel=\u7C7B\u540D +FR-Designer_Description_panel=\u63CF\u8FF0 +FR-Designer_Edit_panel=\u7F16\u8F91 +FR-Designer_Property_panel=\u5C5E\u6027 +FR-Designer_Select_panel=\u9009\u62E9 \ 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 acd8e773be..96135a8254 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 @@ -510,4 +510,10 @@ FR-Designer_FormulaPane_Function_Detail=\u51FD\u6578\u660E\u7D30 FR-Designer_FormulaPane_Search=\u641C\u7D22 FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= + +FR-Designer_ClassName_panel=\u985E\u540D +FR-Designer_Description_panel=\u63CF\u8FF0 +FR-Designer_Edit_panel=\u7DE8\u8F2F +FR-Designer_Property_panel=\u5C6C\u6027 +FR-Designer_Select_panel=\u9078\u64C7 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/write/submit/CustomJobPane.java b/designer_base/src/com/fr/design/write/submit/CustomJobPane.java index 342e6f82f9..d986a8beee 100644 --- a/designer_base/src/com/fr/design/write/submit/CustomJobPane.java +++ b/designer_base/src/com/fr/design/write/submit/CustomJobPane.java @@ -1 +1 @@ -package com.fr.design.write.submit; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.Inter; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * Author : Shockway * Date: 13-7-29 * Time: 下午6:48 */ public abstract class CustomJobPane extends BasicBeanPane { protected UITextField classNameTextField; protected ObjectProperiesPane objectProperiesPane; public static final int DEFAULT_LENGTH = 30; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("Designer-Select")); browserButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Designer-Edit")); editButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); reportletNamePane.add(browserButton); reportletNamePane.add(editButton); browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(bPane.getClassPath()); checkAddButtonEnable(); } }).setVisible(true); } }); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); checkAddButtonEnable(); } }); javaEditorPane.addSaveActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dlg.doOK(); } }); dlg.setVisible(true); } }); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Designer-ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Designer-Property"), null)); this.add(objectProperiesPane, BorderLayout.CENTER); UITextArea area = new UITextArea(2, 1); area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.AbstractSubmitTask"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("Designer-Description"), null)); this.add(dsPane, BorderLayout.SOUTH); checkAddButtonEnable(); } public int getLengthOfTextField() { return DEFAULT_LENGTH; } protected String title4PopupWindow() { return "CustomJob"; } protected Component getWindowAncestor() { return this; } @Override public void populateBean(Object ob) { if (ob instanceof AbstractClassJob) { AbstractClassJob cj = (AbstractClassJob) ob; this.classNameTextField.setText(cj.getClassName()); this.objectProperiesPane.populateBean(cj.getPropertyMap()); checkAddButtonEnable(); } } /** * 添加按钮可用 */ public void checkAddButtonEnable() { objectProperiesPane.enableAddButton(StringUtils.isNotEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file +package com.fr.design.write.submit; import com.fr.data.AbstractClassJob; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.formula.JavaEditorPane; import com.fr.design.gui.frpane.ObjectProperiesPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; import com.fr.general.Inter; import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * Author : Shockway * Date: 13-7-29 * Time: 下午6:48 */ public abstract class CustomJobPane extends BasicBeanPane { protected UITextField classNameTextField; protected ObjectProperiesPane objectProperiesPane; public static final int DEFAULT_LENGTH = 30; public CustomJobPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); classNameTextField = new UITextField(getLengthOfTextField()); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("FR-Designer_Select_panel")); browserButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("FR-Designer_Edit_panel")); editButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); reportletNamePane.add(browserButton); reportletNamePane.add(editButton); browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { final ClassNameSelectPane bPane = new ClassNameSelectPane(); bPane.setClassPath(classNameTextField.getText()); bPane.showWindow( SwingUtilities.getWindowAncestor(getWindowAncestor()), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(bPane.getClassPath()); checkAddButtonEnable(); } }).setVisible(true); } }); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final JavaEditorPane javaEditorPane = new JavaEditorPane(classNameTextField.getText(), JavaEditorPane.DEFAULT_SUBMIT_JOB); final BasicDialog dlg = javaEditorPane.showMediumWindow(SwingUtilities.getWindowAncestor(CustomJobPane.this), new DialogActionAdapter() { public void doOk() { classNameTextField.setText(javaEditorPane.getClassText()); checkAddButtonEnable(); } }); javaEditorPane.addSaveActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dlg.doOK(); } }); dlg.setVisible(true); } }); reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_ClassName_panel"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Property_panel"), null)); this.add(objectProperiesPane, BorderLayout.CENTER); UITextArea area = new UITextArea(2, 1); area.setText(Inter.getLocText(new String[]{"Come_True", "Interface"}) + ":com.fr.data.AbstractSubmitTask"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Description_panel"), null)); this.add(dsPane, BorderLayout.SOUTH); checkAddButtonEnable(); } public int getLengthOfTextField() { return DEFAULT_LENGTH; } protected String title4PopupWindow() { return "CustomJob"; } protected Component getWindowAncestor() { return this; } @Override public void populateBean(Object ob) { if (ob instanceof AbstractClassJob) { AbstractClassJob cj = (AbstractClassJob) ob; this.classNameTextField.setText(cj.getClassName()); this.objectProperiesPane.populateBean(cj.getPropertyMap()); checkAddButtonEnable(); } } /** * 添加按钮可用 */ public void checkAddButtonEnable() { objectProperiesPane.enableAddButton(StringUtils.isNotEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file