From 7482b3f9e6f06bbadfce85a6721dc820fa9d3a7b Mon Sep 17 00:00:00 2001 From: rinoux Date: Fri, 16 Dec 2016 16:22:38 +0800 Subject: [PATCH 001/127] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=90=AF=E5=8A=A8=E6=89=93=E5=BC=80=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fun/DesignerStartOpenFileProcessor.java | 20 +++++++++++++++++++ ...bstractDesignerStartOpenFileProcessor.java | 20 +++++++++++++++++++ .../src/com/fr/start/BaseDesigner.java | 12 +++++++++++ 3 files changed, 52 insertions(+) create mode 100644 designer_base/src/com/fr/design/fun/DesignerStartOpenFileProcessor.java create mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractDesignerStartOpenFileProcessor.java diff --git a/designer_base/src/com/fr/design/fun/DesignerStartOpenFileProcessor.java b/designer_base/src/com/fr/design/fun/DesignerStartOpenFileProcessor.java new file mode 100644 index 0000000000..bbc9f0ac8c --- /dev/null +++ b/designer_base/src/com/fr/design/fun/DesignerStartOpenFileProcessor.java @@ -0,0 +1,20 @@ +package com.fr.design.fun; + +import com.fr.file.FILE; +import com.fr.stable.fun.mark.Immutable; + +/** + * 指定设计器启动时默认打开的文件 + * Created by rinoux on 2016/12/16. + */ +public interface DesignerStartOpenFileProcessor extends Immutable { + + int CURRENT_LEVEL = 1; + + String XML_TAG = "DesignerStartOpenFileProcessor"; + + /** + * 显示需要打开的报表文件 + */ + FILE fileToShow(); +} diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractDesignerStartOpenFileProcessor.java b/designer_base/src/com/fr/design/fun/impl/AbstractDesignerStartOpenFileProcessor.java new file mode 100644 index 0000000000..5053b0f426 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/impl/AbstractDesignerStartOpenFileProcessor.java @@ -0,0 +1,20 @@ +package com.fr.design.fun.impl; + +import com.fr.design.fun.DesignerStartOpenFileProcessor; +import com.fr.stable.fun.mark.API; + +import static com.fr.stable.fun.mark.Layer.DEFAULT_LAYER_INDEX; + +/** + * Created by rinoux on 2016/12/16. + */ +@API(level = DesignerStartOpenFileProcessor.CURRENT_LEVEL) +public class AbstractDesignerStartOpenFileProcessor { + public int currentAPILevel() { + return DesignerStartOpenFileProcessor.CURRENT_LEVEL; + } + + public int layerIndex() { + return DEFAULT_LAYER_INDEX; + } +} diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index 5af9856c28..016ad604dd 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -11,6 +11,7 @@ import com.fr.design.extra.WebDialog; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.MutilTempalteTabPane; import com.fr.design.file.TemplateTreePane; +import com.fr.design.fun.DesignerStartOpenFileProcessor; import com.fr.design.fun.GlobalListenerProvider; import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.TemplatePane; @@ -224,6 +225,17 @@ public abstract class BaseDesigner extends ToolBarMenuDock { file = FILEFactory.createFILE(FILEFactory.ENV_PREFIX + DesignerEnvManager.getEnvManager().getLastOpenFile()); } + + //启动时打开指定文件的接口 + DesignerStartOpenFileProcessor processor = ExtraDesignClassManager.getInstance().getSingle(DesignerStartOpenFileProcessor.XML_TAG); + if (processor != null) { + FILE f = processor.fileToShow(); + if (f != null) { + file = f;//避免null + } else { + isException = true;//此时有文件nullpointer异常,执行打开空文件 + } + } if (file.exists() && !isException) { df.openTemplate(file); } else { From 52733b5f737d49f83b8deffd582b7b07c903d365 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 5 Jan 2017 10:14:07 +0800 Subject: [PATCH 002/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=943/23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/webattr/ToolBarDragPane.java | 49 ++++++++++++------- .../com/fr/design/locale/designer.properties | 1 + .../design/locale/designer_en_US.properties | 1 + .../design/locale/designer_ja_JP.properties | 1 + .../design/locale/designer_ko_KR.properties | 1 + .../design/locale/designer_zh_CN.properties | 1 + .../design/locale/designer_zh_TW.properties | 1 + 7 files changed, 36 insertions(+), 19 deletions(-) diff --git a/designer/src/com/fr/design/webattr/ToolBarDragPane.java b/designer/src/com/fr/design/webattr/ToolBarDragPane.java index f606c641fe..bd6dd0fc0c 100644 --- a/designer/src/com/fr/design/webattr/ToolBarDragPane.java +++ b/designer/src/com/fr/design/webattr/ToolBarDragPane.java @@ -126,25 +126,9 @@ public class ToolBarDragPane extends WidgetToolBarPane { } } }); - layoutTable = new JTable(toolbarButtonTableModel); - layoutTable.setDefaultRenderer(Object.class, tableRenderer); - layoutTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - layoutTable.setColumnSelectionAllowed(false); - layoutTable.setRowSelectionAllowed(false); - layoutTable.setBackground(Color.white); - layoutTable.addMouseListener(new MouseAdapter() { - public void mouseClicked(MouseEvent e) { - if (e.getClickCount() > 1 && !(SwingUtilities.isRightMouseButton(e)) && isEnabled) { - WidgetOption no = (WidgetOption)layoutTable.getValueAt(layoutTable.getSelectedRow(), layoutTable.getSelectedColumn()); - Widget widget = no.createWidget(); - ToolBarButton tb = new ToolBarButton(no.optionIcon(), widget); - tb.setNameOption(no); - northToolBar.add(tb); - northToolBar.validate(); - northToolBar.repaint(); - } - } - }); + + initLayoutTable(); + JPanel center = FRGUIPaneFactory.createBorderLayout_S_Pane(); center.setBackground(Color.white); center.add(topButton, BorderLayout.NORTH); @@ -178,6 +162,33 @@ public class ToolBarDragPane extends WidgetToolBarPane { isUseToolBarCheckBox.setSelected(true); } + private void initLayoutTable() { + layoutTable = new JTable(toolbarButtonTableModel); + layoutTable.setDefaultRenderer(Object.class, tableRenderer); + layoutTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + layoutTable.setColumnSelectionAllowed(false); + layoutTable.setRowSelectionAllowed(false); + layoutTable.setBackground(Color.white); + int columnWidth = Integer.parseInt(Inter.getLocText("FR-Designer_LayoutTable_Column_Width")); + for (int i = 0; i < layoutTable.getColumnModel().getColumnCount(); i++) { + layoutTable.getColumnModel().getColumn(i).setPreferredWidth(columnWidth); + } + layoutTable.addMouseListener(new MouseAdapter() { + public void mouseClicked(MouseEvent e) { + if (e.getClickCount() > 1 && !(SwingUtilities.isRightMouseButton(e)) && isEnabled) { + WidgetOption no = (WidgetOption)layoutTable.getValueAt(layoutTable.getSelectedRow(), layoutTable.getSelectedColumn()); + Widget widget = no.createWidget(); + ToolBarButton tb = new ToolBarButton(no.optionIcon(), widget); + tb.setNameOption(no); + northToolBar.add(tb); + northToolBar.validate(); + northToolBar.repaint(); + } + } + }); + } + + private boolean isSelectedtable() { for (int i = 0; i < layoutTable.getColumnCount(); i++) { if (layoutTable.isColumnSelected(i)) { diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 9f7923265c..d299aa8e35 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -510,3 +510,4 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= +FR-Designer_LayoutTable_Column_Width=160 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..34e2a4b19b 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,4 @@ FR-Designer_Create_Tree=Build Tree FR-Designer_Set_Callback_Function=Set Callback Function FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= +FR-Designer_LayoutTable_Column_Width=250 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..47ed58a7bb 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,4 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= +FR-Designer_LayoutTable_Column_Width=160 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..f69f3ce991 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,4 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= +FR-Designer_LayoutTable_Column_Width=160 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..962fcb3129 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,4 @@ 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_LayoutTable_Column_Width=160 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..01abf31b72 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,4 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= +FR-Designer_LayoutTable_Column_Width=160 From d28ca1c2822c03f0411e2644d9ac84b3adecaeb8 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 5 Jan 2017 11:54:03 +0800 Subject: [PATCH 003/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=944/23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/webattr/WriteToolBarPane.java | 2 +- designer/src/com/fr/design/webattr/WriteWebSettingPane.java | 6 +++--- 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 ++ 8 files changed, 16 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/design/webattr/WriteToolBarPane.java b/designer/src/com/fr/design/webattr/WriteToolBarPane.java index 0abc1049c3..abd20f7ff8 100644 --- a/designer/src/com/fr/design/webattr/WriteToolBarPane.java +++ b/designer/src/com/fr/design/webattr/WriteToolBarPane.java @@ -76,7 +76,7 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { colorButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png")); northPane.add(GUICoreUtils.createFlowPane(new Component[]{colorBox, colorButton}, FlowLayout.LEFT)); - unloadCheck = new UICheckBox(Inter.getLocText(new String[]{"Event-unloadcheck", "Tooltips"})); + unloadCheck = new UICheckBox(Inter.getLocText("FR-Designer_Unload_Check")); unloadCheck.setSelected(true); showWidgets = new UICheckBox(Inter.getLocText("FR-Designer_Event_ShowWidgets")); diff --git a/designer/src/com/fr/design/webattr/WriteWebSettingPane.java b/designer/src/com/fr/design/webattr/WriteWebSettingPane.java index e42aca728d..2606572453 100644 --- a/designer/src/com/fr/design/webattr/WriteWebSettingPane.java +++ b/designer/src/com/fr/design/webattr/WriteWebSettingPane.java @@ -42,8 +42,7 @@ public class WriteWebSettingPane extends WebSettingPane { @Override protected JPanel createOtherSetPane() { - colorBox = new UICheckBox(Inter.getLocText(new String[]{"Face_Write", "Current", "Edit", "Row", - "Background", "Set"}) + ":"); + colorBox = new UICheckBox(Inter.getLocText("FR-Designer_Set_BG_Of_Current_Row") + ":"); colorBox.setSelected(true); colorButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png")); colorBox.addActionListener(new ActionListener() { @@ -74,7 +73,8 @@ public class WriteWebSettingPane extends WebSettingPane { rptShowButtonGroup.add(leftRadioButton); JPanel showLocPane = GUICoreUtils.createFlowPane(new Component[]{rptShowLocationLabel, centerRadioButton, leftRadioButton}, FlowLayout.LEFT); - unloadCheck = new UICheckBox(Inter.getLocText(new String[]{"Event-unloadcheck", "Tooltips"})); +// unloadCheck = new UICheckBox(Inter.getLocText(new String[]{"Event-unloadcheck", "Tooltips"})); + unloadCheck = new UICheckBox(Inter.getLocText("FR-Designer_Unload_Check")); unloadCheck.setSelected(true); showWidgets = new UICheckBox(Inter.getLocText(new String[]{"Event-showWidgets"})); diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index d299aa8e35..01db13a310 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -511,3 +511,5 @@ FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= FR-Designer_LayoutTable_Column_Width=160 +FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited +FR-Designer_Unload_Check=Prompt users when leave without submitting 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 34e2a4b19b..5ef0afef66 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 @@ -511,3 +511,5 @@ FR-Designer_Set_Callback_Function=Set Callback Function FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= FR-Designer_LayoutTable_Column_Width=250 +FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited +FR-Designer_Unload_Check=Prompt users when leave without submitting 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 47ed58a7bb..84b6fdb742 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 @@ -490,3 +490,5 @@ FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= FR-Designer_LayoutTable_Column_Width=160 +FR-Designer_Set_BG_Of_Current_Row=\u5831\u544A\u30AB\u30EC\u30F3\u30C8\u7DE8\u96C6\u884C\u80CC\u666F\u8A2D\u5B9A +FR-Designer_Unload_Check=\u63D0\u51FA\u305B\u305A\u306B\u30D2\u30F3\u30C8 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 f69f3ce991..3e0bdec0d5 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 @@ -485,3 +485,5 @@ FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= FR-Designer_LayoutTable_Column_Width=160 +FR-Designer_Set_BG_Of_Current_Row=\uAE30\uC785\uD604\uC7AC\uD3B8\uC9D1\uD589\uBC30\uACBD\uC124\uC815 +FR-Designer_Unload_Check=\uBBF8\uC81C\uCD9C\uB098\uAC14\uC74C\uC54C\uB9BC 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 962fcb3129..6b06653ca9 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 @@ -515,3 +515,5 @@ 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_LayoutTable_Column_Width=160 +FR-Designer_Set_BG_Of_Current_Row=\u586B\u62A5\u5F53\u524D\u7F16\u8F91\u884C\u80CC\u666F\u8BBE\u7F6E +FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u79BB\u5F00\u63D0\u793A 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 01abf31b72..f12cdd0f9c 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 @@ -503,3 +503,5 @@ FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= FR-Designer_LayoutTable_Column_Width=160 +FR-Designer_Set_BG_Of_Current_Row=\u586B\u5831\u7576\u524D\u7DE8\u8F2F\u5217\u80CC\u666F\u8A2D\u5B9A +FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u96E2\u958B\u63D0\u793A From e0fa5f5d817d23fd659a61c06743260785df931c Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 5 Jan 2017 15:06:53 +0800 Subject: [PATCH 004/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=947/23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/write/submit/CustomJobPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 454610217d..4720be68fd 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("Select")); browserButton.setPreferredSize(new Dimension( browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("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("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.isEmpty(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.base.GraphHelper; 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("Select")); browserButton.setPreferredSize(new Dimension( GraphHelper.locTextStringWidth("Select") + 20, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( GraphHelper.locTextStringWidth("Edit") + 20, 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("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.isEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file From 1067c1241d2fe80052005aa1aaaf7c8a69d53192 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Thu, 5 Jan 2017 19:57:10 +0800 Subject: [PATCH 005/127] =?UTF-8?q?REPORT-576=20button=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=9B=BE=E7=89=87=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E9=BB=98=E8=AE=A4=E8=83=8C=E6=99=AF=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 与参数面板中的button的设置保持一致。 --- .../design/designer/creator/cardlayout/XCardAddButton.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index 0e8fb4ce45..83427316a5 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -1,13 +1,12 @@ package com.fr.design.designer.creator.cardlayout; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; +import java.awt.*; import java.awt.event.MouseEvent; import javax.swing.Icon; import com.fr.base.BaseUtils; +import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.models.SelectionModel; @@ -147,6 +146,7 @@ public class XCardAddButton extends XButton{ CardSwitchButton titleButton = new CardSwitchButton(index,cardLayoutName); //设置标题 titleButton.setText(getTabTitleName()); + titleButton.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); XCardSwitchButton showButton = new XCardSwitchButton(titleButton,dimension,cardLayout,tagLayout); titleButton.setShowButton(true); showButton.setBackupParent(tagLayout); From 7fb57025562d552440813e48f08dae55e15f8c3b Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 6 Jan 2017 10:01:37 +0800 Subject: [PATCH 006/127] =?UTF-8?q?REPORT-1384=20=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E8=87=AA=E5=AE=9A=E4=B9=89=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../background/BackgroundButtonPane.java | 53 ++++++++++++ .../style/background/BackgroundFactory.java | 34 +++++++- .../background/impl/ImageBackgroundPane.java | 29 ++++--- .../impl/ImageButtonBackgroundPane.java | 80 +++++++++++++++++++ .../AccessibleImgBackgroundEditor.java | 13 ++- 5 files changed, 190 insertions(+), 19 deletions(-) create mode 100644 designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java create mode 100644 designer_base/src/com/fr/design/style/background/impl/ImageButtonBackgroundPane.java diff --git a/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java b/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java new file mode 100644 index 0000000000..296ee746e3 --- /dev/null +++ b/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java @@ -0,0 +1,53 @@ +package com.fr.design.style.background; + +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.general.Background; +import com.fr.general.Inter; + +/** + * Created by ibm on 2017/1/5. + */ +public class BackgroundButtonPane extends BackgroundPane { + + + public BackgroundButtonPane() { + super(); + } + + protected void initTabPane() { + int index = 0; + for (Class key : BackgroundFactory.buttonKindsOfKey()) { + BackgroundUIWrapper wrapper = BackgroundFactory.getButtonWrapper(key); + wrapper.setIndex(index++); + tabbedPane.addTab(Inter.getLocText(wrapper.getTitle()), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane()); + } + } + + protected BackgroundUIWrapper getBackgroundUIWrapper(Background background) { + return BackgroundFactory.getButtonWrapper(background == null ? null : background.getClass()); + } + + protected BackgroundDetailPane getTabItemPane(Background background, int index) { + BackgroundDetailPane quickPane = cacheMap.get(index); + if (quickPane == null) { + quickPane = BackgroundFactory.createButtonIfAbsent(background == null ? null : background.getClass()); + quickPane.addChangeListener(backgroundChangeListener); + cacheMap.put(index, quickPane); + } + tabbedPane.setComponentAt(index, quickPane); + tabbedPane.setSelectedIndex(index); + return quickPane; + } + + protected BackgroundDetailPane getTabItemPaneByIndex(int index) { + BackgroundDetailPane quickPane = cacheMap.get(index); + if (quickPane == null) { + quickPane = BackgroundFactory.createButtonIfAbsent(index); + tabbedPane.setComponentAt(index, quickPane); + cacheMap.put(index, quickPane); + quickPane.addChangeListener(backgroundChangeListener); + } + return quickPane; + } + +} diff --git a/designer_base/src/com/fr/design/style/background/BackgroundFactory.java b/designer_base/src/com/fr/design/style/background/BackgroundFactory.java index 25bf0b5b53..db495bed75 100644 --- a/designer_base/src/com/fr/design/style/background/BackgroundFactory.java +++ b/designer_base/src/com/fr/design/style/background/BackgroundFactory.java @@ -3,7 +3,6 @@ package com.fr.design.style.background; import com.fr.base.background.*; import com.fr.design.ExtraDesignClassManager; -import com.fr.design.fun.BackgroundQuickUIProvider; import com.fr.design.fun.BackgroundUIProvider; import com.fr.design.style.background.gradient.GradientBackgroundPane; import com.fr.design.style.background.impl.*; @@ -21,6 +20,7 @@ public class BackgroundFactory { private static Map, BackgroundUIWrapper> map = new LinkedHashMap<>(); private static Map, BackgroundUIWrapper> browser = new LinkedHashMap<>(); + private static Map, BackgroundUIWrapper> button = new LinkedHashMap<>(); static { registerUniversal(map); @@ -29,6 +29,7 @@ public class BackgroundFactory { registerBrowserImageBackground(browser); registerExtra(map); registerExtra(browser); + registerButtonBackground(button); } private static void registerUniversal(Map, BackgroundUIWrapper> map) { @@ -54,6 +55,14 @@ public class BackgroundFactory { .setType(ImageBackgroundPane4Browser.class).setTitle(Inter.getLocText("Image"))); } + private static void registerButtonBackground(Map, BackgroundUIWrapper> map){ + map.put(ColorBackground.class, BackgroundUIWrapper.create() + .setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("Color"))); + map.put(ImageBackground.class, BackgroundUIWrapper.create() + .setType(ImageButtonBackgroundPane.class).setTitle(Inter.getLocText("Image"))); + + } + private static void registerExtra(Map, BackgroundUIWrapper> map) { Set set = ExtraDesignClassManager.getInstance().getArray(BackgroundUIProvider.MARK_STRING); for (BackgroundUIProvider provider : set) { @@ -85,6 +94,29 @@ public class BackgroundFactory { return new NullBackgroundPane(); } + public static Set> buttonKindsOfKey() { + return button.keySet(); + } + + public static BackgroundUIWrapper getButtonWrapper(Class category) { + return button.get(category); + } + + public static BackgroundDetailPane createButtonIfAbsent(Class category) { + BackgroundUIWrapper wrapper = button.get(category); + return createByWrapper(wrapper); + } + + public static BackgroundDetailPane createButtonIfAbsent(int index) { + for (BackgroundUIWrapper wrapper : button.values()) { + if (wrapper.getIndex() == index) { + return createByWrapper(wrapper); + } + } + return new NullBackgroundPane(); + } + + public static Set> browserKindsOfKey() { return browser.keySet(); } diff --git a/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane.java b/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane.java index 62ad05485f..0e05c82726 100644 --- a/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane.java +++ b/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane.java @@ -28,11 +28,11 @@ import java.io.File; */ public class ImageBackgroundPane extends BackgroundDetailPane { - private ImagePreviewPane previewPane = null; + protected ImagePreviewPane previewPane = null; private Style imageStyle = null; private ChangeListener changeListener = null; private ImageFileChooser imageFileChooser = null; - private UILabel imageSizeLabel = new UILabel(); + protected UILabel imageSizeLabel = new UILabel(); protected JRadioButton defaultRadioButton = null; protected JRadioButton tiledRadioButton = null; @@ -49,14 +49,20 @@ public class ImageBackgroundPane extends BackgroundDetailPane { JPanel previewOwnerPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Preview")); previewOwnerPane.setLayout(new BorderLayout()); previewContainerPane.add(previewOwnerPane, BorderLayout.CENTER); - - + previewContainerPane.add(initSelectFilePane(), BorderLayout.EAST); previewPane = new ImagePreviewPane(); previewOwnerPane.add(new JScrollPane(previewPane)); previewPane.addChangeListener(imageSizeChangeListener); + + // init image file chooser. + imageFileChooser = new ImageFileChooser(); + imageFileChooser.setMultiSelectionEnabled(false); + } + + public JPanel initSelectFilePane(){ JPanel selectFilePane = FRGUIPaneFactory.createBorderLayout_L_Pane(); - previewContainerPane.add(selectFilePane, BorderLayout.EAST); + selectFilePane.setBorder(BorderFactory.createEmptyBorder(8, 2, 4, 0)); UIButton selectPictureButton = new UIButton( @@ -91,10 +97,7 @@ public class ImageBackgroundPane extends BackgroundDetailPane { layoutBG.add(adjustRadioButton); defaultRadioButton.setSelected(true); - - // init image file chooser. - imageFileChooser = new ImageFileChooser(); - imageFileChooser.setMultiSelectionEnabled(false); + return selectFilePane; } protected JRadioButton[] imageLayoutButtons() { @@ -121,8 +124,7 @@ public class ImageBackgroundPane extends BackgroundDetailPane { CoreGraphHelper.waitForImage(image); previewPane.setImage(image); - setImageStyle(); - previewPane.setImageStyle(imageStyle); + imageStyleRepaint(); previewPane.repaint(); } else { previewPane.setImage(null); @@ -133,6 +135,11 @@ public class ImageBackgroundPane extends BackgroundDetailPane { } }; + public void imageStyleRepaint(){ + setImageStyle(); + previewPane.setImageStyle(imageStyle); + } + private void setImageStyle() { if (tiledRadioButton.isSelected()) { imageStyle = Style.DEFAULT_STYLE.deriveImageLayout(Constants.IMAGE_TILED); diff --git a/designer_base/src/com/fr/design/style/background/impl/ImageButtonBackgroundPane.java b/designer_base/src/com/fr/design/style/background/impl/ImageButtonBackgroundPane.java new file mode 100644 index 0000000000..12fb981414 --- /dev/null +++ b/designer_base/src/com/fr/design/style/background/impl/ImageButtonBackgroundPane.java @@ -0,0 +1,80 @@ +package com.fr.design.style.background.impl; + +import com.fr.base.BaseUtils; +import com.fr.base.Style; +import com.fr.base.background.ImageBackground; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.general.Background; +import com.fr.general.Inter; +import com.fr.stable.Constants; +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +/** + * Created by ibm on 2017/1/5. + */ +public class ImageButtonBackgroundPane extends ImageBackgroundPane { + private UIButton chooseButton; + private UIButton clearButton; + + public ImageButtonBackgroundPane(){ + super(); + Style imageStyle = Style.DEFAULT_STYLE.deriveImageLayout(Constants.IMAGE_CENTER); + previewPane.setImageStyle(imageStyle); + } + + public JPanel initSelectFilePane(){ + + JPanel choosePane = new JPanel(new BorderLayout(0, 10)); + choosePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + JPanel choosePane1 = new JPanel(new BorderLayout(0, 10)); + initButton(); + + choosePane.add(chooseButton, BorderLayout.NORTH); + + choosePane1.add(clearButton,BorderLayout.NORTH); + choosePane.add(choosePane1,BorderLayout.CENTER); + + imageSizeLabel.setHorizontalAlignment(SwingConstants.CENTER); + choosePane1.add(imageSizeLabel,BorderLayout.CENTER); + this.add(choosePane,BorderLayout.EAST); + + return choosePane; + } + + private void initButton() { + chooseButton = new UIButton(Inter.getLocText("Image-Select_Picture")); + chooseButton.addActionListener(selectPictureActionListener); + clearButton = new UIButton(Inter.getLocText("Clear")); + clearButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + previewPane.setImage(null); + previewPane.repaint(); + } + }); + } + + public void imageStyleRepaint(){ + + } + + + public void populate(Background background) { + if(background != null && background instanceof ImageBackground){ + ImageBackground imageBackground = (ImageBackground) background; + if(imageBackground.getImage() != null) { + previewPane.setImage(imageBackground.getImage()); + } + } + + } + + public Background update() { + if(previewPane.getImage() == null) { + return null; + } + return new ImageBackground(previewPane.getImage()); + } +} diff --git a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleImgBackgroundEditor.java b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleImgBackgroundEditor.java index 0350704960..8def747683 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleImgBackgroundEditor.java +++ b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleImgBackgroundEditor.java @@ -1,17 +1,16 @@ package com.fr.design.mainframe.widget.accessibles; import java.awt.Dimension; - import javax.swing.SwingUtilities; - -import com.fr.base.background.ImageBackground; +import com.fr.base.background.ColorBackground; import com.fr.design.mainframe.widget.wrappers.BackgroundWrapper; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.DialogActionAdapter; -import com.fr.design.gui.frpane.ImgChoosePane; +import com.fr.design.style.background.BackgroundButtonPane; +import com.fr.general.Background; public class AccessibleImgBackgroundEditor extends UneditableAccessibleEditor { - private ImgChoosePane choosePane; + private BackgroundButtonPane choosePane; public AccessibleImgBackgroundEditor() { super(new BackgroundWrapper()); @@ -20,7 +19,7 @@ public class AccessibleImgBackgroundEditor extends UneditableAccessibleEditor { @Override protected void showEditorPane() { if (choosePane == null) { - choosePane = new ImgChoosePane(); + choosePane = new BackgroundButtonPane(); choosePane.setPreferredSize(new Dimension(600, 400)); } BasicDialog dlg = choosePane.showWindow(SwingUtilities.getWindowAncestor(this)); @@ -32,7 +31,7 @@ public class AccessibleImgBackgroundEditor extends UneditableAccessibleEditor { fireStateChanged(); } }); - choosePane.populate(getValue() instanceof ImageBackground ? (ImageBackground) getValue() : null); + choosePane.populate(getValue() instanceof Background ? (Background) getValue() : new ColorBackground()); dlg.setVisible(true); } } \ No newline at end of file From 3e1bf1e4bac1eafd54054d69df43a8900ab54fbf Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 6 Jan 2017 13:50:43 +0800 Subject: [PATCH 007/127] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E4=BF=AE=E6=94=B9PMD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/locale/designer.properties | 8 ++++++ .../design/locale/designer_en_US.properties | 8 ++++++ .../design/locale/designer_ja_JP.properties | 8 ++++++ .../design/locale/designer_ko_KR.properties | 8 ++++++ .../design/locale/designer_zh_CN.properties | 8 ++++++ .../design/locale/designer_zh_TW.properties | 8 ++++++ .../style/background/BackgroundFactory.java | 18 ++++++------- .../background/impl/ImageBackgroundPane.java | 26 +++++++++---------- .../impl/ImageBackgroundPane4Browser.java | 5 ++-- .../impl/ImageButtonBackgroundPane.java | 5 ++-- 10 files changed, 75 insertions(+), 27 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 9f7923265c..f97208a310 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -510,3 +510,11 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_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 b21847d0e4..495ebed06d 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,11 @@ FR-Designer_Create_Tree=Build Tree FR-Designer_Set_Callback_Function=Set Callback Function FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= +FR-Designer_Background_Null=No Background +FR-Designer_Background_Color=Color +FR-Designer_Background_Texture=Texture +FR-Designer_Background_Pattern=Pattern +FR-Designer_Background_Gradient_Color=Gradient Color +FR-Designer_Background_Image=Image +FR-Designer_Background_Clear=Clear +FR-Designer_Background_Image_Select=Select Picture 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..c60ce8891d 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,11 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= 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..079af536db 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,11 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= 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..a40f6d3a4c 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,11 @@ 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_Background_Null=\u6CA1\u6709\u80CC\u666F +FR-Designer_Background_Color=\u989C\u8272 +FR-Designer_Background_Texture=\u7EB9\u7406 +FR-Designer_Background_Pattern=\u56FE\u6848 +FR-Designer_Background_Gradient_Color=\u6E10\u53D8\u8272 +FR-Designer_Background_Image=\u56FE\u7247 +FR-Designer_Background_Clear=\u6E05\u9664 +FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 \ 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..8392f1fdb1 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,11 @@ FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= diff --git a/designer_base/src/com/fr/design/style/background/BackgroundFactory.java b/designer_base/src/com/fr/design/style/background/BackgroundFactory.java index db495bed75..d636eb3a30 100644 --- a/designer_base/src/com/fr/design/style/background/BackgroundFactory.java +++ b/designer_base/src/com/fr/design/style/background/BackgroundFactory.java @@ -34,32 +34,32 @@ public class BackgroundFactory { private static void registerUniversal(Map, BackgroundUIWrapper> map) { map.put(null, BackgroundUIWrapper.create() - .setType(NullBackgroundPane.class).setTitle(Inter.getLocText("Background-Null"))); + .setType(NullBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Null"))); map.put(ColorBackground.class, BackgroundUIWrapper.create() - .setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("Color"))); + .setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color"))); map.put(TextureBackground.class, BackgroundUIWrapper.create() - .setType(TextureBackgroundPane.class).setTitle(Inter.getLocText("Background-Texture"))); + .setType(TextureBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Texture"))); map.put(PatternBackground.class, BackgroundUIWrapper.create() - .setType(PatternBackgroundPane.class).setTitle(Inter.getLocText("Background-Pattern"))); + .setType(PatternBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Pattern"))); map.put(GradientBackground.class, BackgroundUIWrapper.create() - .setType(GradientBackgroundPane.class).setTitle(Inter.getLocText("Gradient-Color"))); + .setType(GradientBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Gradient_Color"))); } private static void registerImageBackground(Map, BackgroundUIWrapper> map) { map.put(ImageBackground.class, BackgroundUIWrapper.create() - .setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("Image"))); + .setType(ImageBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); } private static void registerBrowserImageBackground(Map, BackgroundUIWrapper> map) { map.put(ImageBackground.class, BackgroundUIWrapper.create() - .setType(ImageBackgroundPane4Browser.class).setTitle(Inter.getLocText("Image"))); + .setType(ImageBackgroundPane4Browser.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); } private static void registerButtonBackground(Map, BackgroundUIWrapper> map){ map.put(ColorBackground.class, BackgroundUIWrapper.create() - .setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("Color"))); + .setType(ColorBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Color"))); map.put(ImageBackground.class, BackgroundUIWrapper.create() - .setType(ImageButtonBackgroundPane.class).setTitle(Inter.getLocText("Image"))); + .setType(ImageButtonBackgroundPane.class).setTitle(Inter.getLocText("FR-Designer_Background_Image"))); } diff --git a/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane.java b/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane.java index 0e05c82726..ced818426c 100644 --- a/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane.java +++ b/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane.java @@ -34,10 +34,10 @@ public class ImageBackgroundPane extends BackgroundDetailPane { private ImageFileChooser imageFileChooser = null; protected UILabel imageSizeLabel = new UILabel(); - protected JRadioButton defaultRadioButton = null; - protected JRadioButton tiledRadioButton = null; - private JRadioButton extendRadioButton = null; - private JRadioButton adjustRadioButton = null; + protected UIRadioButton defaultRadioButton = null; + protected UIRadioButton tiledRadioButton = null; + private UIRadioButton extendRadioButton = null; + private UIRadioButton adjustRadioButton = null; public ImageBackgroundPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); @@ -46,7 +46,7 @@ public class ImageBackgroundPane extends BackgroundDetailPane { JPanel previewContainerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); this.add(previewContainerPane, BorderLayout.CENTER); - JPanel previewOwnerPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Preview")); + JPanel previewOwnerPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Preview")); previewOwnerPane.setLayout(new BorderLayout()); previewContainerPane.add(previewOwnerPane, BorderLayout.CENTER); previewContainerPane.add(initSelectFilePane(), BorderLayout.EAST); @@ -66,7 +66,7 @@ public class ImageBackgroundPane extends BackgroundDetailPane { selectFilePane.setBorder(BorderFactory.createEmptyBorder(8, 2, 4, 0)); UIButton selectPictureButton = new UIButton( - Inter.getLocText("Image-Select_Picture")); + Inter.getLocText("FR-Designer_Background_Image_Select")); selectFilePane.add(selectPictureButton, BorderLayout.NORTH); selectPictureButton.setMnemonic('S'); selectPictureButton.addActionListener(selectPictureActionListener); @@ -74,10 +74,10 @@ public class ImageBackgroundPane extends BackgroundDetailPane { selectFilePane.add(layoutPane, BorderLayout.CENTER); //布局 - defaultRadioButton = new UIRadioButton(Inter.getLocText("Default")); - tiledRadioButton = new UIRadioButton(Inter.getLocText("Image-Titled")); - extendRadioButton = new UIRadioButton(Inter.getLocText("Image-Extend")); - adjustRadioButton = new UIRadioButton(Inter.getLocText("Image-Adjust")); + defaultRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-StyleAlignment_Layout_Default")); + tiledRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Titled")); + extendRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Extend")); + adjustRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer-StyleAlignment_Layout_Image_Adjust")); defaultRadioButton.addActionListener(layoutActionListener); tiledRadioButton.addActionListener(layoutActionListener); @@ -85,7 +85,7 @@ public class ImageBackgroundPane extends BackgroundDetailPane { adjustRadioButton.addActionListener(layoutActionListener); JPanel jp = new JPanel(new GridLayout(4, 1, 15, 15)); - for (JRadioButton button : imageLayoutButtons()) { + for (UIRadioButton button : imageLayoutButtons()) { jp.add(button); } layoutPane.add(jp); @@ -100,8 +100,8 @@ public class ImageBackgroundPane extends BackgroundDetailPane { return selectFilePane; } - protected JRadioButton[] imageLayoutButtons() { - return new JRadioButton[]{ + protected UIRadioButton[] imageLayoutButtons() { + return new UIRadioButton[]{ defaultRadioButton, tiledRadioButton, extendRadioButton, diff --git a/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane4Browser.java b/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane4Browser.java index 4d15f18ac3..431ad2c0d1 100644 --- a/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane4Browser.java +++ b/designer_base/src/com/fr/design/style/background/impl/ImageBackgroundPane4Browser.java @@ -1,5 +1,6 @@ package com.fr.design.style.background.impl; +import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.stable.ArrayUtils; import javax.swing.*; @@ -15,9 +16,9 @@ public class ImageBackgroundPane4Browser extends ImageBackgroundPane { } @Override - protected JRadioButton[] imageLayoutButtons() { + protected UIRadioButton[] imageLayoutButtons() { - return (JRadioButton[]) ArrayUtils.addAll(super.imageLayoutButtons(), new JRadioButton[] { + return (UIRadioButton[]) ArrayUtils.addAll(super.imageLayoutButtons(), new UIRadioButton[] { defaultRadioButton, tiledRadioButton, }); diff --git a/designer_base/src/com/fr/design/style/background/impl/ImageButtonBackgroundPane.java b/designer_base/src/com/fr/design/style/background/impl/ImageButtonBackgroundPane.java index 12fb981414..b72e67bae7 100644 --- a/designer_base/src/com/fr/design/style/background/impl/ImageButtonBackgroundPane.java +++ b/designer_base/src/com/fr/design/style/background/impl/ImageButtonBackgroundPane.java @@ -1,6 +1,5 @@ package com.fr.design.style.background.impl; -import com.fr.base.BaseUtils; import com.fr.base.Style; import com.fr.base.background.ImageBackground; import com.fr.design.gui.ibutton.UIButton; @@ -45,9 +44,9 @@ public class ImageButtonBackgroundPane extends ImageBackgroundPane { } private void initButton() { - chooseButton = new UIButton(Inter.getLocText("Image-Select_Picture")); + chooseButton = new UIButton(Inter.getLocText("FR-Designer_Background_Image_Select")); chooseButton.addActionListener(selectPictureActionListener); - clearButton = new UIButton(Inter.getLocText("Clear")); + clearButton = new UIButton(Inter.getLocText("FR-Designer_Background_Clear")); clearButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { previewPane.setImage(null); From e4a68daca93273f2e86c2024321252387067074b Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Fri, 6 Jan 2017 17:51:29 +0800 Subject: [PATCH 008/127] =?UTF-8?q?REPORT-576=20tab=20button=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A0=87=E9=A2=98=E5=86=85=E5=AE=B9=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8F=98=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardAddButton.java | 4 +- .../creator/cardlayout/XCardSwitchButton.java | 63 ++++++++++++++++--- 2 files changed, 56 insertions(+), 11 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index 83427316a5..441b56575f 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -31,6 +31,7 @@ public class XCardAddButton extends XButton{ private static final int START_INDEX = 3; private static final int INDEX = 0; + private static final int DEFAULT_BUTTON_WIDTH = 80; private static Icon ADD_ICON = BaseUtils.readIcon("/com/fr/design/form/images/add.png"); @@ -139,8 +140,7 @@ public class XCardAddButton extends XButton{ //新增tab private void addTab(int index){ Dimension dimension = new Dimension(); - XCardSwitchButton button = (XCardSwitchButton) this.tagLayout.getComponent(INDEX); - dimension.width = button.getWidth(); + dimension.width = DEFAULT_BUTTON_WIDTH; String cardLayoutName = cardLayout.toData().getWidgetName(); CardSwitchButton titleButton = new CardSwitchButton(index,cardLayoutName); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index bcd38dbf2a..ca4f7f1f10 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -3,13 +3,11 @@ */ package com.fr.design.designer.creator.cardlayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.Point; +import java.awt.*; import java.awt.event.MouseEvent; import java.awt.geom.Rectangle2D; +import java.util.HashMap; +import java.util.Map; import javax.swing.*; @@ -34,6 +32,7 @@ import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; import com.fr.general.FRFont; import com.fr.general.Inter; +import sun.font.FontDesignMetrics; /** * @@ -62,6 +61,9 @@ public class XCardSwitchButton extends XButton { // tab按钮里的字体因为按钮内部的布局看起来比正常的要小,加个调整量 private static final int FONT_SIZE_ADJUST = 2; + private static final int SIDE_OFFSET = 57; + private static final int HEIGHT_OFFSET = 25; + private XWCardLayout cardLayout; private XWCardTagLayout tagLayout; @@ -155,19 +157,18 @@ public class XCardSwitchButton extends XButton { //将当前tab按钮改为选中状态 changeButtonState(index); - + // 切换到当前tab按钮对应的tabFitLayout XWTabFitLayout tabFitLayout = (XWTabFitLayout) cardLayout.getComponent(index); tabFitLayout.setxCardSwitchButton(this); selectionModel.setSelectedCreator(tabFitLayout); - + if (editingMouseListener.stopEditing()) { ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this); editingMouseListener.startEditing(this, adapter.getDesignerEditor(), adapter); } - } //删除card,同时修改其他switchbutton和tabfit的index @@ -337,5 +338,49 @@ public class XCardSwitchButton extends XButton { public XLayoutContainer getTopLayout() { return this.getBackupParent().getTopLayout(); } - + + public void setTabsAndAdjust() { + if (this.tagLayout == null) { + return; + } + int tabLength = this.tagLayout.getComponentCount(); + Map cardWidth = new HashMap<>(); + Map cardHeight = new HashMap<>(); + for (int i = 0; i < tabLength; i++) { + XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); + CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); + String tempText = tempCard.getText(); + Font f = ((CardSwitchButton)this.toData()).getFont(); + FontMetrics fm = FontDesignMetrics.getMetrics(f); + cardWidth.put(i,fm.stringWidth(tempText)); + cardHeight.put(i,fm.getHeight()); + } + adjustTabs(tabLength, cardWidth, cardHeight); + } + + public void adjustTabs(int tabLength, Map width, Map height) { + int tempX = 0; + for (int i = 0; i < tabLength; i++) { + Rectangle rectangle = this.tagLayout.getComponent(i).getBounds(); + Integer cardWidth = width.get(i) + SIDE_OFFSET; + Integer cardHeight = height.get(i) + HEIGHT_OFFSET; + rectangle.setSize(cardWidth, cardHeight); + rectangle.setBounds(tempX, 0, cardWidth, cardHeight); + tempX += cardWidth; + this.tagLayout.getComponent(i).setBounds(rectangle); + Dimension dimension = new Dimension(); + dimension.setSize(cardWidth, cardHeight); + this.getContentLabel().setSize(dimension); + this.setSize(dimension); + XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); + CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); + tempCard.setDefaultWidth(cardWidth); + } + } + + @Override + public void doLayout() { + super.doLayout(); + setTabsAndAdjust(); + } } \ No newline at end of file From 8aaee42deea8d98be562914da036a9e1ea879b67 Mon Sep 17 00:00:00 2001 From: rinoux Date: Tue, 10 Jan 2017 14:39:11 +0800 Subject: [PATCH 009/127] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fun/impl/AbstractDesignerStartOpenFileProcessor.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractDesignerStartOpenFileProcessor.java b/designer_base/src/com/fr/design/fun/impl/AbstractDesignerStartOpenFileProcessor.java index 5053b0f426..4d09ecd21d 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractDesignerStartOpenFileProcessor.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractDesignerStartOpenFileProcessor.java @@ -3,13 +3,11 @@ package com.fr.design.fun.impl; import com.fr.design.fun.DesignerStartOpenFileProcessor; import com.fr.stable.fun.mark.API; -import static com.fr.stable.fun.mark.Layer.DEFAULT_LAYER_INDEX; - /** * Created by rinoux on 2016/12/16. */ @API(level = DesignerStartOpenFileProcessor.CURRENT_LEVEL) -public class AbstractDesignerStartOpenFileProcessor { +public abstract class AbstractDesignerStartOpenFileProcessor implements DesignerStartOpenFileProcessor { public int currentAPILevel() { return DesignerStartOpenFileProcessor.CURRENT_LEVEL; } From 923defe65c70e10c0c17992cfa867b8f33090970 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 10 Jan 2017 17:39:13 +0800 Subject: [PATCH 010/127] delete --- .../com/fr/design/images/buttonicon/delete.png | Bin 0 -> 432 bytes .../creator/cardlayout/XCardSwitchButton.java | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 designer_base/src/com/fr/design/images/buttonicon/delete.png diff --git a/designer_base/src/com/fr/design/images/buttonicon/delete.png b/designer_base/src/com/fr/design/images/buttonicon/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..6755647485403ef8343766c2b78ebb569f6d7ff7 GIT binary patch literal 432 zcmV;h0Z;ykP)Px$YDq*vR5%f(Q?X9NKn(RI5GFE}N~oc6tPTIbHy~A=n5s$@-@r$tE8-_u zvqWtfN~bVUlpKC0K3ywdpq3(EY`=HUcRr#6&Ftgfvh1{~>pPBT)|eD|V{O4MkHhfc zEYIH&Q`;dZhQlk?`j(E{IdacP6#Hl5F(HSP#n@DqbwOpAQaNy{YHN)jLm+3n5( zK1ovw;@IJ^Mhu1xPzwzHg#bOPY!sePCe)iwg#=)%5%Wlr_MGSlEX;Ys!esfmUQ@l< zP?RLpo6R7YqQQW+Wl6|+mht*t6fpEc6HQgoYCNXxa!FCY{|#O&B!--t-jEPzaL2cb zBxZg;S0QNcS!%Usk Date: Tue, 10 Jan 2017 17:40:37 +0800 Subject: [PATCH 011/127] delete --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 92f3933588..ca4f7f1f10 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -374,7 +374,7 @@ public class XCardSwitchButton extends XButton { this.setSize(dimension); XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); - //tempCard.setDefaultWidth(cardWidth); + tempCard.setDefaultWidth(cardWidth); } } From aad680b44458e67fdbad394aa81afec71e8f865b Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Tue, 10 Jan 2017 20:02:20 +0800 Subject: [PATCH 012/127] =?UTF-8?q?REPORT-576=20tab=E4=B8=ADbutton?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E8=87=AA=E5=8A=A8=E6=89=A9=E5=B1=95bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/XLayoutContainer.java | 23 ++++++++++++++-- .../creator/cardlayout/XCardSwitchButton.java | 26 ++++++++++++------- .../creator/cardlayout/XWCardLayout.java | 3 +-- .../creator/cardlayout/XWCardTagLayout.java | 12 --------- .../creator/cardlayout/XWTabFitLayout.java | 24 ++++++++++++++--- 5 files changed, 60 insertions(+), 28 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java index 47f4270a5e..254e9a9184 100644 --- a/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java +++ b/designer_form/src/com/fr/design/designer/creator/XLayoutContainer.java @@ -10,8 +10,6 @@ import com.fr.design.form.util.XCreatorConstants; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.widget.editors.PaddingMarginEditor; import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor; -import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer; -import com.fr.design.mainframe.widget.renderer.PaddingMarginCellRenderer; import com.fr.design.parameter.ParameterBridge; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WLayout; @@ -81,6 +79,27 @@ public abstract class XLayoutContainer extends XBorderStyleWidgetCreator impleme }; } + /** + * 控件名属性 + * @return + * @throws IntrospectionException + */ + public CRPropertyDescriptor createWidgetNameDescriptor() throws IntrospectionException { + return new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter + .getLocText("FR-Designer_Form-Widget_Name")); + } + + /** + * 边距属性 + * @return + * @throws IntrospectionException + */ + public CRPropertyDescriptor createMarginDescriptor() throws IntrospectionException { + return new CRPropertyDescriptor("margin", this.data.getClass()).setEditorClass(PaddingMarginEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_Layout-Padding")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"); + } + /** * 返回对应的wlayout * @return wlayout控件 diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index ca4f7f1f10..6baa740947 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -6,8 +6,7 @@ package com.fr.design.designer.creator.cardlayout; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.geom.Rectangle2D; -import java.util.HashMap; -import java.util.Map; +import java.util.*; import javax.swing.*; @@ -58,6 +57,9 @@ public class XCardSwitchButton extends XButton { private static final int RIGHT_OFFSET = 15; private static final int TOP_OFFSET = 25; + //这边先不计算button的高度,涉及到layout那边的整体高度,先用之前的固定高度 + private static final int DEFAULT_BUTTON_HEIGHT = 36; + // tab按钮里的字体因为按钮内部的布局看起来比正常的要小,加个调整量 private static final int FONT_SIZE_ADJUST = 2; @@ -70,7 +72,6 @@ public class XCardSwitchButton extends XButton { private Background selectBackground; private boolean isCustomStyle; - private Icon closeIcon = MOUSE_COLSE; public XWCardTagLayout getTagLayout() { @@ -169,6 +170,7 @@ public class XCardSwitchButton extends XButton { editingMouseListener.startEditing(this, adapter.getDesignerEditor(), adapter); } + setTabsAndAdjust(); } //删除card,同时修改其他switchbutton和tabfit的index @@ -258,6 +260,7 @@ public class XCardSwitchButton extends XButton { public void paintComponent(Graphics g) { super.paintComponent(g); + setTabsAndAdjust(); Graphics2D g2d = (Graphics2D) g; drawBackgorund(); drawTitle(); @@ -359,22 +362,27 @@ public class XCardSwitchButton extends XButton { } public void adjustTabs(int tabLength, Map width, Map height) { + if (width == null) { + return; + } int tempX = 0; for (int i = 0; i < tabLength; i++) { - Rectangle rectangle = this.tagLayout.getComponent(i).getBounds(); + Rectangle rectangle = this.tagLayout.getComponent(i).getBounds(); Integer cardWidth = width.get(i) + SIDE_OFFSET; - Integer cardHeight = height.get(i) + HEIGHT_OFFSET; + //先用这边的固定高度 + Integer cardHeight = DEFAULT_BUTTON_HEIGHT; rectangle.setSize(cardWidth, cardHeight); rectangle.setBounds(tempX, 0, cardWidth, cardHeight); tempX += cardWidth; this.tagLayout.getComponent(i).setBounds(rectangle); Dimension dimension = new Dimension(); dimension.setSize(cardWidth, cardHeight); - this.getContentLabel().setSize(dimension); - this.setSize(dimension); XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); - CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); - tempCard.setDefaultWidth(cardWidth); + UILabel label = temp.getContentLabel(); + label.setSize(dimension); + temp.setContentLabel(label); + temp.setSize(dimension); + temp.setPreferredSize(new Dimension(cardWidth, cardHeight)); } } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 4f2492ee9e..d008ccd521 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -198,8 +198,7 @@ public class XWCardLayout extends XLayoutContainer { firstBtn.setText(Inter.getLocText("FR-Designer_Title") + 0); firstBtn.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); xTag.setCurrentCard(firstBtn); - XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1),this,xTag); - firstBtn.setCustomStyle(true); + XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1), this, xTag); xFirstBtn.setBackupParent(xTag); return xFirstBtn; diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java index e40a7ca871..82170bacc2 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java @@ -163,18 +163,6 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout { * void */ public void adjustComponentWidth(){ - int btnNum = this.getComponentCount(); - int tagLayoutWidth = this.getWidth(); - int allBtnWidth = btnNum * CardSwitchButton.DEF_WIDTH + btnNum; - int size = CardSwitchButton.DEF_WIDTH; - if(tagLayoutWidth - allBtnWidth < CardSwitchButton.DEF_WIDTH){ - size = (tagLayoutWidth - CardSwitchButton.DEF_WIDTH - btnNum)/btnNum; - } - WCardTagLayout layout = (WCardTagLayout)this.toData(); - for(int i=0;i Date: Wed, 11 Jan 2017 10:50:43 +0800 Subject: [PATCH 013/127] =?UTF-8?q?REPORT-576=20font=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 6baa740947..31c45681da 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -31,7 +31,6 @@ import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; import com.fr.general.FRFont; import com.fr.general.Inter; -import sun.font.FontDesignMetrics; /** * @@ -354,7 +353,7 @@ public class XCardSwitchButton extends XButton { CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); String tempText = tempCard.getText(); Font f = ((CardSwitchButton)this.toData()).getFont(); - FontMetrics fm = FontDesignMetrics.getMetrics(f); + FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(f); cardWidth.put(i,fm.stringWidth(tempText)); cardHeight.put(i,fm.getHeight()); } From 345922137f87049468c3c26096633b4592f44c2e Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Wed, 11 Jan 2017 14:37:42 +0800 Subject: [PATCH 014/127] =?UTF-8?q?=E7=94=98=E7=89=B9=E5=9B=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/data/NormalChartDataPane.java | 6 +++++- .../fr/design/mainframe/chart/gui/data/TableDataPane.java | 2 +- .../designer/creator/cardlayout/XCardSwitchButton.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java index cae7afc39a..7ff9593b38 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -70,7 +70,7 @@ public class NormalChartDataPane extends DataContentsPane { @Override protected List> initPaneList() { - tableDataPane = new TableDataPane(parent); + tableDataPane = getTableDataPane(parent); reportDataPane = new ReportDataPane(parent); List> paneList = new ArrayList>(); paneList.add(tableDataPane); @@ -96,6 +96,10 @@ public class NormalChartDataPane extends DataContentsPane { } + protected TableDataPane getTableDataPane(ChartDataPane chartDataPane) { + return new TableDataPane(chartDataPane); + } + /** * 更新界面 数据内容 */ diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java index 3b6c71ef1e..a6bea6b0ca 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java @@ -69,7 +69,7 @@ public class TableDataPane extends FurtherBasicBeanPane{ } } - private AbstractTableDataContentPane getContentPane(Plot plot) { + protected AbstractTableDataContentPane getContentPane(Plot plot) { return ChartTypeInterfaceManager.getInstance().getTableDataSourcePane(plot, parent); } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index ca4f7f1f10..92f3933588 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -374,7 +374,7 @@ public class XCardSwitchButton extends XButton { this.setSize(dimension); XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); - tempCard.setDefaultWidth(cardWidth); + //tempCard.setDefaultWidth(cardWidth); } } From 37d3840a812f3465cc7246481c14c284c75a91bf Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 11 Jan 2017 17:10:00 +0800 Subject: [PATCH 015/127] =?UTF-8?q?REPORT-576=20tabpane=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E8=BD=AE=E6=92=AD=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardAddButton.java | 4 +- .../creator/cardlayout/XWCardLayout.java | 90 ++++++++++++++----- 2 files changed, 71 insertions(+), 23 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index 441b56575f..fa4c1d4a9b 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -147,11 +147,11 @@ public class XCardAddButton extends XButton{ //设置标题 titleButton.setText(getTabTitleName()); titleButton.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); - XCardSwitchButton showButton = new XCardSwitchButton(titleButton,dimension,cardLayout,tagLayout); + XCardSwitchButton showButton = new XCardSwitchButton(titleButton, dimension, cardLayout, tagLayout); + titleButton.setCustomStyle(true); titleButton.setShowButton(true); showButton.setBackupParent(tagLayout); - this.tagLayout.setCurrentCard(titleButton); this.tagLayout.setTabFitIndex(index); this.tagLayout.add(showButton); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index d008ccd521..4dbc1a5676 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -6,13 +6,16 @@ package com.fr.design.designer.creator.cardlayout; import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRCardLayoutAdapter; +import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.creator.*; import com.fr.design.form.layout.FRCardLayout; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.mainframe.FormDesigner; +import com.fr.design.mainframe.WidgetPropertyPane; +import com.fr.design.mainframe.widget.editors.BooleanEditor; import com.fr.design.mainframe.widget.editors.CardTagWLayoutBorderStyleEditor; -import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer; +import com.fr.design.mainframe.widget.editors.DoubleEditor; import com.fr.form.ui.*; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WCardLayout; @@ -22,6 +25,7 @@ import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WCardTitleLayout; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; import com.fr.stable.core.PropertyChangeAdapter; @@ -39,6 +43,8 @@ public class XWCardLayout extends XLayoutContainer { private CardLayout cardLayout; private boolean initFlag = true; private static final int NORTH = 0; + private FormDesigner designer; + //默认蓝色标题背景 private static final Color TITLE_COLOR = new Color(51, 132, 240); @@ -197,6 +203,7 @@ public class XWCardLayout extends XLayoutContainer { CardSwitchButton firstBtn = new CardSwitchButton(widgetName); firstBtn.setText(Inter.getLocText("FR-Designer_Title") + 0); firstBtn.setInitialBackground(ColorBackground.getInstance(Color.WHITE)); + firstBtn.setCustomStyle(true); xTag.setCurrentCard(firstBtn); XCardSwitchButton xFirstBtn = new XCardSwitchButton(firstBtn, new Dimension(CardSwitchButton.DEF_WIDTH, -1), this, xTag); xFirstBtn.setBackupParent(xTag); @@ -271,27 +278,68 @@ public class XWCardLayout extends XLayoutContainer { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - return new CRPropertyDescriptor[] { - new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter - .getLocText("FR-Designer_Form-Widget_Name")).setPropertyChangeListener(new PropertyChangeAdapter(){ - - @Override - public void propertyChange(){ - WCardLayout cardLayout = toData(); - changeRalateSwitchCardname(cardLayout.getWidgetName()); - } - }), - new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( - CardTagWLayoutBorderStyleEditor.class).setI18NName( - Inter.getLocText("FR-Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") - .setPropertyChangeListener(new PropertyChangeAdapter() { + CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel(); + return ArrayUtils.addAll(getDefaultDescriptor(), crp); + } + + public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException { + return new CRPropertyDescriptor[] { + new CRPropertyDescriptor("carousel", this.data.getClass()) + .setEditorClass(BooleanEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_setCarousel")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Tab_carousel") + .setPropertyChangeListener(new PropertyChangeAdapter() { + @Override + public void propertyChange() { + designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); + } + }), + new CRPropertyDescriptor("carouselInterval", this.data.getClass()) + .setEditorClass(DoubleEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_carouselInterval")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Tab_carousel") + }; + } + + public CRPropertyDescriptor[] getisnotCarousel() throws IntrospectionException { + return new CRPropertyDescriptor[] { + new CRPropertyDescriptor("carousel", this.data.getClass()) + .setEditorClass(BooleanEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_setCarousel")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Tab_carousel") + .setPropertyChangeListener(new PropertyChangeAdapter() { + @Override + public void propertyChange() { + designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); + } + }) + }; + } + + public CRPropertyDescriptor[] getDefaultDescriptor() throws IntrospectionException { + return new CRPropertyDescriptor[] { + new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter + .getLocText("FR-Designer_Form-Widget_Name")).setPropertyChangeListener(new PropertyChangeAdapter(){ + + @Override + public void propertyChange(){ + WCardLayout cardLayout = toData(); + changeRalateSwitchCardname(cardLayout.getWidgetName()); + } + }), + new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( + CardTagWLayoutBorderStyleEditor.class).setI18NName( + Inter.getLocText("FR-Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .setPropertyChangeListener(new PropertyChangeAdapter() { - @Override - public void propertyChange() { - initStyle(); - } - }), - }; + @Override + public void propertyChange() { + initStyle(); + } + }) + }; } //初始化样式 From 16a0924d53a44090a0af9b0b535157e3549225ae Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Wed, 11 Jan 2017 17:29:59 +0800 Subject: [PATCH 016/127] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/designer/creator/cardlayout/XCardSwitchButton.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 31c45681da..28c5e33e3f 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -11,6 +11,7 @@ import java.util.*; import javax.swing.*; import com.fr.base.BaseUtils; +import com.fr.base.GraphHelper; import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; @@ -353,7 +354,7 @@ public class XCardSwitchButton extends XButton { CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); String tempText = tempCard.getText(); Font f = ((CardSwitchButton)this.toData()).getFont(); - FontMetrics fm = Toolkit.getDefaultToolkit().getFontMetrics(f); + FontMetrics fm = GraphHelper.getFontMetrics(f); cardWidth.put(i,fm.stringWidth(tempText)); cardHeight.put(i,fm.getHeight()); } From d69603d181d231eae93297fe7b9938620abe8776 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Thu, 12 Jan 2017 11:44:56 +0800 Subject: [PATCH 017/127] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=95=8C=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/chart/gui/data/NormalChartDataPane.java | 6 +++++- .../fr/design/mainframe/chart/gui/data/ReportDataPane.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java index 7ff9593b38..6a33c6df96 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -71,7 +71,7 @@ public class NormalChartDataPane extends DataContentsPane { @Override protected List> initPaneList() { tableDataPane = getTableDataPane(parent); - reportDataPane = new ReportDataPane(parent); + reportDataPane = getReportDataPane(parent); List> paneList = new ArrayList>(); paneList.add(tableDataPane); paneList.add(reportDataPane); @@ -96,6 +96,10 @@ public class NormalChartDataPane extends DataContentsPane { } + protected ReportDataPane getReportDataPane(ChartDataPane parent) { + return new ReportDataPane(parent); + } + protected TableDataPane getTableDataPane(ChartDataPane chartDataPane) { return new TableDataPane(chartDataPane); } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java index a3ede1b9f3..c5d80ccc17 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ReportDataPane.java @@ -21,7 +21,7 @@ public class ReportDataPane extends FurtherBasicBeanPane{ this.parent = parent; } - private AbstractReportDataContentPane getContentPane(Chart chart) { + protected AbstractReportDataContentPane getContentPane(Chart chart) { if(chart == null) { return null; } From adbebac9de82f4894e9d26531838a1894ebc2fda Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Thu, 12 Jan 2017 14:26:37 +0800 Subject: [PATCH 018/127] =?UTF-8?q?=E6=97=A0jiar=20=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E6=96=87=E4=BB=B6=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 | 3 +++ .../src/com/fr/design/locale/designer_en_US.properties | 3 +++ .../src/com/fr/design/locale/designer_ja_JP.properties | 3 +++ .../src/com/fr/design/locale/designer_ko_KR.properties | 3 +++ .../src/com/fr/design/locale/designer_zh_CN.properties | 5 ++++- .../src/com/fr/design/locale/designer_zh_TW.properties | 3 +++ .../fr/design/designer/creator/cardlayout/XWCardLayout.java | 4 ++-- 7 files changed, 21 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index f97208a310..41f3c8cdd8 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -518,3 +518,6 @@ FR-Designer_Background_Gradient_Color= FR-Designer_Background_Image= FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ 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 495ebed06d..334e01ca8c 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,3 +518,6 @@ FR-Designer_Background_Gradient_Color=Gradient Color FR-Designer_Background_Image=Image FR-Designer_Background_Clear=Clear FR-Designer_Background_Image_Select=Select Picture +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ 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 c60ce8891d..6312538cf7 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,3 +497,6 @@ FR-Designer_Background_Gradient_Color= FR-Designer_Background_Image= FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ 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 079af536db..87a1b893c8 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,3 +492,6 @@ FR-Designer_Background_Gradient_Color= FR-Designer_Background_Image= FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ 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 a40f6d3a4c..10c53380d0 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 @@ -521,4 +521,7 @@ FR-Designer_Background_Pattern=\u56FE\u6848 FR-Designer_Background_Gradient_Color=\u6E10\u53D8\u8272 FR-Designer_Background_Image=\u56FE\u7247 FR-Designer_Background_Clear=\u6E05\u9664 -FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 \ No newline at end of file +FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 +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 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 8392f1fdb1..96cb4260a9 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,3 +510,6 @@ FR-Designer_Background_Gradient_Color= FR-Designer_Background_Image= FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 4dbc1a5676..d1e6e40520 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -287,7 +287,7 @@ public class XWCardLayout extends XLayoutContainer { new CRPropertyDescriptor("carousel", this.data.getClass()) .setEditorClass(BooleanEditor.class) .setI18NName(Inter.getLocText("FR-Designer_setCarousel")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Tab_carousel") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override public void propertyChange() { @@ -307,7 +307,7 @@ public class XWCardLayout extends XLayoutContainer { new CRPropertyDescriptor("carousel", this.data.getClass()) .setEditorClass(BooleanEditor.class) .setI18NName(Inter.getLocText("FR-Designer_setCarousel")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Tab_carousel") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") .setPropertyChangeListener(new PropertyChangeAdapter() { @Override public void propertyChange() { From 8a94bcb0fddf2d16646362c4a20a2269d87b08e1 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Thu, 12 Jan 2017 14:36:11 +0800 Subject: [PATCH 019/127] 1 1 --- .../com/fr/design/designer/creator/cardlayout/XWCardLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index d1e6e40520..ac929a1635 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -298,7 +298,7 @@ public class XWCardLayout extends XLayoutContainer { new CRPropertyDescriptor("carouselInterval", this.data.getClass()) .setEditorClass(DoubleEditor.class) .setI18NName(Inter.getLocText("FR-Designer_carouselInterval")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Tab_carousel") + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") }; } From baa6b1728c13eb87cb405c6206bcd93b2520ef5c Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 13 Jan 2017 10:22:34 +0800 Subject: [PATCH 020/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=948=E3=80=8111?= =?UTF-8?q?=E3=80=8113=E3=80=8114=E3=80=8115=E3=80=8116=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/report/ReportColumnsPane.java | 14 +++++++++----- .../com/fr/design/webattr/PageToolBarPane.java | 4 ++-- .../fr/design/webattr/PageWebSettingPane.java | 4 ++-- .../com/fr/design/webattr/WriteToolBarPane.java | 4 ++-- .../fr/design/webattr/WriteWebSettingPane.java | 5 ++--- .../ui/CustomWritableRepeatEditorPane.java | 2 +- .../design/widget/ui/FieldEditorDefinePane.java | 5 +++-- .../com/fr/design/actions/help/AboutPane.java | 15 +++++++++++---- .../com/fr/design/editor/editor/DateEditor.java | 6 +++++- .../src/com/fr/design/gui/date/UIDatePicker.java | 3 +++ .../fr/design/images/reportcolumns/col_en.png | Bin 0 -> 1348 bytes .../fr/design/images/reportcolumns/row_en.png | Bin 0 -> 3708 bytes .../src/com/fr/design/locale/designer.properties | 4 ++++ .../fr/design/locale/designer_en_US.properties | 6 +++++- .../fr/design/locale/designer_ja_JP.properties | 4 ++++ .../fr/design/locale/designer_ko_KR.properties | 12 ++++++++---- .../fr/design/locale/designer_zh_CN.properties | 4 ++++ .../fr/design/locale/designer_zh_TW.properties | 4 ++++ .../fr/design/write/submit/CustomJobPane.java | 2 +- 19 files changed, 70 insertions(+), 28 deletions(-) create mode 100644 designer_base/src/com/fr/design/images/reportcolumns/col_en.png create mode 100644 designer_base/src/com/fr/design/images/reportcolumns/row_en.png diff --git a/designer/src/com/fr/design/report/ReportColumnsPane.java b/designer/src/com/fr/design/report/ReportColumnsPane.java index c0414afee6..1cf8f27bcd 100644 --- a/designer/src/com/fr/design/report/ReportColumnsPane.java +++ b/designer/src/com/fr/design/report/ReportColumnsPane.java @@ -19,6 +19,8 @@ import javax.swing.SpinnerNumberModel; import javax.swing.SwingConstants; import com.fr.base.BaseUtils; +import com.fr.base.FRContext; +import com.fr.base.GraphHelper2; import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UITitledBorder; import com.fr.design.dialog.BasicPane; @@ -109,9 +111,11 @@ public class ReportColumnsPane extends BasicPane{ onOffButtonGroup.addActionListener(onOffListener); UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer_ReportColumns-Columns")); - uiLabel.setFont(FRFont.getInstance(FONT_NAME, Font.PLAIN, FONT_SIZE)); + FRFont uiLableFont = FRFont.getInstance(FONT_NAME, Font.PLAIN, FONT_SIZE); + uiLabel.setFont(uiLableFont); uiLabel.setHorizontalAlignment(SwingConstants.CENTER); - uiLabel.setPreferredSize(new Dimension(100,20)); + int uiLabelWidth = GraphHelper2.locTextStringWidth("FR-Designer_ReportColumns-Columns", uiLableFont); + uiLabel.setPreferredSize(new Dimension(uiLabelWidth, 20)); north.add(uiLabel,BorderLayout.WEST); JPanel buttonGroupPane = new JPanel(new FlowLayout(FlowLayout.CENTER, 23,11)); buttonGroupPane.add(onOffButtonGroup); @@ -200,7 +204,7 @@ public class ReportColumnsPane extends BasicPane{ JPanel sampleLablePane = new JPanel(new GridLayout(1,2)); sampleLablePane.setPreferredSize(new Dimension(524, 130)); JPanel rPane = new JPanel(); - UILabel rLabel = new UILabel(BaseUtils.readIcon("/com/fr/design/images/reportcolumns/row.png")); + UILabel rLabel = new UILabel(BaseUtils.readIcon("/com/fr/design/images/reportcolumns/" + Inter.getLocText("FR-Designer_Row_Icon_File_Name"))); rLabel.setBorder(BorderFactory.createEmptyBorder(5,45,0,49)); rPane.add(rLabel); rowButton = new UIRadioButton(Inter.getLocText("ReportColumns-Columns_horizontally")); @@ -260,7 +264,7 @@ public class ReportColumnsPane extends BasicPane{ GUICoreUtils.setColumnForSpinner(maxNumberSpinner, 6); maxRadioButton.addActionListener(maxBtnListener); maxUILabel = new UILabel(COLUMN_ROW_TEXTS[rowOrColumn] ); - JPanel maxRowRadioPane = GUICoreUtils.createFlowPane(new JComponent[]{maxRadioButton, maxNumberSpinner, maxUILabel, new UILabel(Inter.getLocText("FR-Designer_ReportColumns-Columns"))}, FlowLayout.CENTER); + JPanel maxRowRadioPane = GUICoreUtils.createFlowPane(new JComponent[]{maxRadioButton, maxNumberSpinner, maxUILabel, new UILabel(Inter.getLocText("FR-Designer_ReportColumns_Columns_Optional"))}, FlowLayout.CENTER); RowMaxOrSetPane.add(maxRowRadioPane); //marks:分成多少行 toXRadioButton = new UIRadioButton(Inter.getLocText("ReportColumns-Columns_to")); @@ -308,7 +312,7 @@ public class ReportColumnsPane extends BasicPane{ rowPane.setBorder(explainBorder); rowPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5,13)); rowPane.setPreferredSize(new Dimension(500,80)); - rowPane.add(new UILabel(Inter.getLocText(new String[]{"ReportColumns-Columns","Data"}) + ":")); + rowPane.add(new UILabel(Inter.getLocText(new String[]{"FR-Designer_ReportColumns_Columns_Optional","Data"}) + ":")); repeatColDataTextField = new UITextField(); repeatColDataTextField.setPreferredSize(new Dimension(107,24)); rowPane.add(repeatColDataTextField); diff --git a/designer/src/com/fr/design/webattr/PageToolBarPane.java b/designer/src/com/fr/design/webattr/PageToolBarPane.java index b9e8c2bf72..5f3df534c9 100644 --- a/designer/src/com/fr/design/webattr/PageToolBarPane.java +++ b/designer/src/com/fr/design/webattr/PageToolBarPane.java @@ -27,8 +27,8 @@ import java.util.List; public class PageToolBarPane extends AbstractEditToolBarPane { - private UIRadioButton centerRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Center", "Display"})); - private UIRadioButton leftRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Left", "Display"})); + private UIRadioButton centerRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Center_Display")); + private UIRadioButton leftRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Left_Display")); private UICheckBox isUseToolBarCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Use_ToolBar")); private UICheckBox isShowAsImageBox; diff --git a/designer/src/com/fr/design/webattr/PageWebSettingPane.java b/designer/src/com/fr/design/webattr/PageWebSettingPane.java index 504687e891..203ace1af7 100644 --- a/designer/src/com/fr/design/webattr/PageWebSettingPane.java +++ b/designer/src/com/fr/design/webattr/PageWebSettingPane.java @@ -36,8 +36,8 @@ public class PageWebSettingPane extends WebSettingPane { @Override protected JPanel createOtherSetPane() { - centerRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Center", "Display"})); - leftRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Left", "Display"})); + centerRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Center_Display")); + leftRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Left_Display")); ButtonGroup buttonGroup = new ButtonGroup(); leftRadioButton.setSelected(true); buttonGroup.add(centerRadioButton); diff --git a/designer/src/com/fr/design/webattr/WriteToolBarPane.java b/designer/src/com/fr/design/webattr/WriteToolBarPane.java index abd20f7ff8..70cf35af90 100644 --- a/designer/src/com/fr/design/webattr/WriteToolBarPane.java +++ b/designer/src/com/fr/design/webattr/WriteToolBarPane.java @@ -39,8 +39,8 @@ public class WriteToolBarPane extends AbstractEditToolBarPane { private UIRadioButton topRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Top")); private UIRadioButton bottomRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Bottom")); private UILabel sheetShowLocationLabel = new UILabel("sheet" + Inter.getLocText(new String[]{"Label", "Page_Number", "Display position"}) + ":"); - private UIRadioButton centerRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Center", "Display"})); - private UIRadioButton leftRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Left", "Display"})); + private UIRadioButton centerRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Center_Display")); + private UIRadioButton leftRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Left_Display")); private UILabel rptShowLocationLabel = new UILabel(Inter.getLocText("FR-Designer_Report_Show_Location") + ":", UILabel.LEFT); private UICheckBox isUseToolBarCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Use_ToolBar")); private UIButton editToolBarButton = new UIButton(Inter.getLocText("FR-Designer_Edit")); diff --git a/designer/src/com/fr/design/webattr/WriteWebSettingPane.java b/designer/src/com/fr/design/webattr/WriteWebSettingPane.java index 2606572453..92b26b0d59 100644 --- a/designer/src/com/fr/design/webattr/WriteWebSettingPane.java +++ b/designer/src/com/fr/design/webattr/WriteWebSettingPane.java @@ -65,15 +65,14 @@ public class WriteWebSettingPane extends WebSettingPane { //Sean: 报表显示位置since 706 rptShowLocationLabel = new UILabel(Inter.getLocText("FR-Designer_Report_Show_Location") + ":", UILabel.LEFT); - centerRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Center", "Display"})); - leftRadioButton = new UIRadioButton(Inter.getLocText(new String[]{"Left", "Display"})); + centerRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Center_Display")); + leftRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_Left_Display")); ButtonGroup rptShowButtonGroup = new ButtonGroup(); leftRadioButton.setSelected(true); rptShowButtonGroup.add(centerRadioButton); rptShowButtonGroup.add(leftRadioButton); JPanel showLocPane = GUICoreUtils.createFlowPane(new Component[]{rptShowLocationLabel, centerRadioButton, leftRadioButton}, FlowLayout.LEFT); -// unloadCheck = new UICheckBox(Inter.getLocText(new String[]{"Event-unloadcheck", "Tooltips"})); unloadCheck = new UICheckBox(Inter.getLocText("FR-Designer_Unload_Check")); unloadCheck.setSelected(true); diff --git a/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java index 6a165f8741..69bba23c62 100644 --- a/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java @@ -1 +1 @@ -package com.fr.design.widget.ui; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize(new Dimension(100, 30)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } \ No newline at end of file +package com.fr.design.widget.ui; import com.fr.base.GraphHelper2; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(GraphHelper2.locTextStringWidth("Form-Allow_CustomData") + 30, 30)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java index e5498adebe..fe69628131 100644 --- a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java @@ -6,6 +6,7 @@ import java.awt.event.ItemListener; import javax.swing.*; +import com.fr.base.GraphHelper2; import com.fr.design.gui.ilable.UILabel; import javax.swing.event.DocumentEvent; @@ -49,7 +50,7 @@ public abstract class FieldEditorDefinePane extends Abstr //JPanel firstPanel = FRGUIPaneFactory.createBorderLayout_M_Pane(); allowBlankCheckBox = new UICheckBox(Inter.getLocText("Allow_Blank")); - allowBlankCheckBox.setPreferredSize(new Dimension(75, 30)); + allowBlankCheckBox.setPreferredSize(new Dimension(GraphHelper2.locTextStringWidth("Allow_Blank") + 30, 30)); allowBlankCheckBox.addItemListener(new ItemListener() { @Override @@ -128,7 +129,7 @@ public abstract class FieldEditorDefinePane extends Abstr JPanel firstPane = GUICoreUtils.createFlowPane(new JComponent[]{allowBlankCheckBox}, FlowLayout.LEFT, 5); validatePane.add(firstPane); JPanel secondPane = GUICoreUtils.createFlowPane(new JComponent[]{new UILabel(Inter.getLocText(new String[]{"Error", "Tooltips"}) + ":"), errorMsgTextField}, FlowLayout.LEFT, 24); - secondPane.setPreferredSize(new Dimension(310, 23)); + secondPane.setPreferredSize(new Dimension(400, 23)); validatePane.add(secondPane); } diff --git a/designer_base/src/com/fr/design/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index 680aa9b95b..d15bc01862 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -3,6 +3,7 @@ */ package com.fr.design.actions.help; +import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.BoldFontTextLabel; @@ -26,6 +27,7 @@ import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.net.URI; +import java.util.Locale; public class AboutPane extends JPanel { private static final String FINEREPORT = "FineReport"; @@ -66,12 +68,17 @@ public class AboutPane extends JPanel { Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK") })); - if(ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)){ - boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("Service_Phone") + ProductConstants.COMPARE_TELEPHONE); + // 英文去掉服务电话和 QQ + if (FRContext.getLocale() == Locale.ENGLISH || FRContext.getLocale() == Locale.US || FRContext.getLocale() == Locale.UK){ + // do nothing + } else { + if(ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)){ + boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("Service_Phone") + ProductConstants.COMPARE_TELEPHONE); + contentPane.add(boxCenterAlignmentPane); + } + boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ:" + SiteCenter.getInstance().acquireUrlByKind("help.qq")); contentPane.add(boxCenterAlignmentPane); } - boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ:" + SiteCenter.getInstance().acquireUrlByKind("help.qq")); - contentPane.add(boxCenterAlignmentPane); BoxCenterAligmentPane actionLabel = getURLActionLabel(ProductConstants.WEBSITE_URL); BoxCenterAligmentPane emailLabel = getEmailActionLabel(ProductConstants.SUPPORT_EMAIL); diff --git a/designer_base/src/com/fr/design/editor/editor/DateEditor.java b/designer_base/src/com/fr/design/editor/editor/DateEditor.java index cef908aa6f..17fc580772 100644 --- a/designer_base/src/com/fr/design/editor/editor/DateEditor.java +++ b/designer_base/src/com/fr/design/editor/editor/DateEditor.java @@ -15,6 +15,7 @@ import java.awt.event.ItemListener; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.Locale; /** * CellEditor used to edit Date object. @@ -59,7 +60,10 @@ public class DateEditor extends Editor { this.setLayout(FRGUIPaneFactory.createBorderLayout()); uiDatePicker = new UIDatePicker(); if (format) { - uiDatePicker.setStyle(uiDatePicker.STYLE_CN_DATE); + int dateStyle = (FRContext.getLocale() == Locale.ENGLISH + || FRContext.getLocale() == Locale.US + || FRContext.getLocale() == Locale.UK) ? uiDatePicker.STYLE_EN_DATE : uiDatePicker.STYLE_CN_DATE; + uiDatePicker.setStyle(dateStyle); uiDatePicker.setEditable(false); } uiDatePicker.addItemListener(new ItemListener() { diff --git a/designer_base/src/com/fr/design/gui/date/UIDatePicker.java b/designer_base/src/com/fr/design/gui/date/UIDatePicker.java index c2ee8ab312..3a102de906 100644 --- a/designer_base/src/com/fr/design/gui/date/UIDatePicker.java +++ b/designer_base/src/com/fr/design/gui/date/UIDatePicker.java @@ -31,6 +31,7 @@ public class UIDatePicker extends UIComboBox implements Serializable { public static final int STYLE_CN_DATE1 = 1; public static final int STYLE_CN_DATETIME = 2; public static final int STYLE_CN_DATETIME1 = 3; + public static final int STYLE_EN_DATE = 4; public boolean isWillHide = false; /** * 日期格式类型 @@ -113,6 +114,8 @@ public class UIDatePicker extends UIComboBox implements Serializable { return new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); case STYLE_CN_DATETIME1: return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + case STYLE_EN_DATE: + return new SimpleDateFormat("MM/dd/yyyy"); default: throw new UnsupportedOperationException( "invalid formatStyle parameter!"); diff --git a/designer_base/src/com/fr/design/images/reportcolumns/col_en.png b/designer_base/src/com/fr/design/images/reportcolumns/col_en.png new file mode 100644 index 0000000000000000000000000000000000000000..14f73966d6f2ba50b7fe9fe28dd36c9e24ce099c GIT binary patch literal 1348 zcmV-K1-tr*P)KLZ*U+lnSp_Ufq@}0xwybFAi#%#fq@|}KQEO51AM#2z{tSB zz;IdD(Z$J?fi%FHTu@ZPz`$^Tfq}s&CAB!2fq~%*0|P^Pc}YPD0|R3W0|SFdQg%TJ z0|R3L0|SFdc1Vyj0|R3V0|OIJNoqw20|NttbACZ(QD%BZiGrb}rKN&nN`6wRLU3hq zNosDff@fZGeo;YwQDRAI3IhWJ)D8v)1_oZ2{1OHC#LPSeLsL}-Dual~C?)grM$+xhxmf|p7B=;2nnnfbQ63e)F`Yd zd{`u1lvi}CSe!Vg_*RJ&Nny#OQWes=(obaO$cD-Z%AJ+(QSedZRlJ}yML9}EN#(Wb zR<%ZTKMh%px0?I3CTgeZSnCSuzS29QKi{CnFv`f%Skm~n$vxA{#r++CO)=?RdfInDbtjt*-0cR=O|sSme3TYk~JdpT)k*{8ss|57-*GH|SXK z`H)+o&%(Y$FhvSRDMcH{xWz`r<;Axo%ud{#bT;{UDpQ(Vx=lt@W>wa#>^(X6@|g0~ z3w#QTi)I%eE_qufQSMSvSUIoiZ1vw-y}J1NNe#yue>WSnq_@s%yWSz#>D|@deYlsQ z&%VEI!oG?BCp%7QoqA$A?~LG?vt~V-qcyi=-o6D~3&R#IUi@*X!?Fp>AFecB)w=rT zTHSR`>u+u}*wnH4!B(qnQ@4NE>AP#y9*(`~`;H$_KiGNb^%1|Ln~#g1s6F}QwD*}U z=VZ^fU-)z>?((Ut7T1>D5WU%Y>+7BLyEpIqJUH;k^zrJaiqB@g5PaG7n)yxL+n?`C zKYaRB@cG@>yl?M*RI+y?e7jKeZ#YO-C0i{VqK~#9!?3zKc!XOYtyHmNBSJ#vE zUzm!q3PA=Tp?HsZ9x>D!PR>6PnemW}T3g_nF=e?KE9mW;Lr> z%{o)x%D=_hY5tbA$!RjY3mok$rR&}8Xwi(rP;rR9Xv7mPN@)d@XQzSrS6p0yW;cwYwXNQ z_}A}Y70g%FpINWij`pvL^#c1>KNFhOtY-Z`tTQ>yzX1R@n9AN3S+bV^0000XEkq literal 0 HcmV?d00001 diff --git a/designer_base/src/com/fr/design/images/reportcolumns/row_en.png b/designer_base/src/com/fr/design/images/reportcolumns/row_en.png new file mode 100644 index 0000000000000000000000000000000000000000..7c66662a2b71430e6d6503f006b932708febaff1 GIT binary patch literal 3708 zcmV-?4ukQDP)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3b#wrIijHG|(J>BYjM-sajE6;FiC7vY#};Gd zST$CUHDeuEH+B^pz@B062qXfFfD`NpUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%gfYS= zB9o|3v?Y2H`NVi)In3rTB8+ej^> zQ=~r95NVuDChL%G$=>7$vVg20myx%S50Foi`^m%Pw-h?Xh~i8Mq9jtJloCocWk2Nv zrJpiFnV_ms&8eQ$2&#xWpIS+6pmtC%Q-`S&GF4Q#^mhymh7E(qNMa}%YZ-ePrx>>xFPTiH1=E+A$W$=bG8>s^ zm=Bn5Rah$aDtr}@$`X}2l~$F0mFKEdRdZE8)p@E5RI61Ft6o-prbbn>P~)iy)E2AN zsU20jsWz_8Qg>31P|s0cqrPALg8E|(vWA65poU1JRAaZs8I2(p#xiB`SVGovRs-uS zYnV-9TeA7=Om+qP8+I>yOjAR1s%ETak!GFdam@h^# z)@rS0t$wXH+Irf)+G6c;?H29p+V6F6oj{!|o%K3xI`?%6x;DB|x`n#ibhIR?(H}Q3Gzd138Ei2)WAMz7W9Vy`X}HnwgyEn!VS)>mv$8&{hQn>w4zwy3R}t;BYlZQm5)6pty=DfLrs+A-|>>;~;Q z_F?uV_HFjh9n2gO9o9Q^JA86v({H5aB!kjoO6 zc9$1ZZKsN-Zl8L~mE{`ly3)1N^`o1+o7}D0ZPeY&J;i;i`%NyJ8_8Y6J?}yE@b_5a zam?eLr<8@mESk|3$_SkmS{wQ>%qC18))9_|&j{ZT zes8AvOzF(F2#DZEY>2oYX&IRp`F#{ADl)1r>QS^)ba8a|EY_^#S^HO&t^Rgqwv=MZThqqEWH8 zxJo>d=ABlR_Bh=;eM9Tw|Ih34~oTE|= zX_mAr*D$vzw@+p(E0Yc6dFE}(8oqt`+R{gE3x4zjX+Sb3_cYE^= zgB=w+-tUy`ytONMS8KgRef4hA?t0j zufM;t32jm~jUGrkaOInTZ`zyfns>EuS}G30LFK_G-==(f<51|K&cocp&EJ`SxAh3? zNO>#LI=^+SEu(FqJ)ynt=!~PC9bO$rzPJB=?=j6w@a-(u02P7 zaQ)#(uUl{HW%tYNS3ItC^iAtK(eKlL`f9+{bJzISE?u8_z3;~C8@FyI-5j_jy7l;W z_U#vU3hqqYU3!mrul&B+{ptt$59)uk{;_4iZQ%G|z+lhASr6|H35TBkl>gI*;nGLU zN7W-nBaM%pA0HbH8olyl&XeJ%vZoWz%6?Y=dFykl=imL}`%BMQ{Mhgd`HRoLu6e2R za__6DuR6yg#~-}Tc|Gx_{H@O0eebyMy5GmWADJlpK>kqk(fVV@r_fLLKIeS?{4e)} z^ZO;zpECde03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(`>RI+y?e7jKeZ#YO-C z1F1C-)b+h)IUL$oRwONTYeRkbW4)4so(>+ZLAt zF~((G*B{?=T>ZcHJ*DTpgR66ww(0n~+|RArU9~m!_tx{29Am_FDm_M6mSuUr-wU+! z{eIDKg2pdo02MG+&@t8+BPxId!BS)P#Gv%GB|*BkoAJpShS?c+jp$dR?Y|#0*4hj9 zbi;j;hQX@PB|@bx28Q}v4TCigP$SgYE1bW33IjZ77%X{!(uWYG-Q27Y$HK)_*H9`9 z$lb{~FY%j!cnt-fu3@k!_?1Z3l0u8^QPZ%5mo;(EF;vcL>|e*@SE32jS04N zk6uOy)HMv2y}^}t;7OG)4VfZ1DY=0Gy~Me!C6_t2Uc}OwJ+;RfZEU5bJGo(@-gB3f z`n0q;RrZp~{zqT4-1)l007^3YpsZz%#)JVN6KY|sATz3gv4W0gC6fgi&+7S+Bxn&7 z?=X6UcI{H#E5QYF=yG!T4vRV*PQ37)FYSSw(P3X`r12pwJAML@3~7CavN0& z(^|?yS<3*nZCgH{4?^4sWi6w+CnnesvjSkOfUyE#tj6KV+8ksn1uPi|^I0+0A0n5m zlMiJYvP?T+0By!t7t>x<%}cH8if8?cZ~)r$Q(MMfZmlZ})o1s=UwfJ5gD_MGs>3dp zyoAb4BwyB|B(%y+gpM~QSj-smZ2*i0ILxpCV+Hu{6wYNWckR+L^Zm8QIPX*1Q;u7y!hq02r%57`nn(b+S~3t}s@BBb2o`3Io`! zWunklCtxei4N#oLCRr%}J~fowv<>4O+e@k3XfH+YpjMIrj0VuXI_nKyN{yv$z6q3M zfQ+$Hl0n!)f(76;W(B}lLC3r9Wi2(y&DH;AkAsfhDdqe~vgWhj`8j%zVWGV}r9mOa z$W9}jP}VX>W7Z8|l!BPmTc!#aD*(m{g2qa`1v18}7;h0H_GzcOOnbmkeHp6qjyEjR z4tQ3u2PZfy4icv)grk}YCZjCHi=;7>aqw*tlrfU$yG a{tW=pmU1S9{IU7~0000 Date: Fri, 13 Jan 2017 16:46:15 +0800 Subject: [PATCH 021/127] =?UTF-8?q?REPORT-1096=20=E5=8F=96=E8=89=B2?= =?UTF-8?q?=E6=9D=BF=3D>=E5=B0=86=E5=8F=96=E8=89=B2=E6=9D=BF=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E6=A1=86=E7=9A=84=E4=BD=8D=E7=BD=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java b/designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java index 0973fd3636..283b2e1127 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java @@ -126,7 +126,7 @@ public class UIColorButton extends UIButton implements PopupHider, UIObserver, G popupWin = this.getColorControlWindow(); - GUICoreUtils.showPopupMenu(popupWin, this, 0, this.getSize().height); + GUICoreUtils.showPopupMenu(popupWin, this, -70, this.getSize().height); } /** From 02f5befc458ba43939a43b8d80d81aa488d1088b Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 16 Jan 2017 16:22:28 +0800 Subject: [PATCH 022/127] =?UTF-8?q?REPORT-1096=20=E5=8F=96=E8=89=B2?= =?UTF-8?q?=E6=9D=BF=3D>1=E3=80=81=E4=BF=AE=E6=94=B9=E6=97=A0=E9=80=8F?= =?UTF-8?q?=E6=98=8E=E9=A2=9C=E8=89=B2=E9=80=89=E6=8B=A9=E6=A1=86=E7=9A=84?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=9B2=E3=80=81=E2=80=9C=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E9=A2=9C=E8=89=B2=E2=80=9D=E6=8C=89=E9=92=AE=E4=B8=8B?= =?UTF-8?q?=E7=95=99=E5=87=BA=E7=A9=BA=E9=9A=99=EF=BC=9B3=E3=80=81?= =?UTF-8?q?=E5=8F=96=E8=89=B2=E5=99=A8=E6=8C=89=E9=92=AE=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E4=B8=8E=E8=89=B2=E5=9D=97=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=EF=BC=9B4=E3=80=81=E7=A9=BA=E5=87=BA=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E8=89=B2=E5=9D=97=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/style/color/ColorSelectPane.java | 25 ++++++------- .../style/color/NewColorSelectPane.java | 11 ++---- .../fr/design/style/color/UsedColorPane.java | 35 +++++++++++++++++-- .../ColorSelectPaneWithOutTransparent.java | 12 ++++++- 4 files changed, 59 insertions(+), 24 deletions(-) diff --git a/designer_base/src/com/fr/design/style/color/ColorSelectPane.java b/designer_base/src/com/fr/design/style/color/ColorSelectPane.java index 743a71ce42..851768f5a7 100644 --- a/designer_base/src/com/fr/design/style/color/ColorSelectPane.java +++ b/designer_base/src/com/fr/design/style/color/ColorSelectPane.java @@ -71,11 +71,8 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable centerPane.add(getRow1Pane()); - JPanel menuColorPane1 = new JPanel(); + JPanel menuColorPane1 = getMenuColorPane(); centerPane.add(menuColorPane1); - - menuColorPane1.setLayout(new GridLayout(5, 8, 1, 1)); - menuColorPane1.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8)); Color[] colorArray = this.getColorArray(); for (int i = 0; i < colorArray.length; i++) { Color color = colorArray[i] == null ? UsedColorPane.DEFAULT_COLOR : colorArray[i]; @@ -94,24 +91,28 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable }); customButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); JPanel centerPane1 = FRGUIPaneFactory.createBorderLayout_S_Pane(); - centerPane1.setBorder(BorderFactory.createEmptyBorder(2, 8, 0, 8)); + centerPane1.setBorder(BorderFactory.createEmptyBorder(2, 8, 8, 8)); centerPane1.add(customButton, BorderLayout.NORTH); centerPane.add(centerPane1); } + protected JPanel getMenuColorPane() { + JPanel menuColorPane = new JPanel(); + menuColorPane.setLayout(new GridLayout(5, 8, 1, 1)); + menuColorPane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8)); + + return menuColorPane; + } + // 第一行,1个取色按钮 + 7个最近使用的颜色 - private JPanel getRow1Pane() { + protected JPanel getRow1Pane() { JPanel row1Pane = new JPanel(FRGUIPaneFactory.createBorderLayout()); row1Pane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 0)); row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7 - // 取色按钮 - UIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON16, true); - row1Pane.add(pickColorButton, BorderLayout.WEST); - // 最近使用 - UsedColorPane usedColorPane = new UsedColorPane(1, 7, ColorSelectConfigManager.getInstance().getColors(),this); - usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 8)); + UsedColorPane usedColorPane = new UsedColorPane(1, 8, 1, true, ColorSelectConfigManager.getInstance().getColors(),this); + usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 8)); row1Pane.add(usedColorPane.getPane()); return row1Pane; } diff --git a/designer_base/src/com/fr/design/style/color/NewColorSelectPane.java b/designer_base/src/com/fr/design/style/color/NewColorSelectPane.java index ba28b42016..b8cff5cde5 100644 --- a/designer_base/src/com/fr/design/style/color/NewColorSelectPane.java +++ b/designer_base/src/com/fr/design/style/color/NewColorSelectPane.java @@ -79,19 +79,14 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); this.add(centerPane, BorderLayout.CENTER); - // 第一行,1个取色按钮 + 7个最近使用的颜色 + // 第一行 JPanel row1Pane = new JPanel(FRGUIPaneFactory.createBorderLayout()); row1Pane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 0)); row1Pane.setPreferredSize(new Dimension(135, 16)); // 宽度为 16 * 8 + 7 centerPane.add(row1Pane); - - // 取色按钮 - UIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON16); - row1Pane.add(pickColorButton, BorderLayout.WEST); - // 最近使用 - usedColorPane = new UsedColorPane(1, 7, ColorSelectConfigManager.getInstance().getColors(),this); - usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 8)); + usedColorPane = new UsedColorPane(1, 8, 1, true, ColorSelectConfigManager.getInstance().getColors(),this); + usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 8)); row1Pane.add(usedColorPane.getPane()); JPanel menuColorPane1 = new JPanel(); diff --git a/designer_base/src/com/fr/design/style/color/UsedColorPane.java b/designer_base/src/com/fr/design/style/color/UsedColorPane.java index 37f14fa00d..26e0915542 100644 --- a/designer_base/src/com/fr/design/style/color/UsedColorPane.java +++ b/designer_base/src/com/fr/design/style/color/UsedColorPane.java @@ -7,6 +7,7 @@ import javax.swing.BorderFactory; import javax.swing.JPanel; import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.ibutton.UIButton; public class UsedColorPane extends BasicPane{ @@ -16,6 +17,10 @@ public class UsedColorPane extends BasicPane{ private int columns; // 最近使用面板行数 private int rows; + // 留白的单元格数量 + private int reserveCells; + // 是否需要取色器按钮 + private boolean needPickColorButton; // 最近使用颜色 private Object[] colors; // 最近使用面板 @@ -40,15 +45,23 @@ public class UsedColorPane extends BasicPane{ * * @param rows 行 * @param columns 列 + * @param reserveCells 留白的单元格个数 + * @param needPickColorButton 是否需要加上取色器按钮 * @param colors 最近使用的颜色 */ - public UsedColorPane(int rows,int columns,Object[] colors,ColorSelectable selectable){ + public UsedColorPane(int rows,int columns,int reserveCells, boolean needPickColorButton, Object[] colors,ColorSelectable selectable){ this.columns = columns; this.rows = rows; + this.reserveCells = reserveCells; + this.needPickColorButton = needPickColorButton; this.colors = colors; this.selectable = selectable; initialComponents(); } + + public UsedColorPane(int rows,int columns, Object[] colors,ColorSelectable selectable){ + this(rows, columns, 0, false, colors, selectable); + } private void initialComponents(){ int total = columns * rows; @@ -57,9 +70,25 @@ public class UsedColorPane extends BasicPane{ panel.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8)); Color[] colors = ColorSelectConfigManager.getInstance().getColors(); int size = colors.length; - for (int i = 0; i < total; i++) { + + int i = 0; + if (needPickColorButton) { + // 取色按钮 + UIButton pickColorButton = PickColorButtonFactory.getPickColorButton(selectable, PickColorButtonFactory.IconType.ICON16, true); + panel.add(pickColorButton); + i++; + this.reserveCells += 1; + } + while (i < this.reserveCells) { + ColorCell cc = new ColorCell(DEFAULT_COLOR, selectable); + cc.setVisible(false); + panel.add(cc); + i++; + } + while (i < total) { Color color = i < size ? colors[size-1-i]: DEFAULT_COLOR; panel.add(new ColorCell(color == null ? DEFAULT_COLOR : color, selectable)); + i++; } this.pane = panel; } @@ -72,7 +101,7 @@ public class UsedColorPane extends BasicPane{ int total = columns * rows; Color[] colors = ColorSelectConfigManager.getInstance().getColors(); int size = colors.length; - for(int i=0; i Date: Mon, 16 Jan 2017 17:57:06 +0800 Subject: [PATCH 023/127] =?UTF-8?q?REPORT-1096=20=E5=8F=96=E8=89=B2?= =?UTF-8?q?=E6=9D=BF=3D>=E8=B0=83=E6=95=B4=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E9=80=89=E6=8B=A9=E7=95=8C=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E5=8F=96=E8=89=B2=E5=99=A8=E6=8C=89=E9=92=AE=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../style/color/CustomChooserPanel.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java b/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java index 85363b0e65..93302b1994 100644 --- a/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java +++ b/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java @@ -1,15 +1,7 @@ package com.fr.design.style.color; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Graphics; -import java.awt.GridLayout; -import java.awt.Image; -import java.awt.Point; +import java.awt.*; import java.awt.event.*; import java.awt.image.MemoryImageSource; import java.util.regex.Matcher; @@ -709,12 +701,21 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec hexPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 8, 0)); hexPanel.add(new UILabel("#")); hexPanel.add(field); - UIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON18, true); - hexPanel.add(pickColorButton); mainPanel.add(hslAndRgbPanel, BorderLayout.CENTER); mainPanel.add(hexPanel, BorderLayout.SOUTH); + JPanel rightPane = new JPanel(new BorderLayout()); + UIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON18, true); + JPanel blankArea = new JPanel(); + blankArea.setPreferredSize(new Dimension(100, 175)); + rightPane.add(blankArea, BorderLayout.CENTER); + JPanel buttonPane = new JPanel(new BorderLayout()); + buttonPane.add(pickColorButton, BorderLayout.WEST); + rightPane.add(buttonPane, BorderLayout.SOUTH); +// rightPane.add(pickColorButton, BorderLayout.SOUTH); + container.add(rightPane); + return container; } From 81db8a7da5c357cabb25f7c1344d470395938272 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 16 Jan 2017 19:40:39 +0800 Subject: [PATCH 024/127] rt --- .../tabledatapane/DBTableDataPane.java | 53 ++++++------------- .../fr/design/fun/DBTableDataMenuHandler.java | 24 +++++++++ .../impl/AbstractDBTableDataMenuHandler.java | 34 ++++++++++++ 3 files changed, 75 insertions(+), 36 deletions(-) create mode 100644 designer_base/src/com/fr/design/fun/DBTableDataMenuHandler.java create mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractDBTableDataMenuHandler.java diff --git a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 553e6814c0..94e6b44b69 100644 --- a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -7,6 +7,7 @@ import com.fr.base.ParameterHelper; import com.fr.data.core.db.TableProcedure; import com.fr.data.impl.DBTableData; import com.fr.data.impl.NameDatabaseConnection; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; import com.fr.design.border.UIRoundedBorder; import com.fr.design.constants.UIConstants; @@ -17,6 +18,7 @@ import com.fr.design.data.datapane.sqlpane.SQLEditPane; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.fun.DBTableDataMenuHandler; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itableeditorpane.ParameterTableModel; @@ -34,7 +36,6 @@ import com.fr.general.Inter; import com.fr.script.Calculator; import com.fr.stable.ArrayUtils; import com.fr.stable.ParameterProvider; -import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import javax.swing.*; @@ -53,11 +54,11 @@ public class DBTableDataPane extends AbstractTableDataPane { private ConnectionTableProcedurePane connectionTableProcedurePane; private UITableEditorPane editorPane; + private DBTableDataMenuHandler dbTableDataMenuHandler; private SQLEditPane sqlTextPane; private UICheckBox isShareCheckBox; private MaxMemRowCountPanel maxPanel; private String pageQuery = null; - private String customCountQuery = null; public DBTableDataPane() { @@ -149,11 +150,10 @@ public class DBTableDataPane extends AbstractTableDataPane { } private void refresh() { - String[] paramTexts = new String[3]; + String[] paramTexts = new String[2]; paramTexts[0] = sqlTextPane.getText(); paramTexts[1] = pageQuery; - paramTexts[2] = customCountQuery; - + String queryText = null; List existParameterList = editorPane.update(); Parameter[] ps = existParameterList == null ? new Parameter[0] : existParameterList.toArray(new Parameter[existParameterList.size()]); @@ -166,8 +166,11 @@ public class DBTableDataPane extends AbstractTableDataPane { toolBarDef.addShortCut(new PreviewAction()); toolBarDef.addShortCut(SeparatorDef.DEFAULT); toolBarDef.addShortCut(new EditPageQueryAction()); - toolBarDef.addShortCut(SeparatorDef.DEFAULT); - toolBarDef.addShortCut(new EditCustomCountQueryAction()); + dbTableDataMenuHandler = ExtraDesignClassManager.getInstance().getSingle(DBTableDataMenuHandler.MARK_STRING); + if (dbTableDataMenuHandler != null) { + toolBarDef.addShortCut(SeparatorDef.DEFAULT); + toolBarDef.addShortCut(dbTableDataMenuHandler.createQueryAction()); + } isShareCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Is_Share_DBTableData")); maxPanel = new MaxMemRowCountPanel(); maxPanel.setBorder(null); @@ -179,11 +182,9 @@ public class DBTableDataPane extends AbstractTableDataPane { } private void checkParameter() { - String[] paramTexts = new String[3]; + String[] paramTexts = new String[2]; paramTexts[0] = sqlTextPane.getText(); paramTexts[1] = pageQuery; - paramTexts[2] = customCountQuery; - Parameter[] parameters = ParameterHelper.analyze4Parameters(paramTexts, false); if (parameters.length < 1 && editorPane.update().size() < 1) { @@ -210,6 +211,9 @@ public class DBTableDataPane extends AbstractTableDataPane { @Override public void populateBean(DBTableData dbtabledata) { + if (dbTableDataMenuHandler != null) { + dbTableDataMenuHandler.setDBTableData(dbtabledata); + } ParameterProvider[] parameters = null; Calculator c = Calculator.createCalculator(); @@ -227,8 +231,6 @@ public class DBTableDataPane extends AbstractTableDataPane { isShare = dbtabledata.isShare(); maxMemeryRow = dbtabledata.getMaxMemRowCount(); this.pageQuery = dbtabledata.getPageQuerySql(); - this.customCountQuery = dbtabledata.getCustomCountQuery(); - this.connectionTableProcedurePane.setSelectedDatabaseConnection(db); this.sqlTextPane.setText(query); this.sqlTextPane.requestFocus(); @@ -264,8 +266,9 @@ public class DBTableDataPane extends AbstractTableDataPane { dbTableData.setShare(isShareCheckBox.isSelected()); dbTableData.setMaxMemRowCount(maxPanel.getValue()); dbTableData.setPageQuerySql(this.pageQuery); - dbTableData.setCustomCountQuery(this.customCountQuery); - + if (dbTableDataMenuHandler != null) { + dbTableData.setCustomCountQuery(dbTableDataMenuHandler.getDbTableData().getCustomCountQuery()); + } return dbTableData; } @@ -318,28 +321,6 @@ public class DBTableDataPane extends AbstractTableDataPane { } } - private class EditCustomCountQueryAction extends UpdateAction { - public EditCustomCountQueryAction() { - this.setName(Inter.getLocText("FR-Designer-LayerPageReport_CustomCountQuery")); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/text.png")); - } - - @Override - public void actionPerformed(ActionEvent e) { - final QueryPane editPane = new QueryPane(Inter.getLocText("FR-Designer-LayerPageReport_Define_CustomCountQuery")); - editPane.populate(customCountQuery); - BasicDialog dialog = editPane.showWindow(DesignerContext.getDesignerFrame()); - dialog.addDialogActionListener(new DialogActionAdapter() { - public void doOk() { - customCountQuery = editPane.update(); - checkParameter(); - } - }); - dialog.setVisible(true); - - } - } - private class QueryPane extends BasicPane { private SQLEditPane pageQueryPane; private String title; diff --git a/designer_base/src/com/fr/design/fun/DBTableDataMenuHandler.java b/designer_base/src/com/fr/design/fun/DBTableDataMenuHandler.java new file mode 100644 index 0000000000..c32bf7e86a --- /dev/null +++ b/designer_base/src/com/fr/design/fun/DBTableDataMenuHandler.java @@ -0,0 +1,24 @@ +package com.fr.design.fun; + +import com.fr.data.impl.DBTableData; +import com.fr.design.actions.UpdateAction; +import com.fr.stable.fun.mark.Immutable; + +/** + * Created by xiaxiang on 2017/1/15. + */ +public interface DBTableDataMenuHandler extends Immutable { + String MARK_STRING = "DBTableDataMenuHandler"; + + int CURRENT_LEVEL = 1; + + UpdateAction createQueryAction(); + + DBTableData getDbTableData(); + + void setDBTableData(DBTableData dbTableData); + + + + +} diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractDBTableDataMenuHandler.java b/designer_base/src/com/fr/design/fun/impl/AbstractDBTableDataMenuHandler.java new file mode 100644 index 0000000000..f0a8207f13 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/impl/AbstractDBTableDataMenuHandler.java @@ -0,0 +1,34 @@ +package com.fr.design.fun.impl; + +import com.fr.data.impl.DBTableData; +import com.fr.design.actions.UpdateAction; +import com.fr.design.fun.DBTableDataMenuHandler; +import com.fr.stable.fun.mark.API; + +/** + * Created by xiaxiang on 2017/1/15. + */ +@API(level = DBTableDataMenuHandler.CURRENT_LEVEL) +public abstract class AbstractDBTableDataMenuHandler implements DBTableDataMenuHandler { + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + public int layerIndex() { + return DEFAULT_LAYER_INDEX; + } + + public UpdateAction createQueryAction() { + return null; + } + + @Override + public DBTableData getDbTableData() { + return null; + } + + @Override + public void setDBTableData(DBTableData dbTableData) { + + } +} From 16692eb1cb53e2e6feb27a06d4429ac276f18d70 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 17 Jan 2017 09:41:26 +0800 Subject: [PATCH 025/127] =?UTF-8?q?REPORT-1096=20=E5=8F=96=E8=89=B2?= =?UTF-8?q?=E6=9D=BF=3D>=E5=8E=BB=E6=8E=89=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E9=80=89=E6=8B=A9=E7=95=8C=E9=9D=A2=E5=8F=96?= =?UTF-8?q?=E8=89=B2=E5=99=A8=E6=8C=89=E9=92=AE=E7=9A=84=E8=BE=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/style/color/CustomChooserPanel.java | 1 - .../src/com/fr/design/style/color/PickColorButtonFactory.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java b/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java index 93302b1994..21f23b783c 100644 --- a/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java +++ b/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java @@ -713,7 +713,6 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec JPanel buttonPane = new JPanel(new BorderLayout()); buttonPane.add(pickColorButton, BorderLayout.WEST); rightPane.add(buttonPane, BorderLayout.SOUTH); -// rightPane.add(pickColorButton, BorderLayout.SOUTH); container.add(rightPane); return container; diff --git a/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java b/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java index 32188ff4e8..0eb28af751 100644 --- a/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java +++ b/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java @@ -2,7 +2,6 @@ package com.fr.design.style.color; import com.fr.base.BaseUtils; import com.fr.design.gui.ibutton.UIButton; - import java.awt.*; import java.awt.event.*; @@ -24,6 +23,7 @@ public class PickColorButtonFactory { } else { pickColorButton.setIcon(BaseUtils.readIcon("/com/fr/design/images/gui/colorPicker/colorPicker18.png")); pickColorButton.setPreferredSize(new Dimension(18, 18)); + pickColorButton.setBorderPainted(false); } pickColorButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); From 768035300aa9ed5887d003aa3f8ce89cb2b6f23c Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Tue, 17 Jan 2017 10:53:06 +0800 Subject: [PATCH 026/127] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=8F=8C?= =?UTF-8?q?=E5=90=91=E8=87=AA=E9=80=82=E5=BA=94=E5=92=8C=E4=B8=8D=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94=E6=8C=89=E9=92=AE=E7=9A=84=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/mobile/MobileRadioGroupPane.java | 78 ++++++++++++++----- 1 file changed, 59 insertions(+), 19 deletions(-) diff --git a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java index f03b726260..7878451cf6 100644 --- a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java +++ b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java @@ -19,7 +19,7 @@ import java.util.List; */ public class MobileRadioGroupPane extends BasicBeanPane{ - private List radioButtons = new ArrayList(); + private List radioButtons = new ArrayList(); public MobileRadioGroupPane(String title) { initComponents(title); @@ -30,28 +30,35 @@ public class MobileRadioGroupPane extends BasicBeanPane{ double[] rowSize = {p}; double[] columnSize = {p, p, p, p, p, p}; - UIRadioButton defaultRadio = new UIRadioButton(MobileFitAttrState.DEFAULT.description()); - defaultRadio.setSelected(true); - UIRadioButton horizonRadio = new UIRadioButton(MobileFitAttrState.HORIZONTAL.description()); - UIRadioButton verticalRadio = new UIRadioButton(MobileFitAttrState.VERTICAL.description()); - UIRadioButton bidirectionalRadio = new UIRadioButton(MobileFitAttrState.BIDIRECTIONAL.description()); - UIRadioButton notFitRadio = new UIRadioButton(MobileFitAttrState.NONE.description()); + RadioButton defaultRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.DEFAULT.description()), MobileFitAttrState.DEFAULT.getState()); + defaultRadio.getRadioButton().setSelected(true); + RadioButton horizonRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.HORIZONTAL.description()), MobileFitAttrState.HORIZONTAL.getState()); + RadioButton verticalRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.VERTICAL.description()), MobileFitAttrState.VERTICAL.getState()); + RadioButton bidirectionalRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.BIDIRECTIONAL.description()), MobileFitAttrState.BIDIRECTIONAL.getState()); + RadioButton notFitRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.NONE.description()), MobileFitAttrState.NONE.getState()); addToButtonGroup(defaultRadio, horizonRadio, verticalRadio, notFitRadio, bidirectionalRadio); Component[][] components = new Component[][]{ - new Component[]{new UILabel(title), defaultRadio, horizonRadio, verticalRadio, notFitRadio, bidirectionalRadio} + new Component[] { + new UILabel(title), + defaultRadio.getRadioButton(), + horizonRadio.getRadioButton(), + verticalRadio.getRadioButton(), + bidirectionalRadio.getRadioButton(), + notFitRadio.getRadioButton() + } }; JPanel fitOpsPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); fitOpsPane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10)); this.add(fitOpsPane); } - private void addToButtonGroup(UIRadioButton... radios) { + private void addToButtonGroup(RadioButton... radios) { ButtonGroup buttonGroup = new ButtonGroup(); - for (UIRadioButton radio : radios) { + for (RadioButton radio : radios) { radioButtons.add(radio); - buttonGroup.add(radio); + buttonGroup.add(radio.getRadioButton()); } } @@ -59,8 +66,8 @@ public class MobileRadioGroupPane extends BasicBeanPane{ * 设置按钮状态 */ public void setEnabled(boolean enabled) { - for (UIRadioButton radioButton : radioButtons) { - radioButton.setEnabled(enabled); + for (RadioButton radioButton : radioButtons) { + radioButton.getRadioButton().setEnabled(enabled); } } @@ -71,8 +78,8 @@ public class MobileRadioGroupPane extends BasicBeanPane{ */ public int getSelectRadioIndex() { for (int i = 0, len = radioButtons.size(); i < len; i++) { - if (radioButtons.get(i).isSelected()) { - return i; + if (radioButtons.get(i).getRadioButton().isSelected()) { + return radioButtons.get(i).getRadioButtonIndex(); } } @@ -87,16 +94,19 @@ public class MobileRadioGroupPane extends BasicBeanPane{ return; } - UIRadioButton button = radioButtons.get(index); - button.setSelected(true); + for (RadioButton radioButton : this.radioButtons) { + if (radioButton.getRadioButtonIndex() == index) { + radioButton.getRadioButton().setSelected(true); + } + } } /** * 给所有的按钮加上监听 */ public void addActionListener(ActionListener actionListener) { - for (UIRadioButton radioButton : radioButtons) { - radioButton.addActionListener(actionListener); + for (RadioButton radioButton : radioButtons) { + radioButton.getRadioButton().addActionListener(actionListener); } } @@ -116,3 +126,33 @@ public class MobileRadioGroupPane extends BasicBeanPane{ return StringUtils.EMPTY; } } + +/** + * created by fanglei on 2017/1/16 + * 不再用radioButtonGroup的数组下标作为index,而是给每个按钮传入MobileFitAttrState的枚举值 + */ +class RadioButton { + private UIRadioButton radioButton; + private int index; + + RadioButton(UIRadioButton radioButton, int index) { + this.radioButton = radioButton; + this.index = index; + } + + public UIRadioButton getRadioButton() { + return this.radioButton; + } + + public void setUIReadioButton(UIRadioButton radioButton) { + this.radioButton = radioButton; + } + + public int getRadioButtonIndex() { + return this.index; + } + + public void setRadioButtonIndex(int index) { + this.index = index; + } +} From e539908dcbc0e7964ad7a00effb9f3b3549b5aeb Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 17 Jan 2017 14:57:27 +0800 Subject: [PATCH 027/127] rt --- .../fr/design/data/tabledata/tabledatapane/DBTableDataPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 94e6b44b69..fed22c080d 100644 --- a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -267,7 +267,7 @@ public class DBTableDataPane extends AbstractTableDataPane { dbTableData.setMaxMemRowCount(maxPanel.getValue()); dbTableData.setPageQuerySql(this.pageQuery); if (dbTableDataMenuHandler != null) { - dbTableData.setCustomCountQuery(dbTableDataMenuHandler.getDbTableData().getCustomCountQuery()); + dbTableData.setDataQueryProcessor(dbTableDataMenuHandler.getDbTableData().getDataQueryProcessor()); } return dbTableData; } From 47a758f0b1c12d3dd9d0d1c715db2ac210d24668 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Tue, 17 Jan 2017 17:13:15 +0800 Subject: [PATCH 028/127] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E7=9A=84=E5=8F=8C?= =?UTF-8?q?=E5=90=91=E8=87=AA=E9=80=82=E5=BA=94=E5=92=8C=E4=B8=8D=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94=E9=A1=BA=E5=BA=8F=E5=BF=98=E8=AE=B0=E6=94=B9?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../properties/mobile/MobileFitAlignmentItems.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java b/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java index 552589b71a..8926befde4 100644 --- a/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java +++ b/designer_form/src/com/fr/design/designer/properties/mobile/MobileFitAlignmentItems.java @@ -9,12 +9,14 @@ public class MobileFitAlignmentItems implements ItemProvider { private static Item[] VALUE_ITEMS; static { - MobileFitAttrState[] allStates = MobileFitAttrState.values(); - int len = allStates.length; - VALUE_ITEMS = new Item[len]; - for (int i = 0; i < len ; i++) { - VALUE_ITEMS[i] = new Item(allStates[i].description(), allStates[i]); - } +// 此处不能循环根据MobileFitAttrState的枚举顺序创建items,否则不自适应选项就会跑到双向自适应选项前面。 + VALUE_ITEMS = new Item[]{ + new Item(MobileFitAttrState.DEFAULT.description(), MobileFitAttrState.DEFAULT), + new Item(MobileFitAttrState.HORIZONTAL.description(), MobileFitAttrState.HORIZONTAL), + new Item(MobileFitAttrState.VERTICAL.description(), MobileFitAttrState.VERTICAL), + new Item(MobileFitAttrState.BIDIRECTIONAL.description(), MobileFitAttrState.BIDIRECTIONAL), + new Item(MobileFitAttrState.NONE.description(), MobileFitAttrState.NONE) + }; } @Override From c32b292e35eedeacc11a53659bd2a34e962b20d3 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Tue, 17 Jan 2017 17:21:50 +0800 Subject: [PATCH 029/127] =?UTF-8?q?RadioButton=E7=9A=84=E6=9E=84=E9=80=A0?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E7=9A=84=E7=AC=AC=E4=BA=8C=E4=B8=AA=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=BF=AE=E6=94=B9=E4=B8=BAMobileFitAttrState?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/report/mobile/MobileRadioGroupPane.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java index 7878451cf6..638abc768c 100644 --- a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java +++ b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java @@ -30,12 +30,12 @@ public class MobileRadioGroupPane extends BasicBeanPane{ double[] rowSize = {p}; double[] columnSize = {p, p, p, p, p, p}; - RadioButton defaultRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.DEFAULT.description()), MobileFitAttrState.DEFAULT.getState()); + RadioButton defaultRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.DEFAULT.description()), MobileFitAttrState.DEFAULT); defaultRadio.getRadioButton().setSelected(true); - RadioButton horizonRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.HORIZONTAL.description()), MobileFitAttrState.HORIZONTAL.getState()); - RadioButton verticalRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.VERTICAL.description()), MobileFitAttrState.VERTICAL.getState()); - RadioButton bidirectionalRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.BIDIRECTIONAL.description()), MobileFitAttrState.BIDIRECTIONAL.getState()); - RadioButton notFitRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.NONE.description()), MobileFitAttrState.NONE.getState()); + RadioButton horizonRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.HORIZONTAL.description()), MobileFitAttrState.HORIZONTAL); + RadioButton verticalRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.VERTICAL.description()), MobileFitAttrState.VERTICAL); + RadioButton bidirectionalRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.BIDIRECTIONAL.description()), MobileFitAttrState.BIDIRECTIONAL); + RadioButton notFitRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.NONE.description()), MobileFitAttrState.NONE); addToButtonGroup(defaultRadio, horizonRadio, verticalRadio, notFitRadio, bidirectionalRadio); @@ -135,9 +135,9 @@ class RadioButton { private UIRadioButton radioButton; private int index; - RadioButton(UIRadioButton radioButton, int index) { + RadioButton(UIRadioButton radioButton, MobileFitAttrState mobileFitAttrState) { this.radioButton = radioButton; - this.index = index; + this.index = mobileFitAttrState.getState(); } public UIRadioButton getRadioButton() { From a42bd2793829a8e84e8507d802b23c86a5977617 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 17 Jan 2017 18:53:12 +0800 Subject: [PATCH 030/127] rt --- .../fr/design/data/tabledata/tabledatapane/DBTableDataPane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index fed22c080d..94f88df8cc 100644 --- a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -153,7 +153,6 @@ public class DBTableDataPane extends AbstractTableDataPane { String[] paramTexts = new String[2]; paramTexts[0] = sqlTextPane.getText(); paramTexts[1] = pageQuery; - String queryText = null; List existParameterList = editorPane.update(); Parameter[] ps = existParameterList == null ? new Parameter[0] : existParameterList.toArray(new Parameter[existParameterList.size()]); From 74f529695de80d2fec5a0fa3993ceb1b41485e39 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Wed, 18 Jan 2017 10:19:00 +0800 Subject: [PATCH 031/127] rt --- .../data/tabledata/tabledatapane/DBTableDataPane.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 94f88df8cc..75b3219ebd 100644 --- a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -59,6 +59,8 @@ public class DBTableDataPane extends AbstractTableDataPane { private UICheckBox isShareCheckBox; private MaxMemRowCountPanel maxPanel; private String pageQuery = null; + private DBTableData dbTableData; + public DBTableDataPane() { @@ -210,8 +212,9 @@ public class DBTableDataPane extends AbstractTableDataPane { @Override public void populateBean(DBTableData dbtabledata) { + this.dbTableData = dbtabledata; if (dbTableDataMenuHandler != null) { - dbTableDataMenuHandler.setDBTableData(dbtabledata); + dbTableDataMenuHandler.populate(dbtabledata); } ParameterProvider[] parameters = null; @@ -254,7 +257,6 @@ public class DBTableDataPane extends AbstractTableDataPane { List parameterList = editorPane.update(); Parameter[] parameters = parameterList.toArray(new Parameter[parameterList.size()]); - DBTableData dbTableData = new DBTableData(); dbTableData.setDatabase(new NameDatabaseConnection(dbName)); // p:必须先设置Parameters数组,因为setQuery里面会自动设置的 @@ -266,7 +268,7 @@ public class DBTableDataPane extends AbstractTableDataPane { dbTableData.setMaxMemRowCount(maxPanel.getValue()); dbTableData.setPageQuerySql(this.pageQuery); if (dbTableDataMenuHandler != null) { - dbTableData.setDataQueryProcessor(dbTableDataMenuHandler.getDbTableData().getDataQueryProcessor()); + dbTableDataMenuHandler.update(); } return dbTableData; } From 5a16de43fa8ede11ce2e05662b0781cf96b992c2 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Wed, 18 Jan 2017 10:19:27 +0800 Subject: [PATCH 032/127] rt --- .../src/com/fr/design/fun/DBTableDataMenuHandler.java | 6 ++---- .../fr/design/fun/impl/AbstractDBTableDataMenuHandler.java | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/fun/DBTableDataMenuHandler.java b/designer_base/src/com/fr/design/fun/DBTableDataMenuHandler.java index c32bf7e86a..f06b63b712 100644 --- a/designer_base/src/com/fr/design/fun/DBTableDataMenuHandler.java +++ b/designer_base/src/com/fr/design/fun/DBTableDataMenuHandler.java @@ -14,11 +14,9 @@ public interface DBTableDataMenuHandler extends Immutable { UpdateAction createQueryAction(); - DBTableData getDbTableData(); - - void setDBTableData(DBTableData dbTableData); - + void populate(DBTableData dbTableData); + DBTableData update(); } diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractDBTableDataMenuHandler.java b/designer_base/src/com/fr/design/fun/impl/AbstractDBTableDataMenuHandler.java index f0a8207f13..dd11712505 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractDBTableDataMenuHandler.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractDBTableDataMenuHandler.java @@ -23,12 +23,12 @@ public abstract class AbstractDBTableDataMenuHandler implements DBTableDataMenuH } @Override - public DBTableData getDbTableData() { + public DBTableData update() { return null; } @Override - public void setDBTableData(DBTableData dbTableData) { + public void populate(DBTableData dbTableData) { } } From ecdb72d4f4aa276443b18bb52e63d206ad0dbb2f Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Wed, 18 Jan 2017 10:31:06 +0800 Subject: [PATCH 033/127] =?UTF-8?q?=E4=B8=8D=E5=86=8D=E7=8B=AC=E8=87=AA?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=B8=A6index=E7=9A=84=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=8C=E8=80=8C=E6=98=AF=E7=BB=A7=E6=89=BF?= =?UTF-8?q?=E8=87=AAUIRadioButton?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/mobile/MobileRadioGroupPane.java | 60 ++++++++----------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java index 638abc768c..68446abc97 100644 --- a/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java +++ b/designer/src/com/fr/design/report/mobile/MobileRadioGroupPane.java @@ -6,6 +6,7 @@ import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.general.data.index.Index; import com.fr.stable.StringUtils; import javax.swing.*; @@ -19,7 +20,7 @@ import java.util.List; */ public class MobileRadioGroupPane extends BasicBeanPane{ - private List radioButtons = new ArrayList(); + private List radioButtons = new ArrayList(); public MobileRadioGroupPane(String title) { initComponents(title); @@ -30,23 +31,23 @@ public class MobileRadioGroupPane extends BasicBeanPane{ double[] rowSize = {p}; double[] columnSize = {p, p, p, p, p, p}; - RadioButton defaultRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.DEFAULT.description()), MobileFitAttrState.DEFAULT); - defaultRadio.getRadioButton().setSelected(true); - RadioButton horizonRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.HORIZONTAL.description()), MobileFitAttrState.HORIZONTAL); - RadioButton verticalRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.VERTICAL.description()), MobileFitAttrState.VERTICAL); - RadioButton bidirectionalRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.BIDIRECTIONAL.description()), MobileFitAttrState.BIDIRECTIONAL); - RadioButton notFitRadio = new RadioButton(new UIRadioButton(MobileFitAttrState.NONE.description()), MobileFitAttrState.NONE); + IndexRadioButton defaultRadio = new IndexRadioButton(MobileFitAttrState.DEFAULT.description(), MobileFitAttrState.DEFAULT); + defaultRadio.setSelected(true); + IndexRadioButton horizonRadio = new IndexRadioButton(MobileFitAttrState.HORIZONTAL.description(), MobileFitAttrState.HORIZONTAL); + IndexRadioButton verticalRadio = new IndexRadioButton(MobileFitAttrState.VERTICAL.description(), MobileFitAttrState.VERTICAL); + IndexRadioButton bidirectionalRadio = new IndexRadioButton(MobileFitAttrState.BIDIRECTIONAL.description(), MobileFitAttrState.BIDIRECTIONAL); + IndexRadioButton notFitRadio = new IndexRadioButton(MobileFitAttrState.NONE.description(), MobileFitAttrState.NONE); addToButtonGroup(defaultRadio, horizonRadio, verticalRadio, notFitRadio, bidirectionalRadio); Component[][] components = new Component[][]{ new Component[] { new UILabel(title), - defaultRadio.getRadioButton(), - horizonRadio.getRadioButton(), - verticalRadio.getRadioButton(), - bidirectionalRadio.getRadioButton(), - notFitRadio.getRadioButton() + defaultRadio, + horizonRadio, + verticalRadio, + bidirectionalRadio, + notFitRadio } }; JPanel fitOpsPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); @@ -54,11 +55,11 @@ public class MobileRadioGroupPane extends BasicBeanPane{ this.add(fitOpsPane); } - private void addToButtonGroup(RadioButton... radios) { + private void addToButtonGroup(IndexRadioButton... radios) { ButtonGroup buttonGroup = new ButtonGroup(); - for (RadioButton radio : radios) { + for (IndexRadioButton radio : radios) { radioButtons.add(radio); - buttonGroup.add(radio.getRadioButton()); + buttonGroup.add(radio); } } @@ -66,8 +67,8 @@ public class MobileRadioGroupPane extends BasicBeanPane{ * 设置按钮状态 */ public void setEnabled(boolean enabled) { - for (RadioButton radioButton : radioButtons) { - radioButton.getRadioButton().setEnabled(enabled); + for (IndexRadioButton radioButton : radioButtons) { + radioButton.setEnabled(enabled); } } @@ -78,7 +79,7 @@ public class MobileRadioGroupPane extends BasicBeanPane{ */ public int getSelectRadioIndex() { for (int i = 0, len = radioButtons.size(); i < len; i++) { - if (radioButtons.get(i).getRadioButton().isSelected()) { + if (radioButtons.get(i).isSelected()) { return radioButtons.get(i).getRadioButtonIndex(); } } @@ -94,9 +95,9 @@ public class MobileRadioGroupPane extends BasicBeanPane{ return; } - for (RadioButton radioButton : this.radioButtons) { + for (IndexRadioButton radioButton : this.radioButtons) { if (radioButton.getRadioButtonIndex() == index) { - radioButton.getRadioButton().setSelected(true); + radioButton.setSelected(true); } } } @@ -105,8 +106,8 @@ public class MobileRadioGroupPane extends BasicBeanPane{ * 给所有的按钮加上监听 */ public void addActionListener(ActionListener actionListener) { - for (RadioButton radioButton : radioButtons) { - radioButton.getRadioButton().addActionListener(actionListener); + for (IndexRadioButton radioButton : radioButtons) { + radioButton.addActionListener(actionListener); } } @@ -131,23 +132,14 @@ public class MobileRadioGroupPane extends BasicBeanPane{ * created by fanglei on 2017/1/16 * 不再用radioButtonGroup的数组下标作为index,而是给每个按钮传入MobileFitAttrState的枚举值 */ -class RadioButton { - private UIRadioButton radioButton; +class IndexRadioButton extends UIRadioButton { private int index; - RadioButton(UIRadioButton radioButton, MobileFitAttrState mobileFitAttrState) { - this.radioButton = radioButton; + IndexRadioButton(String text, MobileFitAttrState mobileFitAttrState) { + super(text); this.index = mobileFitAttrState.getState(); } - public UIRadioButton getRadioButton() { - return this.radioButton; - } - - public void setUIReadioButton(UIRadioButton radioButton) { - this.radioButton = radioButton; - } - public int getRadioButtonIndex() { return this.index; } From e21a7e997d3b2fc1ba9cf28281316591452a4c1e Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 18 Jan 2017 10:47:44 +0800 Subject: [PATCH 034/127] =?UTF-8?q?REPORT-1384=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=AE=A1=E7=90=86=E4=B8=AD=E7=9A=84=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E9=A2=9C=E8=89=B2=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/ui/btn/ButtonSytleDefinedPane.java | 29 +++++++++++++------ .../background/BackgroundButtonPane.java | 6 ++++ .../btn/ButtonWithHotkeysDetailPane.java | 1 + 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java b/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java index 124b72c796..40c6087b2b 100644 --- a/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java +++ b/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java @@ -1,12 +1,13 @@ package com.fr.design.widget.ui.btn; -import java.awt.BorderLayout; -import java.awt.Dimension; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.BorderFactory; import javax.swing.ImageIcon; + +import com.fr.base.background.ColorBackground; import com.fr.design.gui.ilable.UILabel; import javax.swing.JPanel; import javax.swing.SwingUtilities; @@ -18,7 +19,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; -import com.fr.design.gui.frpane.ImgChoosePane; +import com.fr.design.style.background.BackgroundButtonPane; import com.fr.form.ui.FreeButton; import com.fr.general.Background; import com.fr.general.Inter; @@ -84,7 +85,7 @@ public class ButtonSytleDefinedPane extends BasicPane { class BackgroundPane extends JPanel { private UIButton editButton; - private ImgChoosePane choosePane; + private BackgroundButtonPane choosePane; private Background background; private UILabel ImagePreviewPane; @@ -106,7 +107,7 @@ public class ButtonSytleDefinedPane extends BasicPane { public void actionPerformed(ActionEvent e) { if (choosePane == null) { - choosePane = new ImgChoosePane(); + choosePane = new BackgroundButtonPane(); } BasicDialog dlg = choosePane.showWindow(SwingUtilities .getWindowAncestor(ButtonSytleDefinedPane.this)); @@ -116,7 +117,10 @@ public class ButtonSytleDefinedPane extends BasicPane { populate(choosePane.update()); } }); - choosePane.populate((ImageBackground) BackgroundPane.this.background); + if(BackgroundPane.this.background == null){ + BackgroundPane.this.background = new ColorBackground(); + } + choosePane.populate((Background) BackgroundPane.this.background); dlg.setVisible(true); } }); @@ -125,15 +129,22 @@ public class ButtonSytleDefinedPane extends BasicPane { public void populate(Background background) { this.background = background; + if (background instanceof ImageBackground && ((ImageBackground) background).getImage() != null) { ImagePreviewPane.setIcon(new ImageIcon(((ImageBackground) background).getImage())); - } else { + } else if(background instanceof ColorBackground && ((ColorBackground) background).getColor() != null){ + ImagePreviewPane.setIcon(null); + ImagePreviewPane.setOpaque(true); + ImagePreviewPane.setBackground(((ColorBackground) background).getColor()); + }else{ ImagePreviewPane.setIcon(null); + ImagePreviewPane.setOpaque(false); + ImagePreviewPane.setBackground(null); } } - public ImageBackground update() { - return (ImageBackground) background; + public Background update() { + return background; } } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java b/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java index 296ee746e3..084e0865aa 100644 --- a/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java +++ b/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java @@ -4,6 +4,8 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.Background; import com.fr.general.Inter; +import java.util.HashMap; + /** * Created by ibm on 2017/1/5. */ @@ -50,4 +52,8 @@ public class BackgroundButtonPane extends BackgroundPane { return quickPane; } + public void populate(Background background) { + cacheMap = new HashMap<>(); + super.populate(background); + } } diff --git a/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java b/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java index 9d278d0482..9efdb92622 100644 --- a/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java +++ b/designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java @@ -31,6 +31,7 @@ public abstract class ButtonWithHotkeysDetailPane extends Butt } private void initComponents() { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced")); advancedPane.setPreferredSize(new Dimension(600, 341)); JPanel attrPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); From 54678080a68297ddc4dfa06ceb88d00558c8a642 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 18 Jan 2017 11:08:26 +0800 Subject: [PATCH 035/127] =?UTF-8?q?=E4=BF=AE=E6=94=B9PMD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/widget/ui/btn/ButtonSytleDefinedPane.java | 8 ++++---- .../src/com/fr/design/locale/designer.properties | 5 ++++- .../src/com/fr/design/locale/designer_en_US.properties | 5 ++++- .../src/com/fr/design/locale/designer_ja_JP.properties | 5 ++++- .../src/com/fr/design/locale/designer_ko_KR.properties | 5 ++++- .../src/com/fr/design/locale/designer_zh_CN.properties | 5 ++++- .../src/com/fr/design/locale/designer_zh_TW.properties | 5 ++++- 7 files changed, 28 insertions(+), 10 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java b/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java index 40c6087b2b..fee61e5f3a 100644 --- a/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java +++ b/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java @@ -45,9 +45,9 @@ public class ButtonSytleDefinedPane extends BasicPane { JPanel buttonStylePane = new JPanel(); buttonStylePane.setLayout(new BorderLayout()); - initBackgroundPane = new BackgroundPane(Inter.getLocText("Background-Initial") + ":", Inter.getLocText("The_initial_background_of_the_button")); - overBackgroundPane = new BackgroundPane(Inter.getLocText("Background-Over") + ":", Inter.getLocText("Mouse_move-background")); - clickBackgroundPane = new BackgroundPane(Inter.getLocText("Background-Click") + ":", Inter.getLocText("Mouse_move-background")); + initBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Initial") + ":", Inter.getLocText("FR-Designer_Initial_Background_Tips")); + overBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Over") + ":", Inter.getLocText("FR-Designer_Mouse_Move_Tips")); + clickBackgroundPane = new BackgroundPane(Inter.getLocText("FR-Designer_Background-Click") + ":", Inter.getLocText("FR-Designer_Mouse_Click_Tips")); JPanel table = FRGUIPaneFactory.createYBoxEmptyBorderPane(); table.setBorder(new TitledBorder(Inter.getLocText(new String[]{"Custom", "Form-Button", "Style"}))); @@ -102,7 +102,7 @@ public class ButtonSytleDefinedPane extends BasicPane { ImagePreviewPane.setPreferredSize(new Dimension(100, 20)); this.add(ImagePreviewPane); - editButton = new UIButton(Inter.getLocText("Edit")); + editButton = new UIButton(Inter.getLocText("FR-Designer_Edit")); editButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 41f3c8cdd8..5caabf6222 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -520,4 +520,7 @@ FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= \ 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 334e01ca8c..91668466a6 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 @@ -520,4 +520,7 @@ FR-Designer_Background_Clear=Clear FR-Designer_Background_Image_Select=Select Picture FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= +FR-Designer_Initial_Background_Tips=Initial background of the button +FR-Designer_Mouse_Move_Tips=Move the mouse to the button on the background, in the absence of not changing the background +FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background \ 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 6312538cf7..2e0ca9c92a 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 @@ -499,4 +499,7 @@ FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= \ 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 87a1b893c8..b86f0d900e 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 @@ -494,4 +494,7 @@ FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= \ 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 10c53380d0..659fe3737d 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 @@ -524,4 +524,7 @@ FR-Designer_Background_Clear=\u6E05\u9664 FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 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_Initial_Background_Tips=\u6309\u94AE\u7684\u521D\u59CB\u80CC\u666F +FR-Designer_Mouse_Move_Tips=\u9F20\u6807\u79FB\u52A8\u5230\u6309\u94AE\u4E0A\u7684\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F +FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F 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 96cb4260a9..5cff5b570c 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 @@ -512,4 +512,7 @@ FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= \ No newline at end of file From f6ef244651a7a71f6915c9c9e4a4a92a929efb19 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 18 Jan 2017 16:40:01 +0800 Subject: [PATCH 036/127] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java | 4 +--- .../fr/design/style/background/BackgroundButtonPane.java | 6 ------ .../widget/accessibles/AccessibleImgBackgroundEditor.java | 6 ++---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java b/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java index fee61e5f3a..719ecea4e5 100644 --- a/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java +++ b/designer/src/com/fr/design/widget/ui/btn/ButtonSytleDefinedPane.java @@ -106,9 +106,7 @@ public class ButtonSytleDefinedPane extends BasicPane { editButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - if (choosePane == null) { - choosePane = new BackgroundButtonPane(); - } + choosePane = new BackgroundButtonPane(); BasicDialog dlg = choosePane.showWindow(SwingUtilities .getWindowAncestor(ButtonSytleDefinedPane.this)); dlg.addDialogActionListener(new DialogActionAdapter() { diff --git a/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java b/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java index 084e0865aa..296ee746e3 100644 --- a/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java +++ b/designer_base/src/com/fr/design/style/background/BackgroundButtonPane.java @@ -4,8 +4,6 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.Background; import com.fr.general.Inter; -import java.util.HashMap; - /** * Created by ibm on 2017/1/5. */ @@ -52,8 +50,4 @@ public class BackgroundButtonPane extends BackgroundPane { return quickPane; } - public void populate(Background background) { - cacheMap = new HashMap<>(); - super.populate(background); - } } diff --git a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleImgBackgroundEditor.java b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleImgBackgroundEditor.java index 8def747683..cbead62045 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleImgBackgroundEditor.java +++ b/designer_form/src/com/fr/design/mainframe/widget/accessibles/AccessibleImgBackgroundEditor.java @@ -18,10 +18,8 @@ public class AccessibleImgBackgroundEditor extends UneditableAccessibleEditor { @Override protected void showEditorPane() { - if (choosePane == null) { - choosePane = new BackgroundButtonPane(); - choosePane.setPreferredSize(new Dimension(600, 400)); - } + choosePane = new BackgroundButtonPane(); + choosePane.setPreferredSize(new Dimension(600, 400)); BasicDialog dlg = choosePane.showWindow(SwingUtilities.getWindowAncestor(this)); dlg.addDialogActionListener(new DialogActionAdapter() { From db5a84339098316d9d188182f8f436e203dc9001 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 19 Jan 2017 15:49:26 +0800 Subject: [PATCH 037/127] rt --- .../gui/icontainer/UIResizableContainer.java | 3 ++- .../parameter/ParameterPropertyPane.java | 27 ++++++++++++++----- .../parameter/ParameterToolBarPane.java | 6 ++--- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index d16622184f..98fab75f0f 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -14,6 +14,7 @@ import java.awt.event.MouseMotionListener; public class UIResizableContainer extends JPanel { private static final long serialVersionUID = 1854340560790476907L; + private static final int MAX_PARA_HEIGHT = 240; private int containerWidth = 240; private int preferredWidth = 240; private int toolPaneY = 300; @@ -139,7 +140,7 @@ public class UIResizableContainer extends JPanel { * @param height */ public void setParameterHeight(int height) { - paraHeight = hasParameterPane? height : 0; + paraHeight = hasParameterPane? Math.min(height, MAX_PARA_HEIGHT) : 0; refreshContainer(); } diff --git a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java index f093a14327..9fbe3e6197 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java @@ -1,5 +1,6 @@ package com.fr.design.parameter; +import com.fr.design.dialog.BasicScrollPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormHierarchyTreePane; @@ -13,13 +14,12 @@ import java.awt.event.MouseEvent; public class ParameterPropertyPane extends JPanel{ private ParameterToolBarPane toolbarPane; - -// private JWorkBook workbook; + private BasicScrollPane basicScrollPane; private ParaDefinitePane paraPane; public static ParameterPropertyPane THIS; private boolean isEditing = false; - + public static final ParameterPropertyPane getInstance() { if(THIS == null) { THIS = new ParameterPropertyPane(); @@ -43,12 +43,26 @@ public class ParameterPropertyPane extends JPanel{ public ParameterPropertyPane() { toolbarPane = new ParameterToolBarPane(); + basicScrollPane = new BasicScrollPane() { + @Override + protected JPanel createContentPane() { + return toolbarPane; + } - initParameterListener(); + @Override + public void populateBean(Object ob) { + } + + @Override + protected String title4PopupWindow() { + return null; + } + }; + initParameterListener(); this.setLayout(new BorderLayout(0, 6)); this.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0)); - this.add(toolbarPane, BorderLayout.CENTER); + this.add(basicScrollPane, BorderLayout.CENTER); } private void setEditor(FormDesigner editor) { @@ -68,8 +82,9 @@ public class ParameterPropertyPane extends JPanel{ SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - if (paraPane.isWithQueryButton()) + if (paraPane.isWithQueryButton()) { paraPane.addingParameter2Editor(toolbarPane.getTargetParameter(parameterSelectedLabel)); + } else { paraPane.addingParameter2EditorWithQueryButton(toolbarPane.getTargetParameter(parameterSelectedLabel)); } diff --git a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java index aa7c11660a..b2e4762faa 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java @@ -11,7 +11,6 @@ import java.util.ArrayList; import javax.swing.BorderFactory; import com.fr.design.gui.ilable.UILabel; import javax.swing.SwingConstants; -import javax.swing.event.ChangeListener; import com.fr.base.Parameter; import com.fr.design.beans.BasicBeanPane; @@ -23,7 +22,7 @@ import com.fr.general.Inter; * @author: august * */ public class ParameterToolBarPane extends BasicBeanPane { - private Parameter[] parameterList; + public Parameter[] parameterList; private ArrayList parameterSelectedLabellist = new ArrayList(); private MouseListener paraMouseListner; private UIButton addAll; @@ -35,7 +34,6 @@ public class ParameterToolBarPane extends BasicBeanPane { private static final int GAP_BV = 4; private static final int BUTTON_HEIGHT = 20; private static final int WIDTH = 225; - private static final int L_H = 18; public ParameterToolBarPane() { @@ -133,7 +131,7 @@ public class ParameterToolBarPane extends BasicBeanPane { layoutContainer(parent); - int h= ((parameterSelectedLabellist.size() == 0) ? L_H : breakid * (BUTTON_HEIGHT + GAP_V) + GAP_BV + L_H + GAP_H + addAll.getPreferredSize().height); + int h= ((parameterSelectedLabellist.size() == 0) ? 0 : breakid * (BUTTON_HEIGHT + GAP_V) + GAP_BV + L_H + GAP_H + addAll.getPreferredSize().height); return new Dimension(w, h); } From 91d9eecc6e59d8a43fa2700dd448a113c011e6b9 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 19 Jan 2017 15:52:16 +0800 Subject: [PATCH 038/127] rt --- .../src/com/fr/design/parameter/ParameterPropertyPane.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java index 9fbe3e6197..01302299ea 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java @@ -84,8 +84,7 @@ public class ParameterPropertyPane extends JPanel{ public void run() { if (paraPane.isWithQueryButton()) { paraPane.addingParameter2Editor(toolbarPane.getTargetParameter(parameterSelectedLabel)); - } - else { + } else { paraPane.addingParameter2EditorWithQueryButton(toolbarPane.getTargetParameter(parameterSelectedLabel)); } } From 288464b55fa8b4f1ebb82e302aa03de8b3609087 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 19 Jan 2017 15:53:04 +0800 Subject: [PATCH 039/127] rt --- .../src/com/fr/design/parameter/ParameterToolBarPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java index b2e4762faa..cfae55b853 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java @@ -22,7 +22,7 @@ import com.fr.general.Inter; * @author: august * */ public class ParameterToolBarPane extends BasicBeanPane { - public Parameter[] parameterList; + private Parameter[] parameterList; private ArrayList parameterSelectedLabellist = new ArrayList(); private MouseListener paraMouseListner; private UIButton addAll; From a8716db31ac9eb4adde59c6c2bde94845e59d150 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Thu, 19 Jan 2017 16:00:48 +0800 Subject: [PATCH 040/127] rt --- .../com/fr/design/gui/icontainer/UIResizableContainer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 98fab75f0f..96eccfc595 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -5,6 +5,7 @@ import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.DesignerContext; import com.fr.stable.Constants; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.stable.collections.utils.MathUtils; import javax.swing.*; import java.awt.*; @@ -19,6 +20,7 @@ public class UIResizableContainer extends JPanel { private int preferredWidth = 240; private int toolPaneY = 300; private int toolPaneHeight = 10; + private int bottomHeight = 30; private JComponent upPane; private JComponent downPane; @@ -209,7 +211,7 @@ public class UIResizableContainer extends JPanel { if(isDownPaneVisible){ upPane.setBounds(0, 0, containerWidth - toolPaneHeight, toolPaneY); horizontToolPane.setBounds(0, toolPaneY, containerWidth - toolPaneHeight, toolPaneHeight); - downPane.setBounds(0, toolPaneY + toolPaneHeight, containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight-30); + downPane.setBounds(0, toolPaneY + toolPaneHeight, containerWidth - toolPaneHeight, parent.getHeight() - toolPaneY - toolPaneHeight - bottomHeight); verticalToolPane.setBounds(containerWidth - toolPaneHeight, 0, toolPaneHeight, getHeight()); }else{ upPane.setBounds(0, 0, containerWidth - toolPaneHeight, getHeight()); From 9421bfc288ff0198d933033ba6257568ed558fb6 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 19 Jan 2017 17:37:55 +0800 Subject: [PATCH 041/127] =?UTF-8?q?REPORT-1096=20=E5=8F=96=E8=89=B2?= =?UTF-8?q?=E6=9D=BF=3D>=E5=B0=86=E2=80=9C=E6=9C=80=E8=BF=91=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E9=A2=9C=E8=89=B2=E2=80=9D=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E7=9A=84=E8=89=B2=E5=9D=97=E6=94=B9=E4=B8=BA6=E4=B8=AA?= =?UTF-8?q?=EF=BC=9B=E4=BF=AE=E6=94=B9=E5=8F=96=E8=89=B2=20=E5=99=A8?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E8=83=8C=E6=99=AF=E4=B8=BA=E7=99=BD=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/style/color/ColorSelectPane.java | 2 +- .../style/color/CustomChooserPanel.java | 3 +- .../style/color/NewColorSelectPane.java | 2 +- .../style/color/PickColorButtonFactory.java | 48 +++++++++++++++---- .../fr/design/style/color/UsedColorPane.java | 16 ++++--- 5 files changed, 54 insertions(+), 17 deletions(-) diff --git a/designer_base/src/com/fr/design/style/color/ColorSelectPane.java b/designer_base/src/com/fr/design/style/color/ColorSelectPane.java index 851768f5a7..91d2b06dfb 100644 --- a/designer_base/src/com/fr/design/style/color/ColorSelectPane.java +++ b/designer_base/src/com/fr/design/style/color/ColorSelectPane.java @@ -111,7 +111,7 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7 // 最近使用 - UsedColorPane usedColorPane = new UsedColorPane(1, 8, 1, true, ColorSelectConfigManager.getInstance().getColors(),this); + UsedColorPane usedColorPane = new UsedColorPane(1, 8, 1, ColorSelectConfigManager.getInstance().getColors(), this, true, true); usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 8)); row1Pane.add(usedColorPane.getPane()); return row1Pane; diff --git a/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java b/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java index 21f23b783c..2f22a9f8f2 100644 --- a/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java +++ b/designer_base/src/com/fr/design/style/color/CustomChooserPanel.java @@ -21,6 +21,7 @@ import javax.swing.event.DocumentListener; import javax.swing.text.BadLocationException; import javax.swing.text.Document; +import com.fr.design.gui.ibutton.SpecialUIButton; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; @@ -706,7 +707,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec mainPanel.add(hexPanel, BorderLayout.SOUTH); JPanel rightPane = new JPanel(new BorderLayout()); - UIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON18, true); + SpecialUIButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON18, true); JPanel blankArea = new JPanel(); blankArea.setPreferredSize(new Dimension(100, 175)); rightPane.add(blankArea, BorderLayout.CENTER); diff --git a/designer_base/src/com/fr/design/style/color/NewColorSelectPane.java b/designer_base/src/com/fr/design/style/color/NewColorSelectPane.java index b8cff5cde5..b9903a81f3 100644 --- a/designer_base/src/com/fr/design/style/color/NewColorSelectPane.java +++ b/designer_base/src/com/fr/design/style/color/NewColorSelectPane.java @@ -85,7 +85,7 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable { row1Pane.setPreferredSize(new Dimension(135, 16)); // 宽度为 16 * 8 + 7 centerPane.add(row1Pane); // 最近使用 - usedColorPane = new UsedColorPane(1, 8, 1, true, ColorSelectConfigManager.getInstance().getColors(),this); + usedColorPane = new UsedColorPane(1, 8, 1, ColorSelectConfigManager.getInstance().getColors(), this, true, false); usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 8)); row1Pane.add(usedColorPane.getPane()); diff --git a/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java b/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java index 0eb28af751..e393609b91 100644 --- a/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java +++ b/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java @@ -1,7 +1,10 @@ package com.fr.design.style.color; import com.fr.base.BaseUtils; -import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.SpecialUIButton; + +import javax.swing.*; +import javax.swing.plaf.ButtonUI; import java.awt.*; import java.awt.event.*; @@ -9,22 +12,27 @@ import java.awt.event.*; * Created by plough on 2016/12/22. */ public class PickColorButtonFactory { + private static int iconSize; + private static IconType iconType; + private static Image iconImage; - public static UIButton getPickColorButton(ColorSelectable colorSelectable, IconType iconType) { + public static SpecialUIButton getPickColorButton(ColorSelectable colorSelectable, IconType iconType) { return getPickColorButton(colorSelectable, iconType, false); } - public static UIButton getPickColorButton(final ColorSelectable colorSelectable, IconType iconType, final Boolean setColorRealTime) { - UIButton pickColorButton = new UIButton(); + public static SpecialUIButton getPickColorButton(final ColorSelectable colorSelectable, IconType iconType, final boolean setColorRealTime) { + SpecialUIButton pickColorButton = new SpecialUIButton(new WhiteButtonUI()); + PickColorButtonFactory.iconType = iconType; if (iconType == IconType.ICON16) { - pickColorButton.setIcon(BaseUtils.readIcon("/com/fr/design/images/gui/colorPicker/colorPicker16.png")); - pickColorButton.setPreferredSize(new Dimension(16, 16)); + iconImage = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPicker16.png"); + iconSize = 16; } else { - pickColorButton.setIcon(BaseUtils.readIcon("/com/fr/design/images/gui/colorPicker/colorPicker18.png")); - pickColorButton.setPreferredSize(new Dimension(18, 18)); + iconImage = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPicker18.png"); + iconSize = 18; pickColorButton.setBorderPainted(false); } + pickColorButton.setPreferredSize(new Dimension(iconSize, iconSize)); pickColorButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); pickColorButton.addMouseListener(new MouseAdapter() { @@ -41,4 +49,28 @@ public class PickColorButtonFactory { public enum IconType { ICON16, ICON18 } + + private static class WhiteButtonUI extends ButtonUI { + @Override + public void paint(Graphics g, JComponent c) { + super.paint(g, c); + Dimension size = c.getSize(); + g.setColor(Color.white); + g.fillRoundRect(0, 0, size.width - 1, size.height - 1, 1, 1); + g.setColor(new Color(153, 153, 153)); // #999999 + g.drawRoundRect(0, 0, size.width - 1, size.height - 1, 1, 1); + if (iconType == IconType.ICON16) { + g.drawImage( + iconImage, + (size.width - iconImage.getWidth(null)) / 2, + (size.height - iconImage.getHeight(null)) / 2, + iconImage.getWidth(null), + iconImage.getHeight(null), + null + ); + } else { + g.drawImage(iconImage, 0, 0, iconSize, iconSize, null); + } + } + } } diff --git a/designer_base/src/com/fr/design/style/color/UsedColorPane.java b/designer_base/src/com/fr/design/style/color/UsedColorPane.java index 26e0915542..c8dfdcaece 100644 --- a/designer_base/src/com/fr/design/style/color/UsedColorPane.java +++ b/designer_base/src/com/fr/design/style/color/UsedColorPane.java @@ -7,7 +7,7 @@ import javax.swing.BorderFactory; import javax.swing.JPanel; import com.fr.design.dialog.BasicPane; -import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.SpecialUIButton; public class UsedColorPane extends BasicPane{ @@ -21,6 +21,8 @@ public class UsedColorPane extends BasicPane{ private int reserveCells; // 是否需要取色器按钮 private boolean needPickColorButton; + // 是否在取色时实时设定颜色 + private boolean setColorRealTime; // 最近使用颜色 private Object[] colors; // 最近使用面板 @@ -46,21 +48,23 @@ public class UsedColorPane extends BasicPane{ * @param rows 行 * @param columns 列 * @param reserveCells 留白的单元格个数 - * @param needPickColorButton 是否需要加上取色器按钮 * @param colors 最近使用的颜色 + * @param needPickColorButton 是否需要加上取色器按钮 + * @param setColorRealTime 取色器是否实时设定颜色 */ - public UsedColorPane(int rows,int columns,int reserveCells, boolean needPickColorButton, Object[] colors,ColorSelectable selectable){ + public UsedColorPane(int rows,int columns,int reserveCells, Object[] colors, ColorSelectable selectable, boolean needPickColorButton, boolean setColorRealTime){ this.columns = columns; this.rows = rows; this.reserveCells = reserveCells; - this.needPickColorButton = needPickColorButton; this.colors = colors; this.selectable = selectable; + this.needPickColorButton = needPickColorButton; + this.setColorRealTime = setColorRealTime; initialComponents(); } public UsedColorPane(int rows,int columns, Object[] colors,ColorSelectable selectable){ - this(rows, columns, 0, false, colors, selectable); + this(rows, columns, 0, colors, selectable, false, false); } private void initialComponents(){ @@ -74,7 +78,7 @@ public class UsedColorPane extends BasicPane{ int i = 0; if (needPickColorButton) { // 取色按钮 - UIButton pickColorButton = PickColorButtonFactory.getPickColorButton(selectable, PickColorButtonFactory.IconType.ICON16, true); + SpecialUIButton pickColorButton = PickColorButtonFactory.getPickColorButton(selectable, PickColorButtonFactory.IconType.ICON16, setColorRealTime); panel.add(pickColorButton); i++; this.reserveCells += 1; From 01aa1c39567159fa6c67a478322a4b1d78b0ed97 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 23 Jan 2017 11:47:49 +0800 Subject: [PATCH 042/127] =?UTF-8?q?=E4=BD=BF=E7=94=A8GraphHelper=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=B4=E6=97=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/report/ReportColumnsPane.java | 4 +++- .../fr/design/widget/ui/CustomWritableRepeatEditorPane.java | 2 +- .../src/com/fr/design/widget/ui/FieldEditorDefinePane.java | 3 ++- .../src/com/fr/design/write/submit/CustomJobPane.java | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/design/report/ReportColumnsPane.java b/designer/src/com/fr/design/report/ReportColumnsPane.java index 1cf8f27bcd..4646b88b66 100644 --- a/designer/src/com/fr/design/report/ReportColumnsPane.java +++ b/designer/src/com/fr/design/report/ReportColumnsPane.java @@ -20,6 +20,7 @@ import javax.swing.SwingConstants; import com.fr.base.BaseUtils; import com.fr.base.FRContext; +import com.fr.base.GraphHelper; import com.fr.base.GraphHelper2; import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UITitledBorder; @@ -114,7 +115,8 @@ public class ReportColumnsPane extends BasicPane{ FRFont uiLableFont = FRFont.getInstance(FONT_NAME, Font.PLAIN, FONT_SIZE); uiLabel.setFont(uiLableFont); uiLabel.setHorizontalAlignment(SwingConstants.CENTER); - int uiLabelWidth = GraphHelper2.locTextStringWidth("FR-Designer_ReportColumns-Columns", uiLableFont); + int uiLabelWidth = GraphHelper.getLocTextWidth("FR-Designer_ReportColumns-Columns", uiLableFont); + uiLabel.setPreferredSize(new Dimension(uiLabelWidth, 20)); north.add(uiLabel,BorderLayout.WEST); JPanel buttonGroupPane = new JPanel(new FlowLayout(FlowLayout.CENTER, 23,11)); diff --git a/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java index 69bba23c62..3c36e27aff 100644 --- a/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java @@ -1 +1 @@ -package com.fr.design.widget.ui; import com.fr.base.GraphHelper2; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(GraphHelper2.locTextStringWidth("Form-Allow_CustomData") + 30, 30)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } \ No newline at end of file +package com.fr.design.widget.ui; import com.fr.base.GraphHelper; import com.fr.base.GraphHelper2; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30, 30)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java index fe69628131..dd00466471 100644 --- a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java @@ -6,6 +6,7 @@ import java.awt.event.ItemListener; import javax.swing.*; +import com.fr.base.GraphHelper; import com.fr.base.GraphHelper2; import com.fr.design.gui.ilable.UILabel; @@ -50,7 +51,7 @@ public abstract class FieldEditorDefinePane extends Abstr //JPanel firstPanel = FRGUIPaneFactory.createBorderLayout_M_Pane(); allowBlankCheckBox = new UICheckBox(Inter.getLocText("Allow_Blank")); - allowBlankCheckBox.setPreferredSize(new Dimension(GraphHelper2.locTextStringWidth("Allow_Blank") + 30, 30)); + allowBlankCheckBox.setPreferredSize(new Dimension(GraphHelper.getLocTextWidth("Allow_Blank") + 30, 30)); allowBlankCheckBox.addItemListener(new ItemListener() { @Override 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 a520feb794..ad3913f9a8 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.base.GraphHelper; import com.fr.base.GraphHelper2; 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("Select")); browserButton.setPreferredSize(new Dimension( GraphHelper2.locTextStringWidth("Select") + 20, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( GraphHelper2.locTextStringWidth("Edit") + 20, 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("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.isEmpty(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.base.GraphHelper; import com.fr.base.GraphHelper2; 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("Select")); browserButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Select") + 20, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Edit") + 20, 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("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.isEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file From c84e090002b4c712b0687b89e00be19195d02def Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 23 Jan 2017 11:51:59 +0800 Subject: [PATCH 043/127] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/report/ReportColumnsPane.java | 2 -- .../com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java | 2 +- designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java | 1 - designer_base/src/com/fr/design/write/submit/CustomJobPane.java | 2 +- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/report/ReportColumnsPane.java b/designer/src/com/fr/design/report/ReportColumnsPane.java index 4646b88b66..be80e744bf 100644 --- a/designer/src/com/fr/design/report/ReportColumnsPane.java +++ b/designer/src/com/fr/design/report/ReportColumnsPane.java @@ -19,9 +19,7 @@ import javax.swing.SpinnerNumberModel; import javax.swing.SwingConstants; import com.fr.base.BaseUtils; -import com.fr.base.FRContext; import com.fr.base.GraphHelper; -import com.fr.base.GraphHelper2; import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UITitledBorder; import com.fr.design.dialog.BasicPane; diff --git a/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java index 3c36e27aff..3ff1fc23cb 100644 --- a/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java @@ -1 +1 @@ -package com.fr.design.widget.ui; import com.fr.base.GraphHelper; import com.fr.base.GraphHelper2; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30, 30)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } \ No newline at end of file +package com.fr.design.widget.ui; import com.fr.base.GraphHelper; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30, 30)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java index dd00466471..47b87898ac 100644 --- a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java @@ -7,7 +7,6 @@ import java.awt.event.ItemListener; import javax.swing.*; import com.fr.base.GraphHelper; -import com.fr.base.GraphHelper2; import com.fr.design.gui.ilable.UILabel; import javax.swing.event.DocumentEvent; 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 ad3913f9a8..4a6e3be9f3 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.base.GraphHelper; import com.fr.base.GraphHelper2; 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("Select")); browserButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Select") + 20, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Edit") + 20, 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("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.isEmpty(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.base.GraphHelper; 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("Select")); browserButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Select") + 20, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Edit") + 20, 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("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.isEmpty(classNameTextField.getText())); } /** * 重置 */ public void reset() { this.classNameTextField.setText(null); this.checkAddButtonEnable(); } } \ No newline at end of file From 37b9b4fcb914b0b29418e095d90d398942e25dce Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 23 Jan 2017 15:20:24 +0800 Subject: [PATCH 044/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E3=80=82=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/webattr/PageWebSettingPane.java | 10 +++--- .../ui/CustomWritableRepeatEditorPane.java | 2 +- .../widget/ui/FieldEditorDefinePane.java | 33 ++++++++++++------- .../com/fr/design/actions/help/AboutPane.java | 6 ++-- .../fr/design/gui/ibutton/UIColorButton.java | 3 +- .../com/fr/design/locale/designer.properties | 10 +++++- .../design/locale/designer_en_US.properties | 8 +++++ .../design/locale/designer_ja_JP.properties | 8 +++++ .../design/locale/designer_ko_KR.properties | 10 +++++- .../design/locale/designer_zh_CN.properties | 8 +++++ .../design/locale/designer_zh_TW.properties | 8 +++++ .../style/color/PickColorButtonFactory.java | 6 ++-- .../fr/design/write/submit/CustomJobPane.java | 2 +- 13 files changed, 88 insertions(+), 26 deletions(-) diff --git a/designer/src/com/fr/design/webattr/PageWebSettingPane.java b/designer/src/com/fr/design/webattr/PageWebSettingPane.java index 203ace1af7..ee415da68c 100644 --- a/designer/src/com/fr/design/webattr/PageWebSettingPane.java +++ b/designer/src/com/fr/design/webattr/PageWebSettingPane.java @@ -45,15 +45,15 @@ public class PageWebSettingPane extends WebSettingPane { JPanel buttonpane = new JPanel(FRGUIPaneFactory.createBoxFlowLayout()); buttonpane.add(centerRadioButton); buttonpane.add(leftRadioButton); - isShowAsImageBox = new UICheckBox(Inter.getLocText("Is_Paint_Page")); - isAutoScaleBox = new UICheckBox(Inter.getLocText("IS_Auto_Scale")); - isTDHeavyBox = new UICheckBox(Inter.getLocText("IS_TD_HEAVY_EXPORT"), false); + isShowAsImageBox = new UICheckBox(Inter.getLocText("FR-Designer_Is_Paint_Page")); + isAutoScaleBox = new UICheckBox(Inter.getLocText("FR-Designer_IS_Auto_Scale")); + isTDHeavyBox = new UICheckBox(Inter.getLocText("FR-Designer_IS_TD_HEAVY_EXPORT"), false); double p = TableLayout.PREFERRED; double[] columnSize = { p,p,p}; double[] rowSize = { p, p,p,p }; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Report_Show_Location") + ":", UILabel.RIGHT), buttonpane,null}, - new Component[]{new UILabel(Inter.getLocText("PageSetup-Page") + ":", UILabel.RIGHT), isShowAsImageBox, isAutoScaleBox}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Report_Show_Location") + ":", UILabel.RIGHT), buttonpane,null}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_PageSetup_Page") + ":", UILabel.RIGHT), isShowAsImageBox, isAutoScaleBox}, new Component[]{null, isTDHeavyBox, null} }; diff --git a/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java index 3ff1fc23cb..64e8546010 100644 --- a/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/CustomWritableRepeatEditorPane.java @@ -1 +1 @@ -package com.fr.design.widget.ui; import com.fr.base.GraphHelper; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30, 30)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } \ No newline at end of file +package com.fr.design.widget.ui; import com.fr.base.GraphHelper; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; private static final int CUSTOM_DATA_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30; private static final int CUSTOM_DATA_CHECK_BOX_HEIGHT = 30; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(CUSTOM_DATA_CHECK_BOX_WIDTH, CUSTOM_DATA_CHECK_BOX_HEIGHT)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{this.customDataCheckBox}, FlowLayout.LEFT, 5)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java index 47b87898ac..34c355f511 100644 --- a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java @@ -20,6 +20,8 @@ import com.fr.form.ui.FieldEditor; import com.fr.general.Inter; public abstract class FieldEditorDefinePane extends AbstractDataModify { + private static final int ALLOW_BLANK_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("FR-Designer_Allow_Blank") + 30; + private static final int ALLOW_BLANK_CHECK_BOX_HEIGHT = 30; private UICheckBox allowBlankCheckBox; // richer:错误信息,是所有控件共有的属性,所以放到这里来 private UITextField errorMsgTextField; @@ -33,6 +35,24 @@ public abstract class FieldEditorDefinePane extends Abstr protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8)); + + initRegErrorMsgTextField(); + + //JPanel firstPanel = FRGUIPaneFactory.createBorderLayout_M_Pane(); + allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Blank")); + allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT)); + allowBlankCheckBox.addItemListener(new ItemListener() { + + @Override + public void itemStateChanged(ItemEvent e) { + errorMsgTextField.setEnabled(!allowBlankCheckBox.isSelected()); + } + }); + + initErrorMsgPane(); + } + + protected void initRegErrorMsgTextField() { regErrorMsgTextField = new UITextField(16); regErrorMsgTextField.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { @@ -47,18 +67,9 @@ public abstract class FieldEditorDefinePane extends Abstr regErrorMsgTextField.setToolTipText(regErrorMsgTextField.getText()); } }); + } - //JPanel firstPanel = FRGUIPaneFactory.createBorderLayout_M_Pane(); - allowBlankCheckBox = new UICheckBox(Inter.getLocText("Allow_Blank")); - allowBlankCheckBox.setPreferredSize(new Dimension(GraphHelper.getLocTextWidth("Allow_Blank") + 30, 30)); - allowBlankCheckBox.addItemListener(new ItemListener() { - - @Override - public void itemStateChanged(ItemEvent e) { - errorMsgTextField.setEnabled(!allowBlankCheckBox.isSelected()); - } - }); - + protected void initErrorMsgPane() { // 错误信息 JPanel errorMsgPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); errorMsgPane.add(new UILabel(Inter.getLocText(new String[]{"Error", "Tooltips"}) + ":")); diff --git a/designer_base/src/com/fr/design/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index d15bc01862..4249b26346 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -73,7 +73,7 @@ public class AboutPane extends JPanel { // do nothing } else { if(ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)){ - boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("Service_Phone") + ProductConstants.COMPARE_TELEPHONE); + boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + ProductConstants.COMPARE_TELEPHONE); contentPane.add(boxCenterAlignmentPane); } boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ:" + SiteCenter.getInstance().acquireUrlByKind("help.qq")); @@ -110,12 +110,12 @@ public class AboutPane extends JPanel { } private String getCopyRight(){ - return append(Inter.getLocText("About-CopyRight"), COPYRIGHT_LABEL, + return append(Inter.getLocText("FR-Designer_About_CopyRight"), COPYRIGHT_LABEL, ProductConstants.HISTORY, StringUtils.BLANK, ProductConstants.COMPANY_NAME); } private String getBuildTitle() { - return append(ProductConstants.APP_NAME, Inter.getLocText("About-Version"), + return append(ProductConstants.APP_NAME, Inter.getLocText("FR-Designer_About_Version"), StringUtils.BLANK, ProductConstants.RELEASE_VERSION, BUILD_PREFIX); } diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java b/designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java index 283b2e1127..dcc44f6307 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIColorButton.java @@ -30,6 +30,7 @@ public class UIColorButton extends UIButton implements PopupHider, UIObserver, G private static final int SIZE_2 = 2; private static final int SIZE_4 = 4; private static final int SIZE_6 = 6; + private static final int POPUP_MENU_SHIFT = -70; private Color color = Color.BLACK; private ColorControlWindow popupWin; private EventListenerList colorChangeListenerList = new EventListenerList(); @@ -126,7 +127,7 @@ public class UIColorButton extends UIButton implements PopupHider, UIObserver, G popupWin = this.getColorControlWindow(); - GUICoreUtils.showPopupMenu(popupWin, this, -70, this.getSize().height); + GUICoreUtils.showPopupMenu(popupWin, this, POPUP_MENU_SHIFT, this.getSize().height); } /** diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index e7671b67f3..3f809fb4a7 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -530,4 +530,12 @@ FR-Designer_setCarousel= FR-Designer_carouselInterval= FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= -FR-Designer_Mouse_Click_Tips= \ No newline at end of file +FR-Designer_Mouse_Click_Tips= +FR-Designer_About_Version=Version +FR-Designer_About_CopyRight=Copy Right +FR-Designer_Service_Phone=Service Phone +FR-Designer_Allow_Blank=Allow Blank +FR-Designer_PageSetup_Page=Page +FR-Designer_Custom_Job_Description=Description +FR-Designer_Property=Property +FR-Designer_ClassName=Class Name \ 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 3b86315877..30db869a26 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 @@ -531,3 +531,11 @@ FR-Designer_carouselInterval= FR-Designer_Initial_Background_Tips=Initial background of the button FR-Designer_Mouse_Move_Tips=Move the mouse to the button on the background, in the absence of not changing the background FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background +FR-Designer_About_Version=Version +FR-Designer_About_CopyRight=Copy Right +FR-Designer_Service_Phone=Service Phone +FR-Designer_Allow_Blank=Allow Null +FR-Designer_PageSetup_Page=Page +FR-Designer_Custom_Job_Description=Description +FR-Designer_Property=Property +FR-Designer_ClassName=Class Name 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 b1df09da5c..ba61149555 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 @@ -510,3 +510,11 @@ FR-Designer_carouselInterval= FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= FR-Designer_Mouse_Click_Tips= +FR-Designer_About_Version=\u30D0\u30FC\u30B8\u30E7\u30F3 +FR-Designer_About_CopyRight=\u8457\u4F5C\u6A29\u6240\u6709 +FR-Designer_Service_Phone=\u30B5\u30FC\u30D3\u30B9\u96FB\u8A71\uFF1A +FR-Designer_Allow_Blank=\u7A7A\u6B04\u3042\u308A +FR-Designer_PageSetup_Page=\u30DA\u30FC\u30B8 +FR-Designer_Custom_Job_Description=\u8A18\u8FF0 +FR-Designer_Property=\u5C5E\u6027 +FR-Designer_ClassName=\u985E\u540D 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 2a227f806f..9d540cd01c 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 @@ -504,4 +504,12 @@ FR-Designer_setCarousel= FR-Designer_carouselInterval= FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= -FR-Designer_Mouse_Click_Tips= \ No newline at end of file +FR-Designer_Mouse_Click_Tips= +FR-Designer_About_Version=\uBC84\uC804 +FR-Designer_About_CopyRight=\uD310\uAD8C\uC18C\uC720 +FR-Designer_Service_Phone=\uC11C\uBE44\uC2A4\uC804\uD654\uFF1A +FR-Designer_Allow_Blank=\uBE48\uCE78\uD5C8\uC6A9 +FR-Designer_PageSetup_Page=\uC6F9\uD398\uC774\uC9C0 +FR-Designer_Custom_Job_Description=\uC124\uBA85 +FR-Designer_Property=\uC18D\uC131 +FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 \ 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 424367a4bc..54f0ac177a 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 @@ -535,4 +535,12 @@ FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694 FR-Designer_Initial_Background_Tips=\u6309\u94AE\u7684\u521D\u59CB\u80CC\u666F FR-Designer_Mouse_Move_Tips=\u9F20\u6807\u79FB\u52A8\u5230\u6309\u94AE\u4E0A\u7684\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F +FR-Designer_About_Version=\u7248\u672C +FR-Designer_About_CopyRight=\u7248\u6743\u6240\u6709 +FR-Designer_Service_Phone=\u670D\u52A1\u7535\u8BDD\uFF1A +FR-Designer_Allow_Blank=\u5141\u8BB8\u4E3A\u7A7A +FR-Designer_PageSetup_Page=\u9875\u9762 +FR-Designer_Custom_Job_Description=\u63CF\u8FF0 +FR-Designer_Property=\u5C5E\u6027 +FR-Designer_ClassName=\u7C7B\u540D 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 0d8c6327a9..2711507295 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 @@ -523,3 +523,11 @@ FR-Designer_carouselInterval= FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= FR-Designer_Mouse_Click_Tips= +FR-Designer_About_Version=\u7248\u672C +FR-Designer_About_CopyRight=\u7248\u6B0A\u6240\u6709 +FR-Designer_Service_Phone=\u670D\u52D9\u96FB\u8A71\uFF1A +FR-Designer_Allow_Blank=\u5141\u8A31\u70BA\u7A7A\u767D +FR-Designer_PageSetup_Page=\u9801\u9762 +FR-Designer_Custom_Job_Description=\u63CF\u8FF0 +FR-Designer_Property=\u5C6C\u6027 +FR-Designer_ClassName=\u985E\u540D diff --git a/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java b/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java index e393609b91..19d0c86ee9 100644 --- a/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java +++ b/designer_base/src/com/fr/design/style/color/PickColorButtonFactory.java @@ -13,6 +13,8 @@ import java.awt.event.*; */ public class PickColorButtonFactory { private static int iconSize; + private static final int SIZE_16 = 16; + private static final int SIZE_18 = 18; private static IconType iconType; private static Image iconImage; @@ -26,10 +28,10 @@ public class PickColorButtonFactory { if (iconType == IconType.ICON16) { iconImage = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPicker16.png"); - iconSize = 16; + iconSize = SIZE_16; } else { iconImage = BaseUtils.readImage("/com/fr/design/images/gui/colorPicker/colorPicker18.png"); - iconSize = 18; + iconSize = SIZE_18; pickColorButton.setBorderPainted(false); } pickColorButton.setPreferredSize(new Dimension(iconSize, iconSize)); 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 4a6e3be9f3..d9368d87dd 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.base.GraphHelper; 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("Select")); browserButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Select") + 20, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("Edit")); editButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("Edit") + 20, 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("ClassName"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("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.isEmpty(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.base.GraphHelper; 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")); browserButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("FR-Designer_Select") + 20, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("FR-Designer_Edit")); editButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("FR-Designer_Edit") + 20, 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"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-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.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Custom_Job_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 From 8574411195c39649057321050a666ab957298aba Mon Sep 17 00:00:00 2001 From: zhouping Date: Mon, 23 Jan 2017 15:46:11 +0800 Subject: [PATCH 045/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20tab?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E6=94=B9=E8=89=AF=E4=BB=A3=E7=A0=81=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=20release=E5=90=8C=E6=AD=A5=E5=88=B0dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardSwitchButton.java | 102 ++++++++++++------ .../creator/cardlayout/XWCardLayout.java | 35 +++--- .../creator/cardlayout/XWTabFitLayout.java | 43 ++++++-- 3 files changed, 122 insertions(+), 58 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index 28c5e33e3f..077f118c02 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -12,6 +12,7 @@ import javax.swing.*; import com.fr.base.BaseUtils; import com.fr.base.GraphHelper; +import com.fr.base.ScreenResolution; import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; @@ -46,6 +47,7 @@ public class XCardSwitchButton extends XButton { //设置的图片类型 private static final String COLORBACKGROUNDTYPE = "ColorBackground"; private static final String DEFAULTTYPE = "default"; + private static final String DEFAULT_FONT_NAME = "SimSun"; //默认颜色 public static final Color NORMAL_GRAL = new Color(236,236,236); @@ -64,13 +66,14 @@ public class XCardSwitchButton extends XButton { private static final int FONT_SIZE_ADJUST = 2; private static final int SIDE_OFFSET = 57; - private static final int HEIGHT_OFFSET = 25; + private static final int FONT_SIZE = 9; private XWCardLayout cardLayout; private XWCardTagLayout tagLayout; private Background selectBackground; private boolean isCustomStyle; + private UILabel label; private Icon closeIcon = MOUSE_COLSE; @@ -106,6 +109,14 @@ public class XCardSwitchButton extends XButton { this.selectBackground = selectBackground; } + public UILabel getLabel() { + return label; + } + + public void setLabel(UILabel label) { + this.label = label; + } + public XCardSwitchButton(CardSwitchButton widget, Dimension initSize) { super(widget, initSize); } @@ -158,12 +169,13 @@ public class XCardSwitchButton extends XButton { //将当前tab按钮改为选中状态 changeButtonState(index); - + // 切换到当前tab按钮对应的tabFitLayout XWTabFitLayout tabFitLayout = (XWTabFitLayout) cardLayout.getComponent(index); - tabFitLayout.setxCardSwitchButton(this); + XCardSwitchButton xCardSwitchButton = (XCardSwitchButton) this.tagLayout.getComponent(index); + tabFitLayout.setxCardSwitchButton(xCardSwitchButton); selectionModel.setSelectedCreator(tabFitLayout); - + if (editingMouseListener.stopEditing()) { ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this); @@ -241,7 +253,9 @@ public class XCardSwitchButton extends XButton { Point position = button.getLocation(); int width = button.getWidth(); int height = button.getHeight(); - + + ey = ey % DEFAULT_BUTTON_HEIGHT; + // 鼠标进入按钮右侧删除图标区域 double recX = position.getX() + (width - RIGHT_OFFSET); double recY = position.getY() + (height - TOP_OFFSET); @@ -307,7 +321,10 @@ public class XCardSwitchButton extends XButton { // 标题部分 WidgetTitle title = style.getTitle(); - FRFont font = title.getFrFont(); + FRFont font = button.getFont(); + if (font == null) { + font = FRFont.getInstance(DEFAULT_FONT_NAME, 0, FONT_SIZE); + } FRFont newFont = FRFont.getInstance(font.getName(),font.getStyle(),font.getSize() + FONT_SIZE_ADJUST); UILabel label = this.getContentLabel(); label.setFont(newFont); @@ -327,6 +344,12 @@ public class XCardSwitchButton extends XButton { //删除tab布局 private void deleteTabLayout(SelectionModel selectionModel,FormDesigner designer){ + String titleName = this.getContentLabel().getText(); + int value = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer_ConfirmDialog_Content") + "“" + titleName + "”", + Inter.getLocText("FR-Designer_ConfirmDialog_Title"),JOptionPane.YES_NO_OPTION); + if (value != JOptionPane.OK_OPTION) { + return; + } XLayoutContainer mainLayout = this.cardLayout.getBackupParent(); if(mainLayout != null){ selectionModel.setSelectedCreator(mainLayout); @@ -341,32 +364,32 @@ public class XCardSwitchButton extends XButton { public XLayoutContainer getTopLayout() { return this.getBackupParent().getTopLayout(); } - - public void setTabsAndAdjust() { - if (this.tagLayout == null) { - return; - } - int tabLength = this.tagLayout.getComponentCount(); - Map cardWidth = new HashMap<>(); - Map cardHeight = new HashMap<>(); - for (int i = 0; i < tabLength; i++) { - XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); - CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); - String tempText = tempCard.getText(); - Font f = ((CardSwitchButton)this.toData()).getFont(); + + public void setTabsAndAdjust() { + if (this.tagLayout == null) { + return; + } + int tabLength = this.tagLayout.getComponentCount(); + Map cardWidth = new HashMap<>(); + Map cardHeight = new HashMap<>(); + for (int i = 0; i < tabLength; i++) { + XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); + CardSwitchButton tempCard = (CardSwitchButton) temp.toData(); + String tempText = tempCard.getText(); + Font f = tempCard.getFont(); FontMetrics fm = GraphHelper.getFontMetrics(f); - cardWidth.put(i,fm.stringWidth(tempText)); - cardHeight.put(i,fm.getHeight()); - } - adjustTabs(tabLength, cardWidth, cardHeight); - } - - public void adjustTabs(int tabLength, Map width, Map height) { + cardWidth.put(i,fm.stringWidth(tempText)); + cardHeight.put(i,fm.getHeight()); + } + adjustTabs(tabLength, cardWidth, cardHeight); + } + + public void adjustTabs(int tabLength, Map width, Map height) { if (width == null) { return; } - int tempX = 0; - for (int i = 0; i < tabLength; i++) { + int tempX = 0; + for (int i = 0; i < tabLength; i++) { Rectangle rectangle = this.tagLayout.getComponent(i).getBounds(); Integer cardWidth = width.get(i) + SIDE_OFFSET; //先用这边的固定高度 @@ -378,17 +401,30 @@ public class XCardSwitchButton extends XButton { Dimension dimension = new Dimension(); dimension.setSize(cardWidth, cardHeight); XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); + CardSwitchButton cardSwitchButton = (CardSwitchButton) temp.toData(); + FRFont frFont = cardSwitchButton.getFont(); + if (frFont == null) { + frFont = FRFont.getInstance(DEFAULT_FONT_NAME, 0, FONT_SIZE); + } UILabel label = temp.getContentLabel(); label.setSize(dimension); + label.setFont(frFont.applyResolutionNP(ScreenResolution.getScreenResolution())); + label.setForeground(frFont.getForeground()); temp.setContentLabel(label); temp.setSize(dimension); temp.setPreferredSize(new Dimension(cardWidth, cardHeight)); - } - } + } + } + + @Override + public void doLayout() { + super.doLayout(); + setTabsAndAdjust(); + } @Override - public void doLayout() { - super.doLayout(); - setTabsAndAdjust(); + protected void initXCreatorProperties() { + super.initXCreatorProperties(); + label = this.getContentLabel(); } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index ac929a1635..876eaa34ee 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -270,35 +270,34 @@ public class XWCardLayout extends XLayoutContainer { public boolean hasTitleStyle() { return true; } - - + /** - * 得到属性名 + * 得到属性名 * @return 属性名 - * @throws IntrospectionException - */ + * @throws IntrospectionException + */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel(); + CRPropertyDescriptor[] crp = null; return ArrayUtils.addAll(getDefaultDescriptor(), crp); } public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException { return new CRPropertyDescriptor[] { new CRPropertyDescriptor("carousel", this.data.getClass()) - .setEditorClass(BooleanEditor.class) - .setI18NName(Inter.getLocText("FR-Designer_setCarousel")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") - .setPropertyChangeListener(new PropertyChangeAdapter() { - @Override - public void propertyChange() { - designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); - designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); - } + .setEditorClass(BooleanEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_setCarousel")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") + .setPropertyChangeListener(new PropertyChangeAdapter() { + @Override + public void propertyChange() { + designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); + } }), new CRPropertyDescriptor("carouselInterval", this.data.getClass()) - .setEditorClass(DoubleEditor.class) - .setI18NName(Inter.getLocText("FR-Designer_carouselInterval")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") + .setEditorClass(DoubleEditor.class) + .setI18NName(Inter.getLocText("FR-Designer_carouselInterval")) + .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "FR-Designer_Tab_carousel") }; } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index d772e3b453..db60701785 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -5,6 +5,7 @@ import java.beans.IntrospectionException; import javax.swing.border.Border; +import com.fr.base.ScreenResolution; import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRTabFitLayoutAdapter; @@ -15,6 +16,7 @@ import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.fun.WidgetPropertyUIProvider; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormHierarchyTreePane; import com.fr.design.mainframe.widget.editors.ButtonTypeEditor; @@ -43,6 +45,9 @@ public class XWTabFitLayout extends XWFitLayout { // tab布局在拖拽导致的缩放里(含间隔时),如果拖拽宽高大于组件宽高,会导致调整的时候找不到原来的组件 // 这里先将拖拽之前的宽高先做备份 private static final Color NORMAL_GRAL = new Color(236,236,236); + private static final String DEFAULT_FONT_NAME = "SimSun"; + public final static Font DEFAULTFT = new Font("Song_TypeFace",0,12); + public final static FRFont DEFAULT_FRFT = FRFont.getInstance(DEFAULT_FONT_NAME, 0, 9); private Dimension referDim; private Background initialBackground; private Background overBackground; @@ -106,15 +111,14 @@ public class XWTabFitLayout extends XWFitLayout { public XWTabFitLayout(WTabFitLayout widget, Dimension initSize) { super(widget, initSize); } - + /** - * 得到属性名 + * 得到属性名 * @return 属性名 - * @throws IntrospectionException - */ + * @throws IntrospectionException + */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - checkButonType(); - CRPropertyDescriptor[] crp = ((WTabFitLayout) data).isCustomStyle() ? getisCustomStyle() : getisnotCustomStyle(); + CRPropertyDescriptor[] crp = null; return ArrayUtils.addAll(defaultDescriptor(), crp); } @@ -164,6 +168,13 @@ public class XWTabFitLayout extends XWFitLayout { new PropertyChangeAdapter() { @Override public void propertyChange() { + font = ((WTabFitLayout) data).getFont(); + CardSwitchButton cardSwitchButton = (CardSwitchButton) xCardSwitchButton.toData(); + cardSwitchButton.setFont(font); + UILabel uiLabel = xCardSwitchButton.getLabel(); + uiLabel.setFont(font.applyResolutionNP(ScreenResolution.getScreenResolution())); + uiLabel.setForeground(font.getForeground()); + xCardSwitchButton.setLabel(uiLabel); } }), }; @@ -220,16 +231,34 @@ public class XWTabFitLayout extends XWFitLayout { boolean isStyle = ((WTabFitLayout) data).isCustomStyle(); Background bg; bg = ColorBackground.getInstance(NORMAL_GRAL); + CardSwitchButton cardSwitchButton = (CardSwitchButton) this.xCardSwitchButton.toData(); if (!isStyle) { this.xCardSwitchButton.setCustomStyle(false); this.xCardSwitchButton.setSelectBackground(bg); + this.xCardSwitchButton.getLabel().setFont(DEFAULTFT); + cardSwitchButton.setInitialBackground(null); + cardSwitchButton.setClickBackground(null); + cardSwitchButton.setOverBackground(null); + cardSwitchButton.setFont(DEFAULT_FRFT); } else { - CardSwitchButton cardSwitchButton = (CardSwitchButton) this.xCardSwitchButton.toData(); Background initialBackground = cardSwitchButton.getInitialBackground(); bg = initialBackground == null ? bg : initialBackground; this.xCardSwitchButton.setSelectBackground(bg); this.xCardSwitchButton.setCustomStyle(true); cardSwitchButton.setCustomStyle(true); + if (font != null) { + cardSwitchButton.setFont(font); + } + if (this.initialBackground != null){ + this.xCardSwitchButton.setSelectBackground(this.initialBackground); + cardSwitchButton.setInitialBackground(this.initialBackground); + } + if (this.overBackground != null){ + cardSwitchButton.setOverBackground(this.overBackground); + } + if (this.clickBackground != null) { + cardSwitchButton.setClickBackground(this.clickBackground); + } } } From 46fea4a4b3cc9f8b00977d7534aff44945482bd8 Mon Sep 17 00:00:00 2001 From: zhouping Date: Sat, 4 Feb 2017 17:28:07 +0800 Subject: [PATCH 046/127] =?UTF-8?q?REPORT-1814=20=E8=A1=A8=E5=8D=95tab?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=94=B9=E8=89=AFbug=201.=E6=94=BE=E5=BC=80?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=B1=8F=E8=94=BD=202.=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=90=8E=E5=8F=B0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/cardlayout/XWCardLayout.java | 2 +- .../designer/creator/cardlayout/XWTabFitLayout.java | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 876eaa34ee..3f16860140 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -277,7 +277,7 @@ public class XWCardLayout extends XLayoutContainer { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - CRPropertyDescriptor[] crp = null; + CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel(); return ArrayUtils.addAll(getDefaultDescriptor(), crp); } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index db60701785..f4cac3e15c 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -30,6 +30,7 @@ import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; import com.fr.general.FRFont; +import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.core.PropertyChangeAdapter; @@ -118,7 +119,8 @@ public class XWTabFitLayout extends XWFitLayout { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - CRPropertyDescriptor[] crp = null; + checkButonType(); + CRPropertyDescriptor[] crp = ((WTabFitLayout) data).isCustomStyle() ? getisCustomStyle() : getisnotCustomStyle(); return ArrayUtils.addAll(defaultDescriptor(), crp); } @@ -226,6 +228,12 @@ public class XWTabFitLayout extends XWFitLayout { private void checkButonType() { if (this.xCardSwitchButton == null) { + //假如为空,默认获取第一个tab的cardBtn属性 + try { + xCardSwitchButton = (XCardSwitchButton) ((XWCardMainBorderLayout) this.getTopLayout()).getTitlePart().getTagPart().getComponent(0); + }catch (Exception e){ + FRLogger.getLogger().error(e.getMessage()); + } return; } boolean isStyle = ((WTabFitLayout) data).isCustomStyle(); From 81aba4b52a187506abf63ae742b8aa116132503c Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 6 Feb 2017 13:50:49 +0800 Subject: [PATCH 047/127] =?UTF-8?q?REPORT-1415=20=E5=B0=86=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E9=87=8C=E7=94=A8finereport=E5=90=8E=E7=BC=80?= =?UTF-8?q?=E7=9A=84=E6=94=B9=E6=88=90fanruan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/actions/help/AboutPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index 4249b26346..c703306b22 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -81,7 +81,7 @@ public class AboutPane extends JPanel { } BoxCenterAligmentPane actionLabel = getURLActionLabel(ProductConstants.WEBSITE_URL); - BoxCenterAligmentPane emailLabel = getEmailActionLabel(ProductConstants.SUPPORT_EMAIL); + BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("register.email", ProductConstants.SUPPORT_EMAIL)); contentPane.add(actionLabel); contentPane.add(emailLabel); From 97d52818037e269e6977fb2c9cfe82e0a2ecebc5 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 6 Feb 2017 14:04:59 +0800 Subject: [PATCH 048/127] =?UTF-8?q?REPORT-1415=20=E5=B0=86=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E9=87=8C=E7=94=A8finereport=E5=90=8E=E7=BC=80?= =?UTF-8?q?=E7=9A=84=E6=94=B9=E6=88=90fanruan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/actions/help/AboutPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index c703306b22..7f00b5d7cc 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -80,7 +80,7 @@ public class AboutPane extends JPanel { contentPane.add(boxCenterAlignmentPane); } - BoxCenterAligmentPane actionLabel = getURLActionLabel(ProductConstants.WEBSITE_URL); + BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website", ProductConstants.WEBSITE_URL)); BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("register.email", ProductConstants.SUPPORT_EMAIL)); contentPane.add(actionLabel); From 446435a6ae3ff7e62c91d0282b4d7bb47c0e9fb2 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 6 Feb 2017 14:56:27 +0800 Subject: [PATCH 049/127] =?UTF-8?q?REPORT-1379=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=EF=BC=8C=E6=97=A5=E6=96=87=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=8E=BB=E6=8E=89community?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/community/VideoAction.java | 38 +++++++++++-------- .../mainframe/toolbar/ToolBarMenuDock.java | 6 ++- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/community/VideoAction.java b/designer_base/src/com/fr/design/actions/community/VideoAction.java index 86b411ace4..9672519ca3 100644 --- a/designer_base/src/com/fr/design/actions/community/VideoAction.java +++ b/designer_base/src/com/fr/design/actions/community/VideoAction.java @@ -5,6 +5,7 @@ import java.awt.event.ActionEvent; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; +import java.util.Locale; import javax.swing.JOptionPane; import javax.swing.KeyStroke; @@ -32,22 +33,27 @@ public class VideoAction extends UpdateAction @Override public void actionPerformed(ActionEvent arg0) { - String url = SiteCenter.getInstance().acquireUrlByKind("bbs.video"); - if (StringUtils.isEmpty(url)) { - FRContext.getLogger().info("The URL is empty!"); - return; - } - try { - Desktop.getDesktop().browse(new URI(url)); - } catch (IOException exp) { - JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); - FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); - } catch (URISyntaxException exp) { - FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); - } catch (Exception exp) { - FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); - FRContext.getLogger().error("Can not open the browser for URL: " + url); - } + String url; + if (FRContext.getLocale().equals(Locale.US)) { + url = SiteCenter.getInstance().acquireUrlByKind("bbs.video.en"); + } else { + url = SiteCenter.getInstance().acquireUrlByKind("bbs.video"); + } + if (StringUtils.isEmpty(url)) { + FRContext.getLogger().info("The URL is empty!"); + return; + } + try { + Desktop.getDesktop().browse(new URI(url)); + } catch (IOException exp) { + JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); + FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); + } catch (URISyntaxException exp) { + FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); + } catch (Exception exp) { + FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); + FRContext.getLogger().error("Can not open the browser for URL: " + url); + } } public static final MenuKeySet VIDEO = new MenuKeySet() { diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index a5a3b94994..4113370661 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -160,9 +160,7 @@ public abstract class ToolBarMenuDock { public Locale[] supportCommunityLocales() { return new Locale[]{ Locale.CHINA, - Locale.JAPAN, Locale.TAIWAN, - Locale.US, }; } @@ -314,6 +312,10 @@ public abstract class ToolBarMenuDock { public ShortCut[] createHelpShortCuts() { java.util.List shortCuts = new ArrayList(); shortCuts.add(new WebDemoAction()); + // 英文,把 video 的链接放到 Help 下面 + if (FRContext.getLocale().equals(Locale.US)) { + shortCuts.add(new VideoAction()); + } shortCuts.add(SeparatorDef.DEFAULT); //shortCuts.add(new TutorialAction()); shortCuts.add(SeparatorDef.DEFAULT); From e67c89a2ba70ffe7551f4fcb8bdae078228b452e Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 6 Feb 2017 15:18:50 +0800 Subject: [PATCH 050/127] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/actions/community/VideoAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/actions/community/VideoAction.java b/designer_base/src/com/fr/design/actions/community/VideoAction.java index 9672519ca3..ea53fbf8f5 100644 --- a/designer_base/src/com/fr/design/actions/community/VideoAction.java +++ b/designer_base/src/com/fr/design/actions/community/VideoAction.java @@ -46,7 +46,7 @@ public class VideoAction extends UpdateAction try { Desktop.getDesktop().browse(new URI(url)); } catch (IOException exp) { - JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser")); FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); } catch (URISyntaxException exp) { FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); From d048ba59fd37734bd85f627e838d1a7d3e48b968 Mon Sep 17 00:00:00 2001 From: zhouping Date: Tue, 7 Feb 2017 17:03:07 +0800 Subject: [PATCH 051/127] =?UTF-8?q?REPORT-1814=20=E8=A1=A8=E5=8D=95tab?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=94=B9=E8=89=AFbug=20=E5=B1=8F=E8=94=BD?= =?UTF-8?q?=E5=86=85=E5=B1=82=E7=9A=84tab=E7=BB=84=E4=BB=B6=E8=BD=AE?= =?UTF-8?q?=E6=92=AD=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XWCardLayout.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 3f16860140..690634b689 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -277,8 +277,22 @@ public class XWCardLayout extends XLayoutContainer { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel(); - return ArrayUtils.addAll(getDefaultDescriptor(), crp); + //嵌套的tab组件,内层的不支持轮播属性,屏蔽属性表 + if(!isNested()) { + CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel(); + return ArrayUtils.addAll(getDefaultDescriptor(), crp); + }else{ + return getDefaultDescriptor(); + } + } + + /** + * 判断当前tab组件是不是嵌套的 + * @return 嵌套与否 + */ + private boolean isNested(){ + XLayoutContainer xLayoutContainer = this.getBackupParent().getBackupParent(); + return xLayoutContainer != null && xLayoutContainer.acceptType(XWTabFitLayout.class); } public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException { From 4d0ed853926ce47b094ac413a0d4d0c1e152c340 Mon Sep 17 00:00:00 2001 From: yaohwu Date: Wed, 8 Feb 2017 16:07:19 +0800 Subject: [PATCH 052/127] REPORT-934 --- .../style/color/ColorSelectConfigManager.java | 228 ++++++++++++++---- .../ColorSelectConfigManagerProvider.java | 16 ++ 2 files changed, 198 insertions(+), 46 deletions(-) create mode 100644 designer_base/src/com/fr/design/style/color/ColorSelectConfigManagerProvider.java diff --git a/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java b/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java index 4d20c1207a..941ce35fd8 100644 --- a/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java +++ b/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java @@ -1,56 +1,192 @@ package com.fr.design.style.color; +import com.fr.file.XMLFileManager; + + +import com.fr.base.FRContext; +import com.fr.cluster.rpc.RPC; +import com.fr.file.BaseClusterHelper; +import com.fr.general.ComparatorUtils; +import com.fr.general.GeneralContext; +import com.fr.stable.EnvChangedListener; +import com.fr.stable.xml.XMLPrintWriter; +import com.fr.stable.xml.XMLTools; +import com.fr.stable.xml.XMLableReader; +import com.fr.general.FRLogger; + import java.awt.Color; import java.util.ArrayList; import java.util.List; +import java.io.InputStream; /** * 最近使用颜色 - * @author focus * + * @author focus */ -public class ColorSelectConfigManager{ - - // 最近使用的颜色个数 - private int colorNums = 20; - // 最近使用颜色 - private List colors; - - private static ColorSelectConfigManager colorSelectConfigManager = null; - - public Color[] getColors() { - if(colors == null){ - colors = new ArrayList(); - } - return colors.toArray(new Color[colors.size()]); - } - - public int getColorNum() { - return colorNums; - } - public void setColorNum(int colorNums) { - this.colorNums = colorNums; - } - - public synchronized static ColorSelectConfigManager getInstance() { - if (colorSelectConfigManager == null) { - colorSelectConfigManager = new ColorSelectConfigManager(); - } - return colorSelectConfigManager; - } - - /** - * 添加颜色到最近使用队列中 - * - * @param color 颜色 - * - */ - public void addToColorQueue(Color color){ - // 过滤重复的最近使用颜色 - // 因为有个后进先出的问题,最近使用的颜色需要放到最前面所以没用set - if(colors.contains(color)){ - colors.remove(color); - } - colors.add(color); - } -} \ No newline at end of file +public class ColorSelectConfigManager extends XMLFileManager implements ColorSelectConfigManagerProvider { + + // 最近使用的颜色个数 + private int colorNums = 20; + + private static ColorSelectConfigManagerProvider configManager = null; + private static ColorSelectConfigManager colorSelectConfigManager = null; + private boolean init = true; + // 最近使用颜色 + private List colors = new ArrayList(); + private static final String RECENT_COLOR_TAG = "RecentColors"; + private static final String COLOR_TAG = "Color"; + + static { + GeneralContext.addEnvChangedListener(new EnvChangedListener() { + public void envChanged() { + ColorSelectConfigManager.envChanged(); + } + }); + } + + private static void envChanged() { + configManager = null; + } + + public Color[] getColors() { + + //初次打开软件时从xml文件中获取历史颜色信息 + if (init) { + ColorSelectConfigManagerProvider manager = colorSelectConfigManager.getProviderInstance(); + this.colors = manager.getColorsFromFile(); + init = false; + } + if (colors == null) { + colors = new ArrayList(); + } + return colors.toArray(new Color[colors.size()]); + } + + public int getColorNum() { + return colorNums; + } + + public void setColorNum(int colorNums) { + this.colorNums = colorNums; + } + + public synchronized static ColorSelectConfigManager getInstance() { + if (colorSelectConfigManager == null) { + colorSelectConfigManager = new ColorSelectConfigManager(); + } + return colorSelectConfigManager; + } + + /** + * 添加颜色到最近使用队列中 + * + * @param color 颜色 + */ + public void addToColorQueue(Color color) { + // 过滤重复的最近使用颜色 + // 因为有个后进先出的问题,最近使用的颜色需要放到最前面所以没用set + if (colors.contains(color)) { + colors.remove(color); + } + colors.add(color); + + /*@author yaohwu*/ + //将历史颜色信息保存到xml文件中去 + ColorSelectConfigManagerProvider manager = colorSelectConfigManager.getProviderInstance(); + if (colors != null && !colors.isEmpty()) { + manager.setColorsToFile(colors); + } + try { + FRContext.getCurrentEnv().writeResource(manager); + } catch (Exception e) { + FRLogger.getLogger().error(e.getMessage()); + } + } + + + /** + * 读取配置文件流 + * + * @param input 流 + * @throws Exception 异常 + */ + @Override + public void readFromInputStream(InputStream input) throws Exception { + ColorSelectConfigManager manager = new ColorSelectConfigManager(); + XMLTools.readInputStreamXML(manager, input); + configManager = manager; + FRContext.getCurrentEnv().writeResource(configManager); + } + + + /** + * 获取配置管理接口 + * + * @return 配置管理接口ConfigManagerProvider + */ + public synchronized static ColorSelectConfigManagerProvider getProviderInstance() { + if (configManager == null) { + if (isClusterMember()) { + return configManager; + } + configManager.readXMLFile(); + } + return configManager; + } + + private synchronized static boolean isClusterMember() { + switch (BaseClusterHelper.getClusterState()) { + case LEADER: + configManager = new ColorSelectConfigManager(); + RPC.registerSkeleton(configManager); + return false; + case MEMBER: + String ip = BaseClusterHelper.getMainServiceIP(); + configManager = (ColorSelectConfigManagerProvider) RPC.getProxy(ColorSelectConfigManager.class, ip); + return true; + default: + configManager = new ColorSelectConfigManager(); + break; + } + return false; + } + + public boolean writeResource() throws Exception { + return FRContext.getCurrentEnv().writeResource(ColorSelectConfigManager.getProviderInstance()); + } + + public String fileName() { + return "recentcolors.xml"; + } + + public void readXML(XMLableReader reader) { + String name = reader.getTagName(); + if (reader.isChildNode()) { + if (ComparatorUtils.equals(COLOR_TAG, name)) { + Color color = null; + colors.add(reader.getAttrAsColor("colors", color)); + } + } + } + + public void writeXML(XMLPrintWriter writer) { + writer.startTAG(RECENT_COLOR_TAG); + if (this.colors != null && !this.colors.isEmpty()) { + for (int i = 0; i < this.colors.size(); i++) { + writer.startTAG(COLOR_TAG); + writer.attr("colors", colors.get(i).getRGB()); + writer.end(); + } + } + writer.end(); + } + + public List getColorsFromFile() { + return this.colors; + } + + public void setColorsToFile(List colors) { + this.colors = colors; + } +} diff --git a/designer_base/src/com/fr/design/style/color/ColorSelectConfigManagerProvider.java b/designer_base/src/com/fr/design/style/color/ColorSelectConfigManagerProvider.java new file mode 100644 index 0000000000..ea9783bb7d --- /dev/null +++ b/designer_base/src/com/fr/design/style/color/ColorSelectConfigManagerProvider.java @@ -0,0 +1,16 @@ +package com.fr.design.style.color; + +import com.fr.stable.file.RemoteXMLFileManagerProvider; + +import java.awt.Color; +import java.util.List; + + +/** + * Created by yaohwu on 2017/2/8. + */ +public interface ColorSelectConfigManagerProvider extends RemoteXMLFileManagerProvider { + + public List getColorsFromFile(); + public void setColorsToFile(List colors); +} From 9cfcb195cc95f764cc611924d2b46f18ddacc147 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 9 Feb 2017 11:36:40 +0800 Subject: [PATCH 053/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=9416/23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/actions/help/AboutPane.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index 7f00b5d7cc..c16f2047b9 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -69,7 +69,7 @@ public class AboutPane extends JPanel { })); // 英文去掉服务电话和 QQ - if (FRContext.getLocale() == Locale.ENGLISH || FRContext.getLocale() == Locale.US || FRContext.getLocale() == Locale.UK){ + if (FRContext.getLocale().equals(Locale.US)){ // do nothing } else { if(ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)){ @@ -80,7 +80,15 @@ public class AboutPane extends JPanel { contentPane.add(boxCenterAlignmentPane); } - BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website", ProductConstants.WEBSITE_URL)); + String locale; // SiteCenter 取值的 key 后缀 + if (FRContext.getLocale().equals(Locale.US)) { + locale = ".en"; + } else if (FRContext.getLocale().equals(Locale.JAPAN)) { + locale = ".jp"; + } else { + locale = ""; + } + BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website" + locale, ProductConstants.WEBSITE_URL)); BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("register.email", ProductConstants.SUPPORT_EMAIL)); contentPane.add(actionLabel); @@ -111,7 +119,7 @@ public class AboutPane extends JPanel { private String getCopyRight(){ return append(Inter.getLocText("FR-Designer_About_CopyRight"), COPYRIGHT_LABEL, - ProductConstants.HISTORY, StringUtils.BLANK, ProductConstants.COMPANY_NAME); + ProductConstants.HISTORY, StringUtils.BLANK, SiteCenter.getInstance().acquireUrlByKind("company.name", ProductConstants.COMPANY_NAME)); } private String getBuildTitle() { From 2e62dc556c80bb6fcf2ec088abf14be3a7ede8b0 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 9 Feb 2017 14:32:41 +0800 Subject: [PATCH 054/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=9417/23=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9Ekey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 3 ++- .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_ja_JP.properties | 1 + .../src/com/fr/design/locale/designer_ko_KR.properties | 3 ++- .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + .../src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java | 2 +- 7 files changed, 9 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 3f809fb4a7..b9c58818bc 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -538,4 +538,5 @@ FR-Designer_Allow_Blank=Allow Blank FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property -FR-Designer_ClassName=Class Name \ No newline at end of file +FR-Designer_ClassName=Class Name +FR-Designer_Polyblock_Edit=Polyblock Edit \ 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 30db869a26..aa19aa02fa 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 @@ -539,3 +539,4 @@ FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name +FR-Designer_Polyblock_Edit=Aggregation block edition 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 ba61149555..162e582a26 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 @@ -518,3 +518,4 @@ FR-Designer_PageSetup_Page=\u30DA\u30FC\u30B8 FR-Designer_Custom_Job_Description=\u8A18\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u985E\u540D +FR-Designer_Polyblock_Edit=\u30A2\u30B0\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30D6\u30ED\u30C3\u30AF\u7DE8\u96C6 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 9d540cd01c..7a4649c42a 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 @@ -512,4 +512,5 @@ FR-Designer_Allow_Blank=\uBE48\uCE78\uD5C8\uC6A9 FR-Designer_PageSetup_Page=\uC6F9\uD398\uC774\uC9C0 FR-Designer_Custom_Job_Description=\uC124\uBA85 FR-Designer_Property=\uC18D\uC131 -FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 \ No newline at end of file +FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 +FR-Designer_Polyblock_Edit=\uCDE8\uD569\uBE14\uB7ED\uD3B8\uC9D1 \ 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 54f0ac177a..f446d90e78 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 @@ -543,4 +543,5 @@ FR-Designer_PageSetup_Page=\u9875\u9762 FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u7C7B\u540D +FR-Designer_Polyblock_Edit=\u805A\u5408\u5757\u7F16\u8F91 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 2711507295..35a9c5574b 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 @@ -531,3 +531,4 @@ FR-Designer_PageSetup_Page=\u9801\u9762 FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C6C\u6027 FR-Designer_ClassName=\u985E\u540D +FR-Designer_Polyblock_Edit=\u805A\u5408\u584A\u7DE8\u8F2F diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 4113370661..8c60068702 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -400,7 +400,7 @@ public abstract class ToolBarMenuDock { return toolBar; } else { - return polyToolBar(Inter.getLocText(new String[]{"Polybolck", "Edit"})); + return polyToolBar(Inter.getLocText("FR-Designer_Polyblock_Edit")); } } From a0e072b585a6064f9678005fa1a0a893ed6c4e45 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 9 Feb 2017 14:56:45 +0800 Subject: [PATCH 055/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=9419/23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/present/dict/TableDataDictPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java b/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java index 149118894a..414abedacf 100644 --- a/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java +++ b/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java @@ -95,7 +95,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane Component[][] components = new Component[][]{ - new Component[]{new UILabel(" " + Inter.getLocText("DS-TableData") + ":", UILabel.RIGHT), firstLine}, + new Component[]{new UILabel(" " + Inter.getLocText("FR-Engine_DS-TableData") + ":", UILabel.RIGHT), firstLine}, new Component[]{new UILabel(Inter.getLocText("Actual_Value") + ":", UILabel.RIGHT), keyColumnPane}, new Component[]{new UILabel(Inter.getLocText("Display_Value") + ":", UILabel.RIGHT), valueDictPane} }; From 2f82bc4768acf7f50c0c321b5b85b0f3dba06469 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 9 Feb 2017 16:20:40 +0800 Subject: [PATCH 056/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=9420/23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cell/settingpane/CellOtherSetPane.java | 12 +++++-- .../fr/design/gui/ibutton/UIButtonGroup.java | 33 +++++++++++++------ 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index ffeaae0d93..cee3ac401b 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -3,7 +3,9 @@ package com.fr.design.mainframe.cell.settingpane; import java.awt.*; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; +import java.util.Locale; +import com.fr.base.FRContext; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.ilable.UILabel; @@ -123,8 +125,14 @@ public class CellOtherSetPane extends AbstractCellAttrPane { String[] AjustRowTypes = new String[]{ Inter.getLocText("No"), Inter.getLocText("Utils-Row_Height"), Inter.getLocText("Utils-Column_Width"), Inter.getLocText("Default")}; autoshrik = new UIButtonGroup(AjustRowTypes); - autoshrik.setTwoLine(); - autoshrik.setLayout(new GridLayout(2, 2, 1, 1)); + if (FRContext.getLocale().equals(Locale.US)) { + // 英文显示不全,故每行一个按钮 + autoshrik.setFourLine(); + autoshrik.setLayout(new GridLayout(4, 1, 1, 1)); + } else { + autoshrik.setTwoLine(); + autoshrik.setLayout(new GridLayout(2, 2, 1, 1)); + } previewCellContent = new UICheckBox(Inter.getLocText("CellWrite-Preview_Cell_Content")); printAndExportContent = new UICheckBox(Inter.getLocText("CellWrite-Print_Content")); diff --git a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java index 8a266a2a1e..636f728582 100644 --- a/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java +++ b/designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java @@ -28,6 +28,7 @@ import com.fr.design.utils.gui.GUICoreUtils; public class UIButtonGroup extends JPanel implements GlobalNameObserver { private boolean isTwoLine = false; + private boolean isFourLine = false; private static final long serialVersionUID = 1L; protected List labelButtonList; protected int selectedIndex = -1; @@ -176,6 +177,10 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver { this.isTwoLine = true; } + public void setFourLine() { + this.isFourLine = true; + } + /** * paintComponent * @@ -201,32 +206,40 @@ public class UIButtonGroup extends JPanel implements GlobalNameObserver { } Graphics2D g2d = (Graphics2D) g; g2d.setColor(UIConstants.LINE_COLOR); - if (!isTwoLine) { + if (isTwoLine) { int width = 0; - for (int i = 0; i < labelButtonList.size() - 1; i++) { + int upCount = (labelButtonList.size() - 1) / 2 + 1; + for (int i = 0; i < upCount - 1; i++) { width += labelButtonList.get(i).getWidth() + 1; - int height = labelButtonList.get(i).getHeight(); + int height = labelButtonList.get(i).getHeight() * 2 + 1; g.drawLine(width, 0, width, height); } - width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1; - + width += labelButtonList.get(upCount).getWidth() + 1; g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.drawRoundRect(0, 0, width, getHeight() - 1, UIConstants.ARC, UIConstants.ARC); + g2d.drawLine(0, getHeight() / 2, width, getHeight() / 2); + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); + } else if (isFourLine) { + // 4 * 1 + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + g2d.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, UIConstants.ARC, UIConstants.ARC); + for (int i = 1; i <= 3; i++) { + g2d.drawLine(0, getHeight() / 4 * i, getWidth() - 1, getHeight() / 4 * i); + } g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } else { int width = 0; - int upCount = (labelButtonList.size() - 1) / 2 + 1; - for (int i = 0; i < upCount - 1; i++) { + for (int i = 0; i < labelButtonList.size() - 1; i++) { width += labelButtonList.get(i).getWidth() + 1; - int height = labelButtonList.get(i).getHeight() * 2 + 1; + int height = labelButtonList.get(i).getHeight(); g.drawLine(width, 0, width, height); } - width += labelButtonList.get(upCount).getWidth() + 1; + width += labelButtonList.get(labelButtonList.size() - 1).getWidth() + 1; + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.drawRoundRect(0, 0, width, getHeight() - 1, UIConstants.ARC, UIConstants.ARC); - g2d.drawLine(0, getHeight() / 2, width, getHeight() / 2); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); } From 05292f2e1a6fb65d01cf48a7c7ae646ce60519e1 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 10 Feb 2017 09:46:13 +0800 Subject: [PATCH 057/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=9421/23=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9Ekey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/formula/FunctionManagerPane.java | 5 +---- designer_base/src/com/fr/design/locale/designer.properties | 3 ++- .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_ja_JP.properties | 1 + .../src/com/fr/design/locale/designer_ko_KR.properties | 3 ++- .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/formula/FunctionManagerPane.java b/designer_base/src/com/fr/design/formula/FunctionManagerPane.java index 3fffe594eb..eb75dabe1c 100644 --- a/designer_base/src/com/fr/design/formula/FunctionManagerPane.java +++ b/designer_base/src/com/fr/design/formula/FunctionManagerPane.java @@ -159,10 +159,7 @@ public class FunctionManagerPane extends BasicPane { descriptionArea.setWrapStyleWord(true); descriptionArea.setLineWrap(true); northPane.add(descriptionArea); - descriptionArea.setText(Inter.getLocText(new String[]{"Function-The_class_must_inherit","Fuction-The_compiled_class_should_be_copied_to", - "Function-J2EE_server", "Directory", "Function-Source_Code", "Example"}, - new String[]{" \"com.fr.script.AbstractFunction\".", "\n", " \"" + File.separator + "WEB-INF" + File.separator + "classes\"", - ",", ".\n", ":" + FRContext.getCurrentEnv().getPath() + File.separator + "classes"})); + descriptionArea.setText(Inter.getLocText("FR-Designer_Function_Description_Area_Text", File.separator, File.separator, FRContext.getCurrentEnv().getPath() + File.separator)); JPanel descriptionPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); //Description Pane this.add(descriptionPane, BorderLayout.SOUTH); descriptionPane.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index b9c58818bc..562025b900 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -539,4 +539,5 @@ FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name -FR-Designer_Polyblock_Edit=Polyblock Edit \ No newline at end of file +FR-Designer_Polyblock_Edit=Polyblock Edit +FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes} \ 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 aa19aa02fa..b8e06c809b 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 @@ -540,3 +540,4 @@ FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name FR-Designer_Polyblock_Edit=Aggregation block edition +FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes 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 162e582a26..a65d15c120 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 @@ -519,3 +519,4 @@ FR-Designer_Custom_Job_Description=\u8A18\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u985E\u540D FR-Designer_Polyblock_Edit=\u30A2\u30B0\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30D6\u30ED\u30C3\u30AF\u7DE8\u96C6 +FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}WEB-INF{R2}classes" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R3}classes 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 7a4649c42a..4df4b5a3ff 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 @@ -513,4 +513,5 @@ FR-Designer_PageSetup_Page=\uC6F9\uD398\uC774\uC9C0 FR-Designer_Custom_Job_Description=\uC124\uBA85 FR-Designer_Property=\uC18D\uC131 FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 -FR-Designer_Polyblock_Edit=\uCDE8\uD569\uBE14\uB7ED\uD3B8\uC9D1 \ No newline at end of file +FR-Designer_Polyblock_Edit=\uCDE8\uD569\uBE14\uB7ED\uD3B8\uC9D1 +FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}WEB-INF{R2}classes" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R3}classes \ 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 f446d90e78..404bf0b106 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 @@ -544,4 +544,5 @@ FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u7C7B\u540D FR-Designer_Polyblock_Edit=\u805A\u5408\u5757\u7F16\u8F91 +FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes 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 35a9c5574b..88b14bd3a5 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 @@ -532,3 +532,4 @@ FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C6C\u6027 FR-Designer_ClassName=\u985E\u540D FR-Designer_Polyblock_Edit=\u805A\u5408\u584A\u7DE8\u8F2F +FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes From d74bbdd501e182f1a22a81c9b3eff1c04f4363bb Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 10 Feb 2017 10:44:33 +0800 Subject: [PATCH 058/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=9422/23=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9Ekey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 4 +++- .../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 | 4 +++- .../src/com/fr/design/locale/designer_zh_CN.properties | 2 ++ .../src/com/fr/design/locale/designer_zh_TW.properties | 2 ++ .../style/background/gradient/GradientBackgroundPane.java | 4 ++-- 7 files changed, 16 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 562025b900..8815e4b031 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -540,4 +540,6 @@ FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name FR-Designer_Polyblock_Edit=Polyblock Edit -FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes} \ No newline at end of file +FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes} +FR-Designer_PageSetup_Horizontal=Horizontal +FR-Designer_PageSetup_Vertical=Vertical \ 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 b8e06c809b..0e7a873f04 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 @@ -541,3 +541,5 @@ FR-Designer_Property=Property FR-Designer_ClassName=Class Name FR-Designer_Polyblock_Edit=Aggregation block edition FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes +FR-Designer_PageSetup_Horizontal=Horizontal +FR-Designer_PageSetup_Vertical=Vertical 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 a65d15c120..7c332c617e 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 @@ -520,3 +520,5 @@ FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u985E\u540D FR-Designer_Polyblock_Edit=\u30A2\u30B0\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30D6\u30ED\u30C3\u30AF\u7DE8\u96C6 FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}WEB-INF{R2}classes" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R3}classes +FR-Designer_PageSetup_Horizontal=\u6A2A\u65B9\u5411 +FR-Designer_PageSetup_Vertical=\u7E26\u65B9\u5411 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 4df4b5a3ff..9736b112f1 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 @@ -514,4 +514,6 @@ FR-Designer_Custom_Job_Description=\uC124\uBA85 FR-Designer_Property=\uC18D\uC131 FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 FR-Designer_Polyblock_Edit=\uCDE8\uD569\uBE14\uB7ED\uD3B8\uC9D1 -FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}WEB-INF{R2}classes" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R3}classes \ No newline at end of file +FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}WEB-INF{R2}classes" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R3}classes +FR-Designer_PageSetup_Horizontal=\uAC00\uB85C +FR-Designer_PageSetup_Vertical=\uC138\uB85C \ 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 404bf0b106..56cd24ad85 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 @@ -545,4 +545,6 @@ FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u7C7B\u540D FR-Designer_Polyblock_Edit=\u805A\u5408\u5757\u7F16\u8F91 FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes +FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 +FR-Designer_PageSetup_Vertical=\u7EB5\u5411 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 88b14bd3a5..7f863d3455 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 @@ -533,3 +533,5 @@ FR-Designer_Property=\u5C6C\u6027 FR-Designer_ClassName=\u985E\u540D FR-Designer_Polyblock_Edit=\u805A\u5408\u584A\u7DE8\u8F2F FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes +FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 +FR-Designer_PageSetup_Vertical=\u7E31\u5411 diff --git a/designer_base/src/com/fr/design/style/background/gradient/GradientBackgroundPane.java b/designer_base/src/com/fr/design/style/background/gradient/GradientBackgroundPane.java index 9ab11eb147..e08c1a7a43 100644 --- a/designer_base/src/com/fr/design/style/background/gradient/GradientBackgroundPane.java +++ b/designer_base/src/com/fr/design/style/background/gradient/GradientBackgroundPane.java @@ -55,12 +55,12 @@ public class GradientBackgroundPane extends BackgroundDetailPane { centerPane.add(innercenterPane); innercenterPane.add(new UILabel(Inter.getLocText("Gradient-Direction") + ":")); - left2right = new UIRadioButton(Inter.getLocText("PageSetup-Landscape")); + left2right = new UIRadioButton(Inter.getLocText("FR-Designer_PageSetup_Horizontal")); innercenterPane.add(left2right); left2right.setSelected(true); left2right.addActionListener(reviewListener); - top2bottom = new UIRadioButton(Inter.getLocText("PageSetup-Portrait")); + top2bottom = new UIRadioButton(Inter.getLocText("FR-Designer_PageSetup_Vertical")); innercenterPane.add(top2bottom); top2bottom.addActionListener(reviewListener); From d3cda65cde9d35e5cc78b618fbe10d3369e50d4f Mon Sep 17 00:00:00 2001 From: yaohwu Date: Fri, 10 Feb 2017 10:47:32 +0800 Subject: [PATCH 059/127] REPORT-1227 --- designer_base/src/com/fr/design/roleAuthority/RoleTree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java index 3ee6279878..344e69b228 100644 --- a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java +++ b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java @@ -1 +1 @@ -package com.fr.design.roleAuthority; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.*; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.*; import java.awt.*; import java.util.Enumeration; /** * Author : daisy * Date: 13-8-30 * Time: 下午3:32 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); this.removeMouseListener(treeMouseListener); this.addTreeSelectionListener(new TreeSelectionListener() { public void valueChanged(TreeSelectionEvent e) { doWithValueChanged(e); } }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (e.getNewLeadSelectionPath().getLastPathComponent().toString() != Inter.getLocText("Role")) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getUpPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getUpPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceUpPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); java.util.List childTreeNodeList = new java.util.ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file +package com.fr.design.roleAuthority; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.*; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.*; import java.awt.*; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.Enumeration; /** * Author : daisy * Time: 下午3:32 * Date: 13-8-30 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); Handler handler = createHandlerForRoleTree(); this.replaceMouseListener(this, handler, 0); this.replaceKeyListener(this, handler, 0); this.addTreeSelectionListener(handler); // this.removeMouseListener(treeMouseListener); // this.addTreeSelectionListener(new TreeSelectionListener() { // public void valueChanged(TreeSelectionEvent e) { // doWithValueChanged(e); // } // }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * Creates the mouse listener and key listener used by RoleTree. * * @return the Handler. * @author yaohwu */ protected Handler createHandlerForRoleTree() { return new Handler(this); } protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { protected RoleTree _tree; int _hotspot = new UICheckBox().getPreferredSize().width; private int _toggleCount = -1; public Handler(RoleTree tree) { _tree = tree; } protected TreePath getTreePathForMouseEvent(MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) { return null; } if (!_tree.isCheckBoxEnabled()) { return null; } TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); if (path == null) return null; if (true || clicksInCheckBox(e, path)) { return path; } else { return null; } } protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { if (!_tree.isCheckBoxVisible(path)) { return false; } else { Rectangle bounds = _tree.getPathBounds(path); if (_tree.getComponentOrientation().isLeftToRight()) { return e.getX() < bounds.x + _hotspot; } else { return e.getX() > bounds.x + bounds.width - _hotspot; } } } private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; } public void mouseClicked(MouseEvent e) { preventToggleEvent(e); } public void mousePressed(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { toggleSelection(path); e.consume(); } } public void mouseReleased(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { e.consume(); } if (_toggleCount != -1) { _tree.setToggleClickCount(_toggleCount); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void keyPressed(KeyEvent e) { if (e.isConsumed()) { return; } if (!_tree.isCheckBoxEnabled()) { return; } if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) toggleSelections(); } public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void valueChanged(TreeSelectionEvent e) { _tree.treeDidChange(); _tree.doWithValueChanged(e); } private void toggleSelection(TreePath path) { if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { return; } CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); selectionModel.removeTreeSelectionListener(this); try { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(true); } if (selected) selectionModel.removeSelectionPath(path); else selectionModel.addSelectionPath(path); } finally { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(false); } selectionModel.addTreeSelectionListener(this); _tree.treeDidChange(); _tree.doWithValueChanged(path); } } protected void toggleSelections() { TreePath[] treePaths = _tree.getSelectionPaths(); if (treePaths == null) { return; } for (int i = 0, length = treePaths.length; i < length; i++) { TreePath tmpTreePath = treePaths[i]; toggleSelection(tmpTreePath); } // for (TreePath treePath : treePaths) { // toggleSelection(treePath); // } } } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("Role"))) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } protected void doWithValueChanged(TreePath treepath) { if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("Role"))) { roleName = treepath.getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getUpPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getUpPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceUpPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /** * 去除不需要的鼠标监听器 * * @param component * @param l * @param index * @author yaohwu */ private void replaceMouseListener(Component component, MouseListener l, int index) { component.removeMouseListener(treeMouseListener); MouseListener[] listeners = component.getMouseListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeMouseListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { MouseListener listener = listeners[i]; if (index == i) { component.addMouseListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addMouseListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addMouseListener(l); } } /** * 去除一些不需要的键盘监听器 * * @param component * @param l * @param index * @author yaohwu */ private void replaceKeyListener(Component component, KeyListener l, int index) { KeyListener[] listeners = component.getKeyListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeKeyListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { KeyListener listener = listeners[i]; if (index == i) { component.addKeyListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addKeyListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addKeyListener(l); } } /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); java.util.List childTreeNodeList = new java.util.ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file From 5eef84ba7445ecc5c8d7c14f1873e39141aba32a Mon Sep 17 00:00:00 2001 From: yaohwu Date: Fri, 10 Feb 2017 11:23:37 +0800 Subject: [PATCH 060/127] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/roleAuthority/RoleTree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java index 344e69b228..e51c703df7 100644 --- a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java +++ b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java @@ -1 +1 @@ -package com.fr.design.roleAuthority; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.*; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.*; import java.awt.*; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.Enumeration; /** * Author : daisy * Time: 下午3:32 * Date: 13-8-30 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); Handler handler = createHandlerForRoleTree(); this.replaceMouseListener(this, handler, 0); this.replaceKeyListener(this, handler, 0); this.addTreeSelectionListener(handler); // this.removeMouseListener(treeMouseListener); // this.addTreeSelectionListener(new TreeSelectionListener() { // public void valueChanged(TreeSelectionEvent e) { // doWithValueChanged(e); // } // }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * Creates the mouse listener and key listener used by RoleTree. * * @return the Handler. * @author yaohwu */ protected Handler createHandlerForRoleTree() { return new Handler(this); } protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { protected RoleTree _tree; int _hotspot = new UICheckBox().getPreferredSize().width; private int _toggleCount = -1; public Handler(RoleTree tree) { _tree = tree; } protected TreePath getTreePathForMouseEvent(MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) { return null; } if (!_tree.isCheckBoxEnabled()) { return null; } TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); if (path == null) return null; if (true || clicksInCheckBox(e, path)) { return path; } else { return null; } } protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { if (!_tree.isCheckBoxVisible(path)) { return false; } else { Rectangle bounds = _tree.getPathBounds(path); if (_tree.getComponentOrientation().isLeftToRight()) { return e.getX() < bounds.x + _hotspot; } else { return e.getX() > bounds.x + bounds.width - _hotspot; } } } private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; } public void mouseClicked(MouseEvent e) { preventToggleEvent(e); } public void mousePressed(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { toggleSelection(path); e.consume(); } } public void mouseReleased(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { e.consume(); } if (_toggleCount != -1) { _tree.setToggleClickCount(_toggleCount); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void keyPressed(KeyEvent e) { if (e.isConsumed()) { return; } if (!_tree.isCheckBoxEnabled()) { return; } if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) toggleSelections(); } public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void valueChanged(TreeSelectionEvent e) { _tree.treeDidChange(); _tree.doWithValueChanged(e); } private void toggleSelection(TreePath path) { if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { return; } CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); selectionModel.removeTreeSelectionListener(this); try { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(true); } if (selected) selectionModel.removeSelectionPath(path); else selectionModel.addSelectionPath(path); } finally { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(false); } selectionModel.addTreeSelectionListener(this); _tree.treeDidChange(); _tree.doWithValueChanged(path); } } protected void toggleSelections() { TreePath[] treePaths = _tree.getSelectionPaths(); if (treePaths == null) { return; } for (int i = 0, length = treePaths.length; i < length; i++) { TreePath tmpTreePath = treePaths[i]; toggleSelection(tmpTreePath); } // for (TreePath treePath : treePaths) { // toggleSelection(treePath); // } } } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("Role"))) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } protected void doWithValueChanged(TreePath treepath) { if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("Role"))) { roleName = treepath.getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getUpPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getUpPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceUpPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /** * 去除不需要的鼠标监听器 * * @param component * @param l * @param index * @author yaohwu */ private void replaceMouseListener(Component component, MouseListener l, int index) { component.removeMouseListener(treeMouseListener); MouseListener[] listeners = component.getMouseListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeMouseListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { MouseListener listener = listeners[i]; if (index == i) { component.addMouseListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addMouseListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addMouseListener(l); } } /** * 去除一些不需要的键盘监听器 * * @param component * @param l * @param index * @author yaohwu */ private void replaceKeyListener(Component component, KeyListener l, int index) { KeyListener[] listeners = component.getKeyListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeKeyListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { KeyListener listener = listeners[i]; if (index == i) { component.addKeyListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addKeyListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addKeyListener(l); } } /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); java.util.List childTreeNodeList = new java.util.ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file +package com.fr.design.roleAuthority; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.SwingUtilities; import javax.swing.JTree; import javax.swing.JComponent; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; /** * Author : daisy * Time: 下午3:32 * Date: 13-8-30 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); Handler handler = createHandlerForRoleTree(); this.replaceMouseListener(this, handler, 0); this.replaceKeyListener(this, handler, 0); this.addTreeSelectionListener(handler); // this.removeMouseListener(treeMouseListener); // this.addTreeSelectionListener(new TreeSelectionListener() { // public void valueChanged(TreeSelectionEvent e) { // doWithValueChanged(e); // } // }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * Creates the mouse listener and key listener used by RoleTree. * * @return the Handler. */ protected Handler createHandlerForRoleTree() { return new Handler(this); } protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { protected RoleTree _tree; int _hotspot = new UICheckBox().getPreferredSize().width; private int _toggleCount = -1; public Handler(RoleTree tree) { _tree = tree; } protected TreePath getTreePathForMouseEvent(MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) { return null; } if (!_tree.isCheckBoxEnabled()) { return null; } TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); if (path == null) { return null; } // if (clicksInCheckBox(e, path)) { return path; // } else { // return null; // } } // protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { // if (!_tree.isCheckBoxVisible(path)) { // return false; // } else { // Rectangle bounds = _tree.getPathBounds(path); // if (_tree.getComponentOrientation().isLeftToRight()) { // return e.getX() < bounds.x + _hotspot; // } else { // return e.getX() > bounds.x + bounds.width - _hotspot; // } // } // } private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; } public void mouseClicked(MouseEvent e) { preventToggleEvent(e); } public void mousePressed(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { toggleSelection(path); e.consume(); } } public void mouseReleased(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { e.consume(); } if (_toggleCount != -1) { _tree.setToggleClickCount(_toggleCount); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void keyPressed(KeyEvent e) { if (e.isConsumed()) { return; } if (!_tree.isCheckBoxEnabled()) { return; } if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) { toggleSelections(); } } public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void valueChanged(TreeSelectionEvent e) { _tree.treeDidChange(); _tree.doWithValueChanged(e); } private void toggleSelection(TreePath path) { if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { return; } CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); selectionModel.removeTreeSelectionListener(this); try { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(true); } if (selected) selectionModel.removeSelectionPath(path); else selectionModel.addSelectionPath(path); } finally { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(false); } selectionModel.addTreeSelectionListener(this); _tree.treeDidChange(); _tree.doWithValueChanged(path); } } protected void toggleSelections() { TreePath[] treePaths = _tree.getSelectionPaths(); if (treePaths == null) { return; } for (int i = 0, length = treePaths.length; i < length; i++) { TreePath tmpTreePath = treePaths[i]; toggleSelection(tmpTreePath); } // for (TreePath treePath : treePaths) { // toggleSelection(treePath); // } } } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } /** * @param e 选中事件 */ protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("Role"))) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } /** * @param treepath 所选的节点路径 */ protected void doWithValueChanged(TreePath treepath) { if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("Role"))) { roleName = treepath.getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getUpPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getUpPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceUpPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /** * 去除不需要的鼠标监听器 * * @param component 组件 * @param l 所需的鼠标监听器 * @param index 插入的索引 */ private void replaceMouseListener(Component component, MouseListener l, int index) { component.removeMouseListener(treeMouseListener); MouseListener[] listeners = component.getMouseListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeMouseListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { MouseListener listener = listeners[i]; if (index == i) { component.addMouseListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addMouseListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addMouseListener(l); } } /** * 去除一些不需要的键盘监听器 * * @param component 组件 * @param l 所需的键盘监听器 * @param index 插入的索引 */ private void replaceKeyListener(Component component, KeyListener l, int index) { KeyListener[] listeners = component.getKeyListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeKeyListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { KeyListener listener = listeners[i]; if (index == i) { component.addKeyListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addKeyListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addKeyListener(l); } } /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); List childTreeNodeList = new ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file From b0d98eaf8ca0f4eb06eaf14773494006c3a1e97d Mon Sep 17 00:00:00 2001 From: zhouping Date: Fri, 10 Feb 2017 12:11:47 +0800 Subject: [PATCH 061/127] =?UTF-8?q?REPORT-1814=20=E8=A1=A8=E5=8D=95tab?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=94=B9=E8=89=AFbug=20tab=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E6=94=B9=E8=89=AF=EF=BC=8C=E9=A1=B5=E7=AD=BE=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/locale/designer.properties | 6 +- .../design/locale/designer_en_US.properties | 4 + .../design/locale/designer_ja_JP.properties | 4 + .../design/locale/designer_ko_KR.properties | 6 +- .../design/locale/designer_zh_CN.properties | 4 + .../design/locale/designer_zh_TW.properties | 4 + .../cardlayout/TabMoveCustomAction.java | 32 ++++++++ .../creator/cardlayout/TabMoveEndAction.java | 66 ++++++++++++++++ .../cardlayout/TabMoveFirstAction.java | 65 ++++++++++++++++ .../creator/cardlayout/TabMoveNextAction.java | 64 +++++++++++++++ .../creator/cardlayout/TabMovePrevAction.java | 64 +++++++++++++++ .../creator/cardlayout/XCardAddButton.java | 8 +- .../creator/cardlayout/XCardSwitchButton.java | 78 ++++++++++++------- .../creator/cardlayout/XWCardLayout.java | 14 ++-- .../creator/cardlayout/XWCardTagLayout.java | 14 ++++ .../mainframe/EditingMouseListener.java | 3 - 16 files changed, 395 insertions(+), 41 deletions(-) create mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java create mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java create mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java create mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java create mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 3f809fb4a7..cee4fc3456 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -538,4 +538,8 @@ FR-Designer_Allow_Blank=Allow Blank FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property -FR-Designer_ClassName=Class Name \ No newline at end of file +FR-Designer_ClassName=Class Name +FR-Designer-Move_Tab_First=move to first +FR-Designer-Move_Tab_End=move to end +FR-Designer-Move_Tab_Next=move to next +FR-Designer-Move_Tab_Prev=move to previous \ 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 30db869a26..c06215bc65 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 @@ -539,3 +539,7 @@ FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name +FR-Designer-Move_Tab_First=move to first +FR-Designer-Move_Tab_End=move to end +FR-Designer-Move_Tab_Next=move to next +FR-Designer-Move_Tab_Prev=move to previous 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 ba61149555..c2fb91f257 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 @@ -518,3 +518,7 @@ FR-Designer_PageSetup_Page=\u30DA\u30FC\u30B8 FR-Designer_Custom_Job_Description=\u8A18\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u985E\u540D +FR-Designer-Move_Tab_First= +FR-Designer-Move_Tab_End= +FR-Designer-Move_Tab_Next= +FR-Designer-Move_Tab_Prev= 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 9d540cd01c..03d1a11f45 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 @@ -512,4 +512,8 @@ FR-Designer_Allow_Blank=\uBE48\uCE78\uD5C8\uC6A9 FR-Designer_PageSetup_Page=\uC6F9\uD398\uC774\uC9C0 FR-Designer_Custom_Job_Description=\uC124\uBA85 FR-Designer_Property=\uC18D\uC131 -FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 \ No newline at end of file +FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 +FR-Designer-Move_Tab_First= +FR-Designer-Move_Tab_End= +FR-Designer-Move_Tab_Next= +FR-Designer-Move_Tab_Prev= \ 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 54f0ac177a..6fdea224d2 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 @@ -543,4 +543,8 @@ FR-Designer_PageSetup_Page=\u9875\u9762 FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u7C7B\u540D +FR-Designer-Move_Tab_First=\u79FB\u52A8\u5230\u9996\u4F4D +FR-Designer-Move_Tab_End=\u79FB\u52A8\u5230\u672B\u5C3E +FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8 +FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8 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 2711507295..c47170e574 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 @@ -531,3 +531,7 @@ FR-Designer_PageSetup_Page=\u9801\u9762 FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C6C\u6027 FR-Designer_ClassName=\u985E\u540D +FR-Designer-Move_Tab_First=\u79FB\u52D5\u5230\u9996\u4F4D +FR-Designer-Move_Tab_End=\u79FB\u52D5\u5230\u672B\u5C3E +FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5 +FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5 diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java new file mode 100644 index 0000000000..93a62287e0 --- /dev/null +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java @@ -0,0 +1,32 @@ +package com.fr.design.designer.creator.cardlayout; + +import com.fr.base.BaseUtils; +import com.fr.design.designer.beans.actions.FormUndoableAction; +import com.fr.design.mainframe.FormDesigner; + +/** + * Created by zhouping on 2017/2/9. + */ +public class TabMoveCustomAction extends FormUndoableAction { + private XCardSwitchButton xCardSwitchButton; + + public TabMoveCustomAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { + super(t); + this.setName(""); + this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); + this.xCardSwitchButton = xCardSwitchButton; + } + + @Override + public boolean executeActionReturnUndoRecordNeeded() { + return false; + } + + public XCardSwitchButton getxCardSwitchButton() { + return xCardSwitchButton; + } + + public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { + this.xCardSwitchButton = xCardSwitchButton; + } +} diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java new file mode 100644 index 0000000000..ae101dbe4a --- /dev/null +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java @@ -0,0 +1,66 @@ +package com.fr.design.designer.creator.cardlayout; + +import com.fr.base.BaseUtils; +import com.fr.design.designer.beans.actions.FormUndoableAction; +import com.fr.design.mainframe.FormDesigner; +import com.fr.form.ui.CardSwitchButton; +import com.fr.form.ui.container.cardlayout.WTabFitLayout; +import com.fr.general.FRLogger; +import com.fr.general.Inter; + +/** + * Created by zhouping on 2017/2/9. + */ +public class TabMoveEndAction extends FormUndoableAction { + private XCardSwitchButton xCardSwitchButton; + + public TabMoveEndAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { + super(t); + this.setName(Inter.getLocText("FR-Designer-Move_Tab_End")); + this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/rightright.png")); + this.xCardSwitchButton = xCardSwitchButton; + } + + @Override + public boolean executeActionReturnUndoRecordNeeded() { + XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); + XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); + CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); + try { + int currentIndex = currentButton.getIndex(); + int maxIndex = xwCardTagLayout.getComponentCount(); + XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); + WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); + xwCardTagLayout.setSwitchingTab(true); + //修改当前tab往后所有tab的索引号 + for (int i = currentIndex + 1; i < maxIndex; i++) { + CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData(); + tempBtn.setIndex(i - 1); + WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData(); + tempTab.setIndex(i - 1); + tempTab.setTabNameIndex(i - 1); + } + xwCardTagLayout.remove(xCardSwitchButton); + xwCardTagLayout.add(xCardSwitchButton); + xwCardLayout.remove(xCurrentTab); + xwCardLayout.add(xCurrentTab); + currentButton.setIndex(maxIndex - 1); + currentTab.setIndex(maxIndex - 1); + currentTab.setTabNameIndex(maxIndex - 1); + xwCardTagLayout.setSwitchingTab(false); + }catch (Exception e){ + xwCardTagLayout.setSwitchingTab(false); + FRLogger.getLogger().error(e.getMessage()); + return false; + } + return true; + } + + public XCardSwitchButton getxCardSwitchButton() { + return xCardSwitchButton; + } + + public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { + this.xCardSwitchButton = xCardSwitchButton; + } +} diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java new file mode 100644 index 0000000000..0d6047636a --- /dev/null +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java @@ -0,0 +1,65 @@ +package com.fr.design.designer.creator.cardlayout; + +import com.fr.base.BaseUtils; +import com.fr.design.designer.beans.actions.FormUndoableAction; +import com.fr.design.mainframe.FormDesigner; +import com.fr.form.ui.CardSwitchButton; +import com.fr.form.ui.container.cardlayout.WTabFitLayout; +import com.fr.general.FRLogger; +import com.fr.general.Inter; + +/** + * Created by zhouping on 2017/2/9. + */ +public class TabMoveFirstAction extends FormUndoableAction { + private XCardSwitchButton xCardSwitchButton; + + public TabMoveFirstAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { + super(t); + this.setName(Inter.getLocText("FR-Designer-Move_Tab_First")); + this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/leftleft.png")); + this.xCardSwitchButton = xCardSwitchButton; + } + + @Override + public boolean executeActionReturnUndoRecordNeeded() { + XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); + XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); + CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); + try { + int currentIndex = currentButton.getIndex(); + XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); + WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); + xwCardTagLayout.setSwitchingTab(true); + //修改当前tab往前所有tab的索引号 + for (int i = currentIndex - 1; i >= 0; i--) { + CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData(); + tempBtn.setIndex(i + 1); + WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData(); + tempTab.setIndex(i + 1); + tempTab.setTabNameIndex(i + 1); + } + xwCardTagLayout.remove(xCardSwitchButton); + xwCardTagLayout.add(xCardSwitchButton, 0); + xwCardLayout.remove(xCurrentTab); + xwCardLayout.add(xCurrentTab, 0); + currentButton.setIndex(0); + currentTab.setIndex(0); + currentTab.setTabNameIndex(0); + xwCardTagLayout.setSwitchingTab(false); + }catch (Exception e){ + xwCardTagLayout.setSwitchingTab(false); + FRLogger.getLogger().error(e.getMessage()); + return false; + } + return true; + } + + public XCardSwitchButton getxCardSwitchButton() { + return xCardSwitchButton; + } + + public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { + this.xCardSwitchButton = xCardSwitchButton; + } +} diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java new file mode 100644 index 0000000000..15bfa7337c --- /dev/null +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java @@ -0,0 +1,64 @@ +package com.fr.design.designer.creator.cardlayout; + +import com.fr.base.BaseUtils; +import com.fr.design.designer.beans.actions.FormUndoableAction; +import com.fr.design.mainframe.FormDesigner; +import com.fr.form.ui.CardSwitchButton; +import com.fr.form.ui.container.cardlayout.WTabFitLayout; +import com.fr.general.FRLogger; +import com.fr.general.Inter; + +/** + * Created by zhouping on 2017/2/9. + */ +public class TabMoveNextAction extends FormUndoableAction { + private XCardSwitchButton xCardSwitchButton; + + public TabMoveNextAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { + super(t); + this.setName(Inter.getLocText("FR-Designer-Move_Tab_Next")); + this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/right.png")); + this.xCardSwitchButton = xCardSwitchButton; + } + + @Override + public boolean executeActionReturnUndoRecordNeeded() { + XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); + XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); + CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); + try { + int currentIndex = currentButton.getIndex(); + XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); + WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); + xwCardTagLayout.setSwitchingTab(true); + //修改下一个tab的索引号 + CardSwitchButton nextBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex + 1).toData(); + nextBtn.setIndex(currentIndex); + WTabFitLayout nextTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex + 1).toData(); + nextTab.setIndex(currentIndex); + nextTab.setTabNameIndex(currentIndex); + + xwCardTagLayout.remove(xCardSwitchButton); + xwCardTagLayout.add(xCardSwitchButton, currentIndex + 1); + xwCardLayout.remove(xCurrentTab); + xwCardLayout.add(xCurrentTab, currentIndex + 1); + currentButton.setIndex(currentIndex + 1); + currentTab.setIndex(currentIndex + 1); + currentTab.setTabNameIndex(currentIndex + 1); + xwCardTagLayout.setSwitchingTab(false); + }catch (Exception e){ + xwCardTagLayout.setSwitchingTab(false); + FRLogger.getLogger().error(e.getMessage()); + return false; + } + return true; + } + + public XCardSwitchButton getxCardSwitchButton() { + return xCardSwitchButton; + } + + public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { + this.xCardSwitchButton = xCardSwitchButton; + } +} diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java new file mode 100644 index 0000000000..cac70db824 --- /dev/null +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java @@ -0,0 +1,64 @@ +package com.fr.design.designer.creator.cardlayout; + +import com.fr.base.BaseUtils; +import com.fr.design.designer.beans.actions.FormUndoableAction; +import com.fr.design.mainframe.FormDesigner; +import com.fr.form.ui.CardSwitchButton; +import com.fr.form.ui.container.cardlayout.WTabFitLayout; +import com.fr.general.FRLogger; +import com.fr.general.Inter; + +/** + * Created by zhouping on 2017/2/9. + */ +public class TabMovePrevAction extends FormUndoableAction { + private XCardSwitchButton xCardSwitchButton; + + public TabMovePrevAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { + super(t); + this.setName(Inter.getLocText("FR-Designer-Move_Tab_Prev")); + this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/left.png")); + this.xCardSwitchButton = xCardSwitchButton; + } + + @Override + public boolean executeActionReturnUndoRecordNeeded() { + XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); + XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); + CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); + try { + int currentIndex = currentButton.getIndex(); + XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); + WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); + xwCardTagLayout.setSwitchingTab(true); + //修改上一个tab的索引号 + CardSwitchButton prevBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex - 1).toData(); + prevBtn.setIndex(currentIndex); + WTabFitLayout prevTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex - 1).toData(); + prevTab.setIndex(currentIndex); + prevTab.setTabNameIndex(currentIndex); + + xwCardTagLayout.remove(xCardSwitchButton); + xwCardTagLayout.add(xCardSwitchButton, currentIndex - 1); + xwCardLayout.remove(xCurrentTab); + xwCardLayout.add(xCurrentTab, currentIndex - 1); + currentButton.setIndex(currentIndex - 1); + currentTab.setIndex(currentIndex - 1); + currentTab.setTabNameIndex(currentIndex - 1); + xwCardTagLayout.setSwitchingTab(false); + }catch (Exception e){ + xwCardTagLayout.setSwitchingTab(false); + FRLogger.getLogger().error(e.getMessage()); + return false; + } + return true; + } + + public XCardSwitchButton getxCardSwitchButton() { + return xCardSwitchButton; + } + + public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { + this.xCardSwitchButton = xCardSwitchButton; + } +} diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index fa4c1d4a9b..85e26e877c 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -89,12 +89,12 @@ public class XCardAddButton extends XButton{ // addbutton对应的XWCardLayout和XWCardTagLayout暂未存入到xml中,重新打开之后先根据父子层获取 if(cardLayout == null && tagLayout ==null ){ - initRalateLayout(); + initRelateLayout(); } int index = cardLayout.toData().getWidgetCount(); //添加新的tab,并将原来的设为未选中状态 - setTabUnselectd(); + setTabUnselected(); addTab(index); this.tagLayout.adjustComponentWidth(); @@ -110,7 +110,7 @@ public class XCardAddButton extends XButton{ LayoutUtils.layoutRootContainer(designer.getRootComponent()); } - private void initRalateLayout(){ + private void initRelateLayout(){ XWCardTitleLayout titleLayout = (XWCardTitleLayout)this.getBackupParent(); this.tagLayout = titleLayout.getTagPart(); @@ -129,7 +129,7 @@ public class XCardAddButton extends XButton{ } //将原来的tab页设置为未选中状态 - private void setTabUnselectd(){ + private void setTabUnselected(){ for(int i=0;i Date: Fri, 10 Feb 2017 12:53:17 +0800 Subject: [PATCH 062/127] =?UTF-8?q?REPORT-1814=20=E8=A1=A8=E5=8D=95tab?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=94=B9=E8=89=AFbug=20pmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EditingMouseListener.java | 126 +++++++++--------- 1 file changed, 66 insertions(+), 60 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java b/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java index f88abfaa45..f1f61b2b28 100644 --- a/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java @@ -187,45 +187,48 @@ public class EditingMouseListener extends MouseInputAdapter { designer.selectComponents(e); } if (stateModel.isDragging()) { - // 当前鼠标所在的组件 - XCreator hoveredComponent = designer.getComponentAt(e.getX(), e.getY()); - if(designer.isWidgetsIntersect() && dragBackupBounds != null && hoveredComponent != null){ - XCreator selectionXCreator = designer.getSelectionModel().getSelection().getSelectedCreator(); - if(selectionXCreator != null){ - selectionXCreator.setBounds(dragBackupBounds.x, dragBackupBounds.y, dragBackupBounds.width, dragBackupBounds.height); - MoveUtils.hideForbidWindow(); - } - } - dragBackupBounds = null; - // 拉伸时鼠标拖动过快,导致所在组件获取会为空 - if (hoveredComponent == null && e.getY() < 0) { - // bug63538 - // 不是拖动过快导致的,而是纵坐标为负值导致的,这时参照横坐标为负值时的做法,取边界位置的组件,为鼠标所在点的组件 - // 如果直接return,界面上已经进行了拖拽不能恢复 - hoveredComponent = designer.getComponentAt(0, 0); - } - // 获取该组件所在的焦点容器 - XLayoutContainer container = XCreatorUtils.getHotspotContainer(hoveredComponent); - - if (container != null) { - boolean formSubmit2Adapt = !selectionModel.getSelection().getSelectedCreator().canEnterIntoAdaptPane() - && container.acceptType(XWFitLayout.class); - if ( !formSubmit2Adapt) { - // 如果是处于拖拽状态,则释放组件 - stateModel.releaseDragging(e); - } else { - selectionModel.deleteSelection(); - designer.setPainter(null); - } - cancelPromptWidgetForbidEnter(); - } - + mouseDraggingRelease(e); } } lastPressEvent = null; last_creator = null; } + private void mouseDraggingRelease(MouseEvent e) { + // 当前鼠标所在的组件 + XCreator hoveredComponent = designer.getComponentAt(e.getX(), e.getY()); + if(designer.isWidgetsIntersect() && dragBackupBounds != null && hoveredComponent != null){ + XCreator selectionXCreator = designer.getSelectionModel().getSelection().getSelectedCreator(); + if(selectionXCreator != null){ + selectionXCreator.setBounds(dragBackupBounds.x, dragBackupBounds.y, dragBackupBounds.width, dragBackupBounds.height); + MoveUtils.hideForbidWindow(); + } + } + dragBackupBounds = null; + // 拉伸时鼠标拖动过快,导致所在组件获取会为空 + if (hoveredComponent == null && e.getY() < 0) { + // bug63538 + // 不是拖动过快导致的,而是纵坐标为负值导致的,这时参照横坐标为负值时的做法,取边界位置的组件,为鼠标所在点的组件 + // 如果直接return,界面上已经进行了拖拽不能恢复 + hoveredComponent = designer.getComponentAt(0, 0); + } + // 获取该组件所在的焦点容器 + XLayoutContainer container = XCreatorUtils.getHotspotContainer(hoveredComponent); + + if (container != null) { + boolean formSubmit2Adapt = !selectionModel.getSelection().getSelectedCreator().canEnterIntoAdaptPane() + && container.acceptType(XWFitLayout.class); + if ( !formSubmit2Adapt) { + // 如果是处于拖拽状态,则释放组件 + stateModel.releaseDragging(e); + } else { + selectionModel.deleteSelection(); + designer.setPainter(null); + } + cancelPromptWidgetForbidEnter(); + } + } + /** * 激活上下文菜单,待完善 * 6.56暂时不支持右键 bugid 8777 @@ -286,33 +289,7 @@ public class EditingMouseListener extends MouseInputAdapter { } if (component.isReport()) { - xElementCase = (XElementCase)component; - UIButton button = (UIButton)xElementCase.getCoverPane().getComponent(0); - if(designer.getCursor().getType() ==Cursor.HAND_CURSOR) { - designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - } // component.getParent() 是报表块所在的XWTitleLayout - int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); - if (e.getX() + GAP - xElementCase.getInsets().left > minX && e.getX() - GAP - xElementCase.getInsets().left < minX + button.getWidth()) { - if (e.getY() + GAP - xElementCase.getInsets().top > minY && e.getY() - GAP - xElementCase.getInsets().top < minY + button.getHeight()) { - designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - } - } - xElementCase.setHelpBtnOnFocus(false); - if (xElementCase.getCoverPane().getComponentCount() > 1) { - JComponent button1 = (JComponent) xElementCase.getCoverPane().getComponent(1); - int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); - int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); - if (e.getX() + GAP - xElementCase.getInsets().left > minX1 && e.getX() - GAP - xElementCase.getInsets().left < minX1 + button1.getWidth()) { - if (e.getY() + GAP - xElementCase.getInsets().top > minY1 && e.getY() - GAP - xElementCase.getInsets().top < minY1 + button1.getHeight()) { - designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - xElementCase.setHelpBtnOnFocus(true); - } - } - } - xElementCase.displayCoverPane(true); - xElementCase.setDirections(Direction.TOP_BOTTOM_LEFT_RIGHT); - + elementCaseMouseMoved(e, component); designer.repaint(); return; } @@ -322,6 +299,35 @@ public class EditingMouseListener extends MouseInputAdapter { designer.repaint(); } + private void elementCaseMouseMoved(MouseEvent e, XCreator component) { + xElementCase = (XElementCase)component; + UIButton button = (UIButton)xElementCase.getCoverPane().getComponent(0); + if(designer.getCursor().getType() == Cursor.HAND_CURSOR) { + designer.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } // component.getParent() 是报表块所在的XWTitleLayout + int minX = button.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); + int minY = button.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + if (e.getX() + GAP - xElementCase.getInsets().left > minX && e.getX() - GAP - xElementCase.getInsets().left < minX + button.getWidth()) { + if (e.getY() + GAP - xElementCase.getInsets().top > minY && e.getY() - GAP - xElementCase.getInsets().top < minY + button.getHeight()) { + designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + } + } + xElementCase.setHelpBtnOnFocus(false); + if (xElementCase.getCoverPane().getComponentCount() > 1) { + JComponent button1 = (JComponent) xElementCase.getCoverPane().getComponent(1); + int minX1 = button1.getX() + getParentPositionX(component, 0) - designer.getArea().getHorizontalValue(); + int minY1 = button1.getY() + getParentPositionY(component, 0) - designer.getArea().getVerticalValue(); + if (e.getX() + GAP - xElementCase.getInsets().left > minX1 && e.getX() - GAP - xElementCase.getInsets().left < minX1 + button1.getWidth()) { + if (e.getY() + GAP - xElementCase.getInsets().top > minY1 && e.getY() - GAP - xElementCase.getInsets().top < minY1 + button1.getHeight()) { + designer.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + xElementCase.setHelpBtnOnFocus(true); + } + } + } + xElementCase.displayCoverPane(true); + xElementCase.setDirections(Direction.TOP_BOTTOM_LEFT_RIGHT); + } + private void setCoverPaneNotDisplay(MouseEvent e, boolean isLinkedHelpDialog) { if (xElementCase != null) { int x = getParentPositionX(xElementCase, 0) - designer.getArea().getHorizontalValue(); From 0128e4ea40d474f3dae5555fa5c5c8a59b31488c Mon Sep 17 00:00:00 2001 From: yaohwu Date: Fri, 10 Feb 2017 13:35:58 +0800 Subject: [PATCH 063/127] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 3 ++- designer_base/src/com/fr/design/roleAuthority/RoleTree.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 3f809fb4a7..338dfd1b9b 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -538,4 +538,5 @@ FR-Designer_Allow_Blank=Allow Blank FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property -FR-Designer_ClassName=Class Name \ No newline at end of file +FR-Designer_ClassName=Class Name +FR-Designer_Role=Role \ No newline at end of file diff --git a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java index e51c703df7..1af8c1caa0 100644 --- a/designer_base/src/com/fr/design/roleAuthority/RoleTree.java +++ b/designer_base/src/com/fr/design/roleAuthority/RoleTree.java @@ -1 +1 @@ -package com.fr.design.roleAuthority; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.SwingUtilities; import javax.swing.JTree; import javax.swing.JComponent; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; /** * Author : daisy * Time: 下午3:32 * Date: 13-8-30 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); Handler handler = createHandlerForRoleTree(); this.replaceMouseListener(this, handler, 0); this.replaceKeyListener(this, handler, 0); this.addTreeSelectionListener(handler); // this.removeMouseListener(treeMouseListener); // this.addTreeSelectionListener(new TreeSelectionListener() { // public void valueChanged(TreeSelectionEvent e) { // doWithValueChanged(e); // } // }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * Creates the mouse listener and key listener used by RoleTree. * * @return the Handler. */ protected Handler createHandlerForRoleTree() { return new Handler(this); } protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { protected RoleTree _tree; int _hotspot = new UICheckBox().getPreferredSize().width; private int _toggleCount = -1; public Handler(RoleTree tree) { _tree = tree; } protected TreePath getTreePathForMouseEvent(MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) { return null; } if (!_tree.isCheckBoxEnabled()) { return null; } TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); if (path == null) { return null; } // if (clicksInCheckBox(e, path)) { return path; // } else { // return null; // } } // protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { // if (!_tree.isCheckBoxVisible(path)) { // return false; // } else { // Rectangle bounds = _tree.getPathBounds(path); // if (_tree.getComponentOrientation().isLeftToRight()) { // return e.getX() < bounds.x + _hotspot; // } else { // return e.getX() > bounds.x + bounds.width - _hotspot; // } // } // } private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; } public void mouseClicked(MouseEvent e) { preventToggleEvent(e); } public void mousePressed(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { toggleSelection(path); e.consume(); } } public void mouseReleased(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { e.consume(); } if (_toggleCount != -1) { _tree.setToggleClickCount(_toggleCount); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void keyPressed(KeyEvent e) { if (e.isConsumed()) { return; } if (!_tree.isCheckBoxEnabled()) { return; } if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) { toggleSelections(); } } public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void valueChanged(TreeSelectionEvent e) { _tree.treeDidChange(); _tree.doWithValueChanged(e); } private void toggleSelection(TreePath path) { if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { return; } CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); selectionModel.removeTreeSelectionListener(this); try { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(true); } if (selected) selectionModel.removeSelectionPath(path); else selectionModel.addSelectionPath(path); } finally { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(false); } selectionModel.addTreeSelectionListener(this); _tree.treeDidChange(); _tree.doWithValueChanged(path); } } protected void toggleSelections() { TreePath[] treePaths = _tree.getSelectionPaths(); if (treePaths == null) { return; } for (int i = 0, length = treePaths.length; i < length; i++) { TreePath tmpTreePath = treePaths[i]; toggleSelection(tmpTreePath); } // for (TreePath treePath : treePaths) { // toggleSelection(treePath); // } } } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } /** * @param e 选中事件 */ protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("Role"))) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } /** * @param treepath 所选的节点路径 */ protected void doWithValueChanged(TreePath treepath) { if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("Role"))) { roleName = treepath.getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getUpPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getUpPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceUpPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /** * 去除不需要的鼠标监听器 * * @param component 组件 * @param l 所需的鼠标监听器 * @param index 插入的索引 */ private void replaceMouseListener(Component component, MouseListener l, int index) { component.removeMouseListener(treeMouseListener); MouseListener[] listeners = component.getMouseListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeMouseListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { MouseListener listener = listeners[i]; if (index == i) { component.addMouseListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addMouseListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addMouseListener(l); } } /** * 去除一些不需要的键盘监听器 * * @param component 组件 * @param l 所需的键盘监听器 * @param index 插入的索引 */ private void replaceKeyListener(Component component, KeyListener l, int index) { KeyListener[] listeners = component.getKeyListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeKeyListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { KeyListener listener = listeners[i]; if (index == i) { component.addKeyListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addKeyListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addKeyListener(l); } } /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); List childTreeNodeList = new ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file +package com.fr.design.roleAuthority; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.checkboxtree.CheckBoxTree; import com.fr.design.gui.itree.checkboxtree.CheckBoxTreeSelectionModel; import com.fr.general.NameObject; import com.fr.design.constants.UIConstants; import com.fr.design.beans.BasicBeanPane; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.UserObjectRefreshJTree; import com.fr.design.mainframe.AuthorityPropertyPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import javax.swing.SwingUtilities; import javax.swing.JTree; import javax.swing.JComponent; import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreePath; import java.awt.Component; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; /** * Author : daisy * Time: 下午3:32 * Date: 13-8-30 */ public class RoleTree extends UserObjectRefreshJTree { private static final long serialVersionUID = 2L; private String roleName = null; public RoleTree() { super(); this.setCellRenderer(roleTreeRenderer); this.setEnabled(true); this.setEditable(true); this.setRowHeight(20); this.setDigIn(true); Handler handler = createHandlerForRoleTree(); this.replaceMouseListener(this, handler, 0); this.replaceKeyListener(this, handler, 0); this.addTreeSelectionListener(handler); // this.removeMouseListener(treeMouseListener); // this.addTreeSelectionListener(new TreeSelectionListener() { // public void valueChanged(TreeSelectionEvent e) { // doWithValueChanged(e); // } // }); } public boolean isCheckBoxVisible(TreePath path) { return true; } /** * Creates the mouse listener and key listener used by RoleTree. * * @return the Handler. */ protected Handler createHandlerForRoleTree() { return new Handler(this); } protected static class Handler implements MouseListener, KeyListener, TreeSelectionListener { protected RoleTree _tree; int _hotspot = new UICheckBox().getPreferredSize().width; private int _toggleCount = -1; public Handler(RoleTree tree) { _tree = tree; } protected TreePath getTreePathForMouseEvent(MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) { return null; } if (!_tree.isCheckBoxEnabled()) { return null; } TreePath path = _tree.getPathForLocation(e.getX(), e.getY()); if (path == null) { return null; } // if (clicksInCheckBox(e, path)) { return path; // } else { // return null; // } } // protected boolean clicksInCheckBox(MouseEvent e, TreePath path) { // if (!_tree.isCheckBoxVisible(path)) { // return false; // } else { // Rectangle bounds = _tree.getPathBounds(path); // if (_tree.getComponentOrientation().isLeftToRight()) { // return e.getX() < bounds.x + _hotspot; // } else { // return e.getX() > bounds.x + bounds.width - _hotspot; // } // } // } private TreePath preventToggleEvent(MouseEvent e) { TreePath pathForMouseEvent = getTreePathForMouseEvent(e); if (pathForMouseEvent != null) { int toggleCount = _tree.getToggleClickCount(); if (toggleCount != -1) { _toggleCount = toggleCount; _tree.setToggleClickCount(-1); } } return pathForMouseEvent; } public void mouseClicked(MouseEvent e) { preventToggleEvent(e); } public void mousePressed(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { toggleSelection(path); e.consume(); } } public void mouseReleased(MouseEvent e) { TreePath path = preventToggleEvent(e); if (path != null) { e.consume(); } if (_toggleCount != -1) { _tree.setToggleClickCount(_toggleCount); } } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void keyPressed(KeyEvent e) { if (e.isConsumed()) { return; } if (!_tree.isCheckBoxEnabled()) { return; } if (e.getModifiers() == 0 && e.getKeyChar() == KeyEvent.VK_SPACE) { toggleSelections(); } } public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { } public void valueChanged(TreeSelectionEvent e) { _tree.treeDidChange(); _tree.doWithValueChanged(e); } private void toggleSelection(TreePath path) { if (!_tree.isEnabled() || !_tree.isCheckBoxEnabled(path)) { return; } CheckBoxTreeSelectionModel selectionModel = _tree.getCheckBoxTreeSelectionModel(); boolean selected = selectionModel.isPathSelected(path, selectionModel.isDigIn()); selectionModel.removeTreeSelectionListener(this); try { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(true); } if (selected) selectionModel.removeSelectionPath(path); else selectionModel.addSelectionPath(path); } finally { if (!selectionModel.isSingleEventMode()) { selectionModel.setBatchMode(false); } selectionModel.addTreeSelectionListener(this); _tree.treeDidChange(); _tree.doWithValueChanged(path); } } protected void toggleSelections() { TreePath[] treePaths = _tree.getSelectionPaths(); if (treePaths == null) { return; } for (int i = 0, length = treePaths.length; i < length; i++) { TreePath tmpTreePath = treePaths[i]; toggleSelection(tmpTreePath); } // for (TreePath treePath : treePaths) { // toggleSelection(treePath); // } } } /** * 更新UI */ public void updateUI() { super.updateUI(); setUI(new UIRoleTreeUI()); } /** * @param e 选中事件 */ protected void doWithValueChanged(TreeSelectionEvent e) { if (e.getNewLeadSelectionPath() != null) { if (!e.getNewLeadSelectionPath().getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = e.getNewLeadSelectionPath().getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } } /** * @param treepath 所选的节点路径 */ protected void doWithValueChanged(TreePath treepath) { if (treepath != null && !treepath.getLastPathComponent().toString().equals(Inter.getLocText("FR-Designer_Role"))) { roleName = treepath.getLastPathComponent().toString(); setTabRoleName(roleName); refreshRoleTree(roleName); refreshElementAndAuthorityPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().judgeSheetAuthority(roleName); } } protected void setTabRoleName(String roleName) { } /** * 刷新角色树 * * @param selectedRole 角色 */ public void refreshRoleTree(String selectedRole) { if (EastRegionContainerPane.getInstance().getUpPane() instanceof AuthorityPropertyPane) { AuthorityPropertyPane authorityPropertyPane = (AuthorityPropertyPane) EastRegionContainerPane.getInstance().getUpPane(); authorityPropertyPane.populate(); EastRegionContainerPane.getInstance().replaceUpPane(authorityPropertyPane); } } public void setSelectedRole(String selectedRole, TreePath parent) { ExpandMutableTreeNode node = (ExpandMutableTreeNode) parent.getLastPathComponent(); if (node.children() != null && node.getChildCount() >= 0) { for (Enumeration e = node.children(); e.hasMoreElements(); ) { ExpandMutableTreeNode n = (ExpandMutableTreeNode) e.nextElement(); Object userObj = n.getUserObject(); String chilld = null; if (userObj instanceof String) { chilld = (String) userObj; } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; chilld = nameObject.getName(); } if (ComparatorUtils.equals(chilld, selectedRole)) { this.setSelectionPath(parent.pathByAddingChild(n)); return; } else { setSelectedRole(selectedRole, parent.pathByAddingChild(n)); } } } } private void refreshElementAndAuthorityPane() { JComponent authorityToolBar = DesignerContext.getDesignerFrame().getToolbarComponent(); if (authorityToolBar instanceof BasicBeanPane) { //说明是工具栏的 ((BasicBeanPane) authorityToolBar).populateAuthority(); } HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().repaint(); } public String getSelectedRoleName() { return roleName; } public void setSelectedRoleName(String name) { roleName = name; } private DefaultTreeCellRenderer roleTreeRenderer = new DefaultTreeCellRenderer() { private static final long serialVersionUID = 2L; public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); ExpandMutableTreeNode treeNode = (ExpandMutableTreeNode) value; Object userObj = treeNode.getUserObject(); if (userObj instanceof String) { // p:这个是column field. this.setIcon(null); this.setText((String) userObj); } else if (userObj instanceof NameObject) { NameObject nameObject = (NameObject) userObj; this.setText(nameObject.getName()); this.setIcon(null); } // 这里新建一个Label作为render是因为JTree在动态刷新的时候,节点上render画布的的宽度不会变,会使得一部分比较长的数据显示为"..." this.setBackgroundNonSelectionColor(UIConstants.NORMAL_BACKGROUND); this.setForeground(UIConstants.FONT_COLOR); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); return this; } }; /** * 去除不需要的鼠标监听器 * * @param component 组件 * @param l 所需的鼠标监听器 * @param index 插入的索引 */ private void replaceMouseListener(Component component, MouseListener l, int index) { component.removeMouseListener(treeMouseListener); MouseListener[] listeners = component.getMouseListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeMouseListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { MouseListener listener = listeners[i]; if (index == i) { component.addMouseListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addMouseListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addMouseListener(l); } } /** * 去除一些不需要的键盘监听器 * * @param component 组件 * @param l 所需的键盘监听器 * @param index 插入的索引 */ private void replaceKeyListener(Component component, KeyListener l, int index) { KeyListener[] listeners = component.getKeyListeners(); for (int i = 0, length = listeners.length; i < length; i++) { component.removeKeyListener(listeners[i]); } // for (MouseListener listener : listeners) { // component.removeMouseListener(listener); // } for (int i = 0; i < listeners.length; i++) { KeyListener listener = listeners[i]; if (index == i) { component.addKeyListener(l); } if (listener instanceof CheckBoxTree.Handler) { continue; } component.addKeyListener(listener); } // index is too large, add to the end. if (index > listeners.length - 1) { component.addKeyListener(l); } } /* * p:获得选中的NameObject = name + role. */ public NameObject getSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); return new NameObject(selectedUserObject.toString(), ""); } /** * p:添加一个NameObject节点 * * @param no 需要添加的节点 */ public void addNameObject(NameObject no) { if (no == null) { return; } DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); // 新建一个放着NameObject的newChildTreeNode,加到Root下面 ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); ExpandMutableTreeNode newChildTreeNode = new ExpandMutableTreeNode(no); root.add(newChildTreeNode); newChildTreeNode.add(new ExpandMutableTreeNode()); treeModel.reload(root); } /** * 刷新树节点 */ public void refreshTreeNode() { DefaultTreeModel treeModel = (DefaultTreeModel) this.getModel(); ExpandMutableTreeNode root = (ExpandMutableTreeNode) treeModel.getRoot(); if (interceptRefresh(root)) { return; } ExpandMutableTreeNode[] new_nodes = loadChildTreeNodes(root); List childTreeNodeList = new ArrayList(); for (int i = 0, len = root.getChildCount(); i < len; i++) { if (root.getChildAt(i) instanceof ExpandMutableTreeNode) { childTreeNodeList.add((ExpandMutableTreeNode) root.getChildAt(i)); } else { childTreeNodeList.add((DefaultMutableTreeNode) root.getChildAt(i)); } } root.removeAllChildren(); for (int ci = 0; ci < new_nodes.length; ci++) { Object cUserObject = new_nodes[ci].getUserObject(); for (int ni = 0, nlen = childTreeNodeList.size(); ni < nlen; ni++) { ExpandMutableTreeNode cTreeNode = (ExpandMutableTreeNode) childTreeNodeList.get(ni); if (ComparatorUtils.equals(cTreeNode.getUserObject(), cUserObject)) { new_nodes[ci].setExpanded(cTreeNode.isExpanded()); if (cTreeNode.getFirstChild() instanceof ExpandMutableTreeNode && cTreeNode.isExpanded()) { checkChildNodes(cTreeNode, new_nodes[ci]); } break; } } root.add(new_nodes[ci]); } } protected void checkChildNodes(ExpandMutableTreeNode oldNode, ExpandMutableTreeNode newNode) { for (int i = 0; i < oldNode.getChildCount(); i++) { ExpandMutableTreeNode oldChild = (ExpandMutableTreeNode) oldNode.getChildAt(i); for (int j = 0; j < newNode.getChildCount(); j++) { ExpandMutableTreeNode newChild = (ExpandMutableTreeNode) newNode.getChildAt(j); ExpandMutableTreeNode[] nodes = RoleTree.this.loadChildTreeNodes(newChild); for (int k = 0; k < nodes.length; k++) { newChild.add(nodes[k]); } if (newChild.getChildCount() > 1 && ((ExpandMutableTreeNode) newChild.getFirstChild()).getUserObject() == PENDING) { newChild.remove(0); } if (ComparatorUtils.equals(oldChild.getUserObject(), newChild.getUserObject())) { newChild.setExpanded(oldChild.isExpanded()); } } } } public NameObject getRealSelectedNameObject() { TreePath selectedTreePath = this.getSelectionPath(); if (selectedTreePath == null) { return null; } ExpandMutableTreeNode selectedTreeNode = (ExpandMutableTreeNode) selectedTreePath.getLastPathComponent(); Object selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } selectedTreeNode = (ExpandMutableTreeNode) selectedTreeNode.getParent(); selectedUserObject = selectedTreeNode.getUserObject(); if (selectedUserObject instanceof NameObject) { return (NameObject) selectedUserObject; } return null; } } \ No newline at end of file From f2a4d487491aecd6abf64e7296e3caa4f4943810 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 10 Feb 2017 13:53:15 +0800 Subject: [PATCH 064/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=9423/23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/help/TutorialAction.java | 15 ++++++++++++--- .../design/mainframe/toolbar/ToolBarMenuDock.java | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/help/TutorialAction.java b/designer_base/src/com/fr/design/actions/help/TutorialAction.java index b238359455..c62ad00262 100644 --- a/designer_base/src/com/fr/design/actions/help/TutorialAction.java +++ b/designer_base/src/com/fr/design/actions/help/TutorialAction.java @@ -60,17 +60,26 @@ public class TutorialAction extends UpdateAction { */ public void actionPerformed(ActionEvent evt) { Locale locale = FRContext.getLocale(); - if (ComparatorUtils.equals(locale, Locale.CHINA) || ComparatorUtils.equals(locale, Locale.TAIWAN)){ - HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("help")); + String helpKey = ""; + + if (ComparatorUtils.equals(locale, Locale.CHINA) || ComparatorUtils.equals(locale, Locale.TAIWAN)) { + helpKey = "help"; + } else if (ComparatorUtils.equals(locale, Locale.US)) { + helpKey = "help.en"; + } + + if (!helpKey.isEmpty()) { + HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(helpKey)); if(client.getResponseCode() != -1) { try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("help"))); + Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind(helpKey))); return; } catch (Exception e) { //出了异常的话, 依然打开本地教程 } } } + if (OperatingSystem.isMacOS()) { nativeExcuteMacInstallHomePrograms("helptutorial.app"); } diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 8c60068702..7fcea5d1ec 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -312,9 +312,10 @@ public abstract class ToolBarMenuDock { public ShortCut[] createHelpShortCuts() { java.util.List shortCuts = new ArrayList(); shortCuts.add(new WebDemoAction()); - // 英文,把 video 的链接放到 Help 下面 + // 英文,把 video 和帮助文档放到 Help 下面 if (FRContext.getLocale().equals(Locale.US)) { shortCuts.add(new VideoAction()); + shortCuts.add(new TutorialAction()); } shortCuts.add(SeparatorDef.DEFAULT); //shortCuts.add(new TutorialAction()); From 0d4e8bb5d16d7e145270007f3a1d7ba9ce9b7121 Mon Sep 17 00:00:00 2001 From: plough Date: Fri, 10 Feb 2017 16:01:13 +0800 Subject: [PATCH 065/127] =?UTF-8?q?=E5=A4=84=E7=90=86=20PMD=20=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cell/settingpane/CellOtherSetPane.java | 40 +++++++++---------- .../com/fr/design/locale/designer.properties | 13 +++++- .../design/locale/designer_en_US.properties | 11 +++++ .../design/locale/designer_ja_JP.properties | 11 +++++ .../design/locale/designer_ko_KR.properties | 13 +++++- .../design/locale/designer_zh_CN.properties | 11 +++++ .../design/locale/designer_zh_TW.properties | 11 +++++ .../present/dict/TableDataDictPane.java | 8 ++-- .../gradient/GradientBackgroundPane.java | 4 +- 9 files changed, 94 insertions(+), 28 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index cee3ac401b..0e45a1e970 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -78,23 +78,23 @@ public class CellOtherSetPane extends AbstractCellAttrPane { double p = TableLayout.PREFERRED; double[] rowSize1 = {p, p, p, p, p, p, p}; double[] columnSize1 = {p, f}; - UILabel autoAdjustLabel = new UILabel(Inter.getLocText("Auto_Adjust_Size") + ":", SwingConstants.RIGHT); + UILabel autoAdjustLabel = new UILabel(Inter.getLocText("FR-Designer_Auto_Adjust_Size") + ":", SwingConstants.RIGHT); autoAdjustLabel.setVerticalAlignment(UILabel.TOP); Component[][] components1 = new Component[][]{ new Component[]{autoAdjustLabel, autoshrik}, - new Component[]{new UILabel(Inter.getLocText("Preview") + ":", SwingConstants.RIGHT), previewCellContent}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Preview") + ":", SwingConstants.RIGHT), previewCellContent}, new Component[]{new UILabel(Inter.getLocText("CellWrite-Print_Export") + ":", SwingConstants.RIGHT), printAndExportContent}, new Component[]{null, printAndExportBackground}, - new Component[]{new UILabel(Inter.getLocText("Show_Content") + ":", SwingConstants.RIGHT), showContent}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Show_Content") + ":", SwingConstants.RIGHT), showContent}, new Component[]{null, fileNamePane}, - new Component[]{new UILabel(Inter.getLocText("CellWrite-ToolTip") + ":", SwingConstants.RIGHT), tooltipTextField}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_CellWrite_ToolTip") + ":", SwingConstants.RIGHT), tooltipTextField}, }; JPanel northContentPane = TableLayoutHelper.createTableLayoutPane(components1, rowSize1, columnSize1); double[] rowSize2 = {p, p, p, p, p, p}; double[] columnSize2 = {p, f}; Component[][] components2 = new Component[][]{ new Component[]{new JSeparator(JSeparator.HORIZONTAL), null}, - new Component[]{new UILabel(Inter.getLocText("Pagination")), null}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Pagination")), null}, new Component[]{pageBeforeRowCheckBox, pageAfterRowCheckBox}, new Component[]{pageBeforeColumnCheckBox, pageAfterColumnCheckBox}, new Component[]{canBreakOnPaginateCheckBox, null}, @@ -123,7 +123,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane { private JPanel createNormal() { String[] AjustRowTypes = new String[]{ - Inter.getLocText("No"), Inter.getLocText("Utils-Row_Height"), Inter.getLocText("Utils-Column_Width"), Inter.getLocText("Default")}; + Inter.getLocText("FR-Designer_No"), Inter.getLocText("Utils-Row_Height"), Inter.getLocText("Utils-Column_Width"), Inter.getLocText("FR-Designer_DEFAULT")}; autoshrik = new UIButtonGroup(AjustRowTypes); if (FRContext.getLocale().equals(Locale.US)) { // 英文显示不全,故每行一个按钮 @@ -138,13 +138,13 @@ public class CellOtherSetPane extends AbstractCellAttrPane { printAndExportContent = new UICheckBox(Inter.getLocText("CellWrite-Print_Content")); printAndExportBackground = new UICheckBox(Inter.getLocText("CellWrite-Print_Background")); - showContent = new UIComboBox(new String[]{Inter.getLocText("Default"), Inter.getLocText("CellWrite-Show_As_Image"), Inter.getLocText("CellWrite-Show_As_HTML"), - Inter.getLocText("ShowAsDownload")}); + showContent = new UIComboBox(new String[]{Inter.getLocText("FR-Designer_DEFAULT"), Inter.getLocText("CellWrite-Show_As_Image"), Inter.getLocText("CellWrite-Show_As_HTML"), + Inter.getLocText("FR-Designer_Show_As_Download")}); final CardLayout fileNameLayout = new CardLayout(); final JPanel fileNamePane = new JPanel(fileNameLayout); JPanel fileNameCCPane = new JPanel(new BorderLayout(4, 0)); - fileNameCCPane.add(new UILabel(Inter.getLocText("FileNameForDownload")), BorderLayout.WEST); + fileNameCCPane.add(new UILabel(Inter.getLocText("FR-Designer_File_Name_For_Download")), BorderLayout.WEST); fileNameTextField = new UITextField(); tooltipTextField = new UITextField(); @@ -194,13 +194,13 @@ public class CellOtherSetPane extends AbstractCellAttrPane { } private void initAllNames() { - autoshrik.setGlobalName(Inter.getLocText("Auto_Adjust_Size")); - previewCellContent.setGlobalName(Inter.getLocText("Preview")); + autoshrik.setGlobalName(Inter.getLocText("FR-Designer_Auto_Adjust_Size")); + previewCellContent.setGlobalName(Inter.getLocText("FR-Designer_Preview")); printAndExportContent.setGlobalName(Inter.getLocText("CellWrite-Preview_Cell_Content")); printAndExportBackground.setGlobalName(Inter.getLocText("CellWrite-Print_Background")); - showContent.setGlobalName(Inter.getLocText("Show_Content")); - fileNameTextField.setGlobalName(Inter.getLocText("Show_Content")); - tooltipTextField.setGlobalName(Inter.getLocText("CellWrite-ToolTip")); + showContent.setGlobalName(Inter.getLocText("FR-Designer_Show_Content")); + fileNameTextField.setGlobalName(Inter.getLocText("FR-Designer_Show_Content")); + tooltipTextField.setGlobalName(Inter.getLocText("FR-Designer_CellWrite_ToolTip")); pageBeforeRowCheckBox.setGlobalName(Inter.getLocText("CellWrite-Page_Before_Row")); pageAfterRowCheckBox.setGlobalName(Inter.getLocText("CellWrite-Page_After_Row")); pageBeforeColumnCheckBox.setGlobalName(Inter.getLocText("CellWrite-Page_Before_Column")); @@ -232,10 +232,10 @@ public class CellOtherSetPane extends AbstractCellAttrPane { } else if (cellGUIAttr.isShowAsHTML()) { showContent.setSelectedItem(Inter.getLocText("CellWrite-Show_As_HTML")); } else if (cellGUIAttr.isShowAsDownload()) { - showContent.setSelectedItem(Inter.getLocText("ShowAsDownload")); + showContent.setSelectedItem(Inter.getLocText("FR-Designer_Show_As_Download")); fileNameTextField.setText(cellGUIAttr.getFileName()); } else { - showContent.setSelectedItem(Inter.getLocText("Default")); + showContent.setSelectedItem(Inter.getLocText("FR-Designer_DEFAULT")); } tooltipTextField.setText(cellGUIAttr.getTooltipText()); CellPageAttr cellPageAttr = cellElement.getCellPageAttr(); // 分页 @@ -280,11 +280,11 @@ public class CellOtherSetPane extends AbstractCellAttrPane { cellGUIAttr = new CellGUIAttr(); } - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("Auto_Adjust_Size"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_Auto_Adjust_Size"))) { cellGUIAttr.setAdjustMode(autoshrik.getSelectedIndex()); } - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("Preview"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_Preview"))) { cellGUIAttr.setPreviewContent(previewCellContent.isSelected()); } @@ -296,7 +296,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane { cellGUIAttr.setPrintBackground(printAndExportBackground.isSelected()); } - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("Show_Content"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_Show_Content"))) { cellGUIAttr.setShowAsDefault(showContent.getSelectedIndex() == 0); cellGUIAttr.setShowAsImage(showContent.getSelectedIndex() == 1); cellGUIAttr.setShowAsHTML(showContent.getSelectedIndex() == 2); @@ -308,7 +308,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane { } } - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("CellWrite-ToolTip"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_CellWrite_ToolTip"))) { if (tooltipTextField.getText() == null || tooltipTextField.getText().trim().length() <= 0) { cellGUIAttr.setTooltipText(fieldName); } else { diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 8815e4b031..c0070f71fd 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -542,4 +542,15 @@ FR-Designer_ClassName=Class Name FR-Designer_Polyblock_Edit=Polyblock Edit FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes} FR-Designer_PageSetup_Horizontal=Horizontal -FR-Designer_PageSetup_Vertical=Vertical \ No newline at end of file +FR-Designer_PageSetup_Vertical=Vertical +FR-Designer_Gradient_Direction=Gradient Direction +FR-Designer_Drag_To_Select_Gradient=\\ Drag the button below to choose gradient area, click it to choose color +FR-Designer_Display_Value=Display Value +FR-Designer_Actual_Value=Actual Value +FR-Designer_CellWrite_ToolTip=Tool Tip of Cell +FR-Designer_Show_Content=Show content +FR-Designer_Auto_Adjust_Size=Auto adjust +FR-Designer_Show_As_Download=Display the binary content using download link +FR-Designer_File_Name_For_Download=File Name For Download +FR-Designer_No=No +FR-Designer_Pagination=Page Break \ 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 0e7a873f04..8f2bae3504 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 @@ -543,3 +543,14 @@ FR-Designer_Polyblock_Edit=Aggregation block edition FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Vertical=Vertical +FR-Designer_Gradient_Direction=Gradient Direction +FR-Designer_Drag_To_Select_Gradient=\\ Drag the button below to choose gradient area, click it to choose color +FR-Designer_Display_Value=Display Value +FR-Designer_Actual_Value=Actual Value +FR-Designer_CellWrite_ToolTip=Tool Tip of Cell +FR-Designer_Show_Content=Show content +FR-Designer_Auto_Adjust_Size=Auto adjust +FR-Designer_Show_As_Download=Display the binary content using download link +FR-Designer_File_Name_For_Download=File Name For Download +FR-Designer_No=No +FR-Designer_Pagination=Page Break 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 7c332c617e..1cbfc8e5d5 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 @@ -522,3 +522,14 @@ FR-Designer_Polyblock_Edit=\u30A2\u30B0\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30D FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}WEB-INF{R2}classes" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R3}classes FR-Designer_PageSetup_Horizontal=\u6A2A\u65B9\u5411 FR-Designer_PageSetup_Vertical=\u7E26\u65B9\u5411 +FR-Designer_Gradient_Direction=\u65B9\u5411\u3092\u5F90\u3005\u306B\u5909\u5316 +FR-Designer_Drag_To_Select_Gradient=\\ \u4E0B\u65B9\u306E\u30DC\u30BF\u30F3\u3092\u30D7\u30EB\u30C0\u30A6\u30F3\u3057\u3066\u6F38\u6B21\u5909\u5316\u30A8\u30EA\u30A2\u3092\u9078\u629E\u3057\u3001\u30AF\u30EA\u30C3\u30AF\u3057 +FR-Designer_Display_Value=\u8868\u793A\u5024 +FR-Designer_Actual_Value=\u5B9F\u969B\u5024 +FR-Designer_CellWrite_ToolTip=\u30BB\u30EB\u30D2\u30F3\u30C8 +FR-Designer_Show_Content=\u5185\u5BB9\u8868\u793A +FR-Designer_Auto_Adjust_Size=\u81EA\u52D5\u8ABF\u6574 +FR-Designer_Show_As_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30EA\u30F3\u30AF\u3067\uFF12\u9032\u6CD5\u306E\u5185\u5BB9\u3092\u8868\u793A +FR-Designer_File_Name_For_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30D5\u30A1\u30A4\u30EB\u540D +FR-Designer_No=\u3044\u3044\u3048 +FR-Designer_Pagination=\u30DA\u30FC\u30B8\u30F3\u30B0 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 9736b112f1..23afd40374 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 @@ -516,4 +516,15 @@ FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 FR-Designer_Polyblock_Edit=\uCDE8\uD569\uBE14\uB7ED\uD3B8\uC9D1 FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}WEB-INF{R2}classes" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R3}classes FR-Designer_PageSetup_Horizontal=\uAC00\uB85C -FR-Designer_PageSetup_Vertical=\uC138\uB85C \ No newline at end of file +FR-Designer_PageSetup_Vertical=\uC138\uB85C +FR-Designer_Gradient_Direction=\uADF8\uB77C\uB370\uC774\uC158 \uBC29\uD5A5 +FR-Designer_Drag_To_Select_Gradient=\\\uD558\uB2E8\uD0A4\uB97C\uB4DC\uB798\uADF8\uD558\uC5EC\uADF8\uB77C\uB370\uC774\uC158\uC601\uC5ED\uC744\uC120\uD0DD\uD558\uACE0\uD0A4\uB97C\uD074\uB9AD\uD558\uC5EC\uD574\uB2F9\uC0C9\uC120\uD0DD +FR-Designer_Display_Value=\uAC12\uBCF4\uC774\uAE30 +FR-Designer_Actual_Value=\uC2E4\uC81C\uAC12 +FR-Designer_CellWrite_ToolTip=\uB0B4\uC6A9\uC54C\uB9BC +FR-Designer_Show_Content=\uB0B4\uC6A9\uBCF4\uC774\uAE30 +FR-Designer_Auto_Adjust_Size=\uC790\uB3D9\uC870\uC815 +FR-Designer_Show_As_Download=\uB2E4\uC6B4\uB85C\uB4DC\uB9C1\uD06C\uB85C2\uC9C4\uBC95\uB0B4\uC6A9\uBCF4\uC774\uAE30 +FR-Designer_File_Name_For_Download=\uB2E4\uC6B4\uB85C\uB4DC\uD30C\uC77C\uBA85 +FR-Designer_No=\uC544\uB2C8\uC624 +FR-Designer_Pagination=\uD398\uC774\uC9C0\uB098\uB204\uAE30 \ 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 56cd24ad85..e00290c7cb 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 @@ -547,4 +547,15 @@ FR-Designer_Polyblock_Edit=\u805A\u5408\u5757\u7F16\u8F91 FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Vertical=\u7EB5\u5411 +FR-Designer_Gradient_Direction=\u6E10\u53D8\u65B9\u5411 +FR-Designer_Drag_To_Select_Gradient=\\ \u62D6\u52A8\u4E0B\u65B9\u6309\u94AE\u9009\u62E9\u6E10\u53D8\u533A\u57DF\uFF0C\u5355\u51FB\u6309\u94AE\u9009\u62E9\u5BF9\u5E94\u989C\u8272 +FR-Designer_Display_Value=\u663E\u793A\u503C +FR-Designer_Actual_Value=\u5B9E\u9645\u503C +FR-Designer_CellWrite_ToolTip=\u5185\u5BB9\u63D0\u793A +FR-Designer_Show_Content=\u663E\u793A\u5185\u5BB9 +FR-Designer_Auto_Adjust_Size=\u81EA\u52A8\u8C03\u6574 +FR-Designer_Show_As_Download=\u7528\u4E0B\u8F7D\u94FE\u63A5\u663E\u793A\u4E8C\u8FDB\u5236\u5185\u5BB9 +FR-Designer_File_Name_For_Download=\u4E0B\u8F7D\u6587\u4EF6\u540D +FR-Designer_No=\u5426 +FR-Designer_Pagination=\u5206\u9875 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 7f863d3455..011819a9c3 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 @@ -535,3 +535,14 @@ FR-Designer_Polyblock_Edit=\u805A\u5408\u584A\u7DE8\u8F2F FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Vertical=\u7E31\u5411 +FR-Designer_Gradient_Direction=\u6F38\u8B8A\u65B9\u5411 +FR-Designer_Drag_To_Select_Gradient=\\ \u62D6\u52D5\u4E0B\u767C\u90A3\u500B\u6309\u9215\u61F8\u8457\u5340\u57DF\uFF0C\u55AE\u64CA\u6309\u9215\u9078\u64C7\u984F\u8272 +FR-Designer_Display_Value=\u986F\u793A\u503C +FR-Designer_Actual_Value=\u5BE6\u969B\u503C +FR-Designer_CellWrite_ToolTip=\u5167\u5BB9\u63D0\u793A +FR-Designer_Show_Content=\u986F\u793A\u5167\u5BB9 +FR-Designer_Auto_Adjust_Size=\u81EA\u52D5\u8ABF\u6574 +FR-Designer_Show_As_Download=\u7528\u4E0B\u8F09\u93C8\u63A5\u986F\u793A\u4E8C\u9032\u5236\u5167\u5BB9 +FR-Designer_File_Name_For_Download=\u4E0B\u8F09\u6A94\u6848\u540D +FR-Designer_No=\u5426 +FR-Designer_Pagination=\u5206\u9801 diff --git a/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java b/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java index 414abedacf..8edea3c58c 100644 --- a/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java +++ b/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java @@ -77,7 +77,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane } }); keyColumnPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()}); - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Engine_Parameter-Formula")); formulaEditor.setEnabled(true); valueDictPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor(), formulaEditor}); } @@ -96,8 +96,8 @@ public class TableDataDictPane extends FurtherBasicBeanPane Component[][] components = new Component[][]{ new Component[]{new UILabel(" " + Inter.getLocText("FR-Engine_DS-TableData") + ":", UILabel.RIGHT), firstLine}, - new Component[]{new UILabel(Inter.getLocText("Actual_Value") + ":", UILabel.RIGHT), keyColumnPane}, - new Component[]{new UILabel(Inter.getLocText("Display_Value") + ":", UILabel.RIGHT), valueDictPane} + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Actual_Value") + ":", UILabel.RIGHT), keyColumnPane}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Display_Value") + ":", UILabel.RIGHT), valueDictPane} }; JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); @@ -158,7 +158,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane columnIndexEditor1.addItemListener(itemListener); keyColumnPane.setEditors(new Editor[]{columnNameEditor1, columnIndexEditor1}, columnNames[0]); - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Engine_Parameter-Formula")); formulaEditor.setEnabled(true); formulaEditor.addChangeListener(new ChangeListener() { diff --git a/designer_base/src/com/fr/design/style/background/gradient/GradientBackgroundPane.java b/designer_base/src/com/fr/design/style/background/gradient/GradientBackgroundPane.java index e08c1a7a43..ee0cd3385b 100644 --- a/designer_base/src/com/fr/design/style/background/gradient/GradientBackgroundPane.java +++ b/designer_base/src/com/fr/design/style/background/gradient/GradientBackgroundPane.java @@ -43,7 +43,7 @@ public class GradientBackgroundPane extends BackgroundDetailPane { JPanel blankJp = new JPanel(); gradientBar = new GradientBar(4, 254); blankJp.add(gradientBar); - UILabel jl = new UILabel(Inter.getLocText("Drag_to_select_gradient")); + UILabel jl = new UILabel(Inter.getLocText("FR-Designer_Drag_To_Select_Gradient")); jl.setHorizontalAlignment(SwingConstants.CENTER); gradientPanel.add(jl, BorderLayout.NORTH); gradientPanel.add(blankJp, BorderLayout.SOUTH); @@ -53,7 +53,7 @@ public class GradientBackgroundPane extends BackgroundDetailPane { JPanel innercenterPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); centerPane.add(new UILabel(" ")); centerPane.add(innercenterPane); - innercenterPane.add(new UILabel(Inter.getLocText("Gradient-Direction") + ":")); + innercenterPane.add(new UILabel(Inter.getLocText("FR-Designer_Gradient_Direction") + ":")); left2right = new UIRadioButton(Inter.getLocText("FR-Designer_PageSetup_Horizontal")); innercenterPane.add(left2right); From b61dc6bad05370fe9f1f886423fa3dc5aa0bc2f6 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 13 Feb 2017 10:20:07 +0800 Subject: [PATCH 066/127] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/style/color/ColorSelectConfigManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java b/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java index 941ce35fd8..af3d7df81f 100644 --- a/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java +++ b/designer_base/src/com/fr/design/style/color/ColorSelectConfigManager.java @@ -53,7 +53,7 @@ public class ColorSelectConfigManager extends XMLFileManager implements ColorSel //初次打开软件时从xml文件中获取历史颜色信息 if (init) { - ColorSelectConfigManagerProvider manager = colorSelectConfigManager.getProviderInstance(); + ColorSelectConfigManagerProvider manager = ColorSelectConfigManager.getProviderInstance(); this.colors = manager.getColorsFromFile(); init = false; } @@ -93,7 +93,7 @@ public class ColorSelectConfigManager extends XMLFileManager implements ColorSel /*@author yaohwu*/ //将历史颜色信息保存到xml文件中去 - ColorSelectConfigManagerProvider manager = colorSelectConfigManager.getProviderInstance(); + ColorSelectConfigManagerProvider manager = ColorSelectConfigManager.getProviderInstance(); if (colors != null && !colors.isEmpty()) { manager.setColorsToFile(colors); } From d38c4fdc1da30b1867bb4d4e472b332e1153bb5c Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 13 Feb 2017 10:36:50 +0800 Subject: [PATCH 067/127] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/style/color/ColorSelectConfigManagerProvider.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/style/color/ColorSelectConfigManagerProvider.java b/designer_base/src/com/fr/design/style/color/ColorSelectConfigManagerProvider.java index ea9783bb7d..f9b2ec9881 100644 --- a/designer_base/src/com/fr/design/style/color/ColorSelectConfigManagerProvider.java +++ b/designer_base/src/com/fr/design/style/color/ColorSelectConfigManagerProvider.java @@ -11,6 +11,7 @@ import java.util.List; */ public interface ColorSelectConfigManagerProvider extends RemoteXMLFileManagerProvider { - public List getColorsFromFile(); - public void setColorsToFile(List colors); + List getColorsFromFile(); + + void setColorsToFile(List colors); } From 23b833b9d5735501d812b83012126eee807126d8 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 13 Feb 2017 10:49:08 +0800 Subject: [PATCH 068/127] =?UTF-8?q?=E8=B0=83=E6=95=B4=20SiteCenter=20?= =?UTF-8?q?=E5=8F=96=E5=80=BC=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/actions/help/AboutPane.java | 12 ++---------- .../fr/design/actions/help/TutorialAction.java | 15 ++++----------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index c16f2047b9..5ee395f801 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -80,16 +80,8 @@ public class AboutPane extends JPanel { contentPane.add(boxCenterAlignmentPane); } - String locale; // SiteCenter 取值的 key 后缀 - if (FRContext.getLocale().equals(Locale.US)) { - locale = ".en"; - } else if (FRContext.getLocale().equals(Locale.JAPAN)) { - locale = ".jp"; - } else { - locale = ""; - } - BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website" + locale, ProductConstants.WEBSITE_URL)); - BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("register.email", ProductConstants.SUPPORT_EMAIL)); + BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website." + FRContext.getLocale(), ProductConstants.WEBSITE_URL)); + BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL)); contentPane.add(actionLabel); contentPane.add(emailLabel); diff --git a/designer_base/src/com/fr/design/actions/help/TutorialAction.java b/designer_base/src/com/fr/design/actions/help/TutorialAction.java index c62ad00262..8ae2b2962e 100644 --- a/designer_base/src/com/fr/design/actions/help/TutorialAction.java +++ b/designer_base/src/com/fr/design/actions/help/TutorialAction.java @@ -59,20 +59,13 @@ public class TutorialAction extends UpdateAction { * @param evt 事件 */ public void actionPerformed(ActionEvent evt) { - Locale locale = FRContext.getLocale(); - String helpKey = ""; + String helpURL = SiteCenter.getInstance().acquireUrlByKind("help." + FRContext.getLocale()); - if (ComparatorUtils.equals(locale, Locale.CHINA) || ComparatorUtils.equals(locale, Locale.TAIWAN)) { - helpKey = "help"; - } else if (ComparatorUtils.equals(locale, Locale.US)) { - helpKey = "help.en"; - } - - if (!helpKey.isEmpty()) { - HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(helpKey)); + if (helpURL != null) { + HttpClient client = new HttpClient(helpURL); if(client.getResponseCode() != -1) { try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind(helpKey))); + Desktop.getDesktop().browse(new URI(helpURL)); return; } catch (Exception e) { //出了异常的话, 依然打开本地教程 From 8da78dc6297ac99ae535da57d0d7754ec23a8721 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 13 Feb 2017 14:59:54 +0800 Subject: [PATCH 069/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9Ekey?= 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 + .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_ja_JP.properties | 1 + .../src/com/fr/design/locale/designer_ko_KR.properties | 1 + .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + .../src/com/fr/design/present/dict/TableDataDictPane.java | 2 +- 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index bec7497608..9380fddb02 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -558,3 +558,4 @@ FR-Designer-Move_Tab_First=move to first FR-Designer-Move_Tab_End=move to end FR-Designer-Move_Tab_Next=move to next FR-Designer-Move_Tab_Prev=move to previous +FR-Designer_DS_TableData=Data Set 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 e003b6e428..cbcac747fa 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 @@ -558,3 +558,4 @@ FR-Designer-Move_Tab_First=move to first FR-Designer-Move_Tab_End=move to end FR-Designer-Move_Tab_Next=move to next FR-Designer-Move_Tab_Prev=move to previous +FR-Designer_DS_TableData=Data Set 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 b39bcfca05..6470f89574 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 @@ -537,3 +537,4 @@ FR-Designer-Move_Tab_First= FR-Designer-Move_Tab_End= FR-Designer-Move_Tab_Next= FR-Designer-Move_Tab_Prev= +FR-Designer_DS_TableData=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9 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 849d7e6e13..37be51e563 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 @@ -532,3 +532,4 @@ FR-Designer-Move_Tab_First= FR-Designer-Move_Tab_End= FR-Designer-Move_Tab_Next= FR-Designer-Move_Tab_Prev= +FR-Designer_DS_TableData=\uB370\uC774\uD130\uC138\uD2B8 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 50fdab60cb..2f5549d9df 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 @@ -562,4 +562,5 @@ FR-Designer-Move_Tab_First=\u79FB\u52A8\u5230\u9996\u4F4D FR-Designer-Move_Tab_End=\u79FB\u52A8\u5230\u672B\u5C3E FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8 FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8 +FR-Designer_DS_TableData=\u6570\u636E\u96C6 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 c88c665a48..c78ba8f155 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 @@ -550,3 +550,4 @@ FR-Designer-Move_Tab_First=\u79FB\u52D5\u5230\u9996\u4F4D FR-Designer-Move_Tab_End=\u79FB\u52D5\u5230\u672B\u5C3E FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5 FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5 +FR-Designer_DS_TableData=\u8CC7\u6599\u96C6 diff --git a/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java b/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java index 8edea3c58c..c51fe8b4ac 100644 --- a/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java +++ b/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java @@ -95,7 +95,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane Component[][] components = new Component[][]{ - new Component[]{new UILabel(" " + Inter.getLocText("FR-Engine_DS-TableData") + ":", UILabel.RIGHT), firstLine}, + new Component[]{new UILabel(" " + Inter.getLocText("FR-Designer_DS_TableData") + ":", UILabel.RIGHT), firstLine}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Actual_Value") + ":", UILabel.RIGHT), keyColumnPane}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Display_Value") + ":", UILabel.RIGHT), valueDictPane} }; From e779d331b78b56bae7e8f859063865564b530df6 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 13 Feb 2017 15:14:31 +0800 Subject: [PATCH 070/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E6=96=B0=E5=A2=9Ekey?= 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 + .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_ja_JP.properties | 1 + .../src/com/fr/design/locale/designer_ko_KR.properties | 1 + .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + .../src/com/fr/design/present/dict/TableDataDictPane.java | 4 ++-- 7 files changed, 8 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 0e76f04d16..e646fce49e 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -560,3 +560,4 @@ FR-Designer-Move_Tab_End=move to end FR-Designer-Move_Tab_Next=move to next FR-Designer-Move_Tab_Prev=move to previous FR-Designer_DS_TableData=Data Set +FR-Designer_Parameter-Formula=Formula 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 cbcac747fa..c8d6e2416c 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 @@ -559,3 +559,4 @@ FR-Designer-Move_Tab_End=move to end FR-Designer-Move_Tab_Next=move to next FR-Designer-Move_Tab_Prev=move to previous FR-Designer_DS_TableData=Data Set +FR-Designer_Parameter-Formula=Formula 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 6470f89574..7f8e213d3e 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 @@ -538,3 +538,4 @@ FR-Designer-Move_Tab_End= FR-Designer-Move_Tab_Next= FR-Designer-Move_Tab_Prev= FR-Designer_DS_TableData=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9 +FR-Designer_Parameter-Formula=\u6570\u5F0F 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 37be51e563..dd21783e55 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 @@ -533,3 +533,4 @@ FR-Designer-Move_Tab_End= FR-Designer-Move_Tab_Next= FR-Designer-Move_Tab_Prev= FR-Designer_DS_TableData=\uB370\uC774\uD130\uC138\uD2B8 +FR-Designer_Parameter-Formula=\uC218\uC2DD 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 2f5549d9df..19dc89f05a 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 @@ -563,4 +563,5 @@ FR-Designer-Move_Tab_End=\u79FB\u52A8\u5230\u672B\u5C3E FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8 FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8 FR-Designer_DS_TableData=\u6570\u636E\u96C6 +FR-Designer_Parameter-Formula=\u516C\u5F0F 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 c78ba8f155..7ef1c87c0b 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 @@ -551,3 +551,4 @@ FR-Designer-Move_Tab_End=\u79FB\u52D5\u5230\u672B\u5C3E FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5 FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5 FR-Designer_DS_TableData=\u8CC7\u6599\u96C6 +FR-Designer_Parameter-Formula=\u516C\u5F0F diff --git a/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java b/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java index c51fe8b4ac..4e454ee9b3 100644 --- a/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java +++ b/designer_base/src/com/fr/design/present/dict/TableDataDictPane.java @@ -77,7 +77,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane } }); keyColumnPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()}); - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Engine_Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); formulaEditor.setEnabled(true); valueDictPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor(), formulaEditor}); } @@ -158,7 +158,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane columnIndexEditor1.addItemListener(itemListener); keyColumnPane.setEditors(new Editor[]{columnNameEditor1, columnIndexEditor1}, columnNames[0]); - FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Engine_Parameter-Formula")); + FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula")); formulaEditor.setEnabled(true); formulaEditor.addChangeListener(new ChangeListener() { From 8466a90f383291fa84a75284215552e476f44d22 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 13 Feb 2017 15:37:37 +0800 Subject: [PATCH 071/127] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=B9=8B=E5=89=8D=E6=BC=8F=E5=8A=A0?= =?UTF-8?q?=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_ja_JP.properties | 1 + .../src/com/fr/design/locale/designer_ko_KR.properties | 3 ++- .../src/com/fr/design/locale/designer_zh_CN.properties | 2 +- .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) 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 c06215bc65..c9d2bb942a 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 @@ -543,3 +543,4 @@ FR-Designer-Move_Tab_First=move to first FR-Designer-Move_Tab_End=move to end FR-Designer-Move_Tab_Next=move to next FR-Designer-Move_Tab_Prev=move to previous +FR-Designer_Role=Role \ 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 c2fb91f257..e3675b6b24 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 @@ -522,3 +522,4 @@ FR-Designer-Move_Tab_First= FR-Designer-Move_Tab_End= FR-Designer-Move_Tab_Next= FR-Designer-Move_Tab_Prev= +FR-Designer_Role= \ 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 03d1a11f45..83f25ec300 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 @@ -516,4 +516,5 @@ FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 FR-Designer-Move_Tab_First= FR-Designer-Move_Tab_End= FR-Designer-Move_Tab_Next= -FR-Designer-Move_Tab_Prev= \ No newline at end of file +FR-Designer-Move_Tab_Prev= +FR-Designer_Role= \ 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 6fdea224d2..38e407ce9d 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 @@ -547,4 +547,4 @@ FR-Designer-Move_Tab_First=\u79FB\u52A8\u5230\u9996\u4F4D FR-Designer-Move_Tab_End=\u79FB\u52A8\u5230\u672B\u5C3E FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8 FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8 - +FR-Designer_Role=\u89D2\u8272 \ 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 c47170e574..23159357cf 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 @@ -535,3 +535,4 @@ FR-Designer-Move_Tab_First=\u79FB\u52D5\u5230\u9996\u4F4D FR-Designer-Move_Tab_End=\u79FB\u52D5\u5230\u672B\u5C3E FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5 FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5 +FR-Designer_Role= \ No newline at end of file From c34133b1c7e5bffac8d5c2d95d64c874e2003c27 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Mon, 13 Feb 2017 17:34:28 +0800 Subject: [PATCH 072/127] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/fun/HyperlinkProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/fun/HyperlinkProvider.java b/designer_base/src/com/fr/design/fun/HyperlinkProvider.java index e6eccc8820..9f0a53cfa2 100644 --- a/designer_base/src/com/fr/design/fun/HyperlinkProvider.java +++ b/designer_base/src/com/fr/design/fun/HyperlinkProvider.java @@ -10,7 +10,7 @@ import com.fr.stable.fun.mark.Mutable; public interface HyperlinkProvider extends Mutable { String XML_TAG = "HyperlinkProvider"; - int CURRENT_LEVEL = 1; + int CURRENT_LEVEL = 2; /** From 30aaf866f768cf46b1d02038fe9c0dca5544e0f9 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 14 Feb 2017 10:42:17 +0800 Subject: [PATCH 073/127] =?UTF-8?q?REPORT-1266=20=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8D=87=E7=BA=A7=E6=8F=90=E7=A4=BA,=20?= =?UTF-8?q?=E6=94=B9=E6=88=90"=E6=8F=92=E4=BB=B6=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=BF=87=E4=BD=8E,=20=E5=AD=98=E5=9C=A8API=E4=B8=8D=E5=85=BC?= =?UTF-8?q?=E5=AE=B9,=20=E8=AF=B7=E8=81=94=E7=B3=BB=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E8=80=85=E5=8D=87=E7=BA=A7=E6=8F=92=E4=BB=B6"?= 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 + .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_ja_JP.properties | 1 + .../src/com/fr/design/locale/designer_ko_KR.properties | 1 + .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + designer_base/src/com/fr/start/BaseDesigner.java | 2 +- 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index e646fce49e..5363662877 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -561,3 +561,4 @@ FR-Designer-Move_Tab_Next=move to next FR-Designer-Move_Tab_Prev=move to previous FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. 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 c8d6e2416c..1ca7643190 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 @@ -560,3 +560,4 @@ FR-Designer-Move_Tab_Next=move to next FR-Designer-Move_Tab_Prev=move to previous FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. 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 7f8e213d3e..4255c9bf2e 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 @@ -539,3 +539,4 @@ FR-Designer-Move_Tab_Next= FR-Designer-Move_Tab_Prev= FR-Designer_DS_TableData=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9 FR-Designer_Parameter-Formula=\u6570\u5F0F +FR-Designer_Plugin_Should_Update_Please_Contact_Developer= 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 dd21783e55..fca78cef6b 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 @@ -534,3 +534,4 @@ FR-Designer-Move_Tab_Next= FR-Designer-Move_Tab_Prev= FR-Designer_DS_TableData=\uB370\uC774\uD130\uC138\uD2B8 FR-Designer_Parameter-Formula=\uC218\uC2DD +FR-Designer_Plugin_Should_Update_Please_Contact_Developer= 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 19dc89f05a..239d25bb78 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 @@ -564,4 +564,5 @@ FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8 FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8 FR-Designer_DS_TableData=\u6570\u636E\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6 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 7ef1c87c0b..32ba1063e0 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 @@ -552,3 +552,4 @@ FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5 FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5 FR-Designer_DS_TableData=\u8CC7\u6599\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u633F\u4EF6\u7248\u672C\u904E\u4F4E\uFF0C\u5B58\u5728API\u4E0D\u76F8\u5BB9\uFF0C\u8ACB\u806F\u7CFB\u958B\u767C\u8005\u965E\u7D1A\u633F\u4EF6 diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index 016ad604dd..0e036c5340 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -124,7 +124,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { public void actionPerformed(ActionEvent e) { String[] plugins = PluginCollector.getCollector().getErrorPlugins(); if (ArrayUtils.isNotEmpty(plugins)) { - String text = StableUtils.join(plugins, ",") + Inter.getLocText("FR-Designer_Plugin_Should_Update"); + String text = StableUtils.join(plugins, ",") + ": " + Inter.getLocText("FR-Designer_Plugin_Should_Update_Please_Contact_Developer"); int r = JOptionPane.showConfirmDialog(null, text, Inter.getLocText("FR-Designer_Plugin_Should_Update_Title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); if (r == JOptionPane.OK_OPTION) { WebDialog.createPluginDialog(); From ccb995b9a955ac0b2bfcb5ab9688d18f11a9f44c Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Tue, 14 Feb 2017 11:40:37 +0800 Subject: [PATCH 074/127] REPORT-637 --- .../fr/design/widget/CellWidgetCardPane.java | 129 ++++++++++-------- .../com/fr/design/locale/designer.properties | 4 +- 2 files changed, 71 insertions(+), 62 deletions(-) diff --git a/designer/src/com/fr/design/widget/CellWidgetCardPane.java b/designer/src/com/fr/design/widget/CellWidgetCardPane.java index 5d4cf74a53..8ba9d32350 100644 --- a/designer/src/com/fr/design/widget/CellWidgetCardPane.java +++ b/designer/src/com/fr/design/widget/CellWidgetCardPane.java @@ -20,24 +20,28 @@ import java.awt.*; * carl :单独弄出来 */ public class CellWidgetCardPane extends BasicPane { - // 当前的编辑器属性定义面板 + //当前的编辑器属性定义面板 private DataModify currentEditorDefinePane; - + //属性配置切换面板 private JTabbedPane tabbedPane; - private BasicWidgetPropertySettingPane widgetPropertyPane; - private JPanel attriPane; - private JPanel cardPane; - private CardLayout card; - private JPanel presPane; - private JPanel cardPaneForPresent; - private CardLayout cardForPresent; + //通用属性容器 + private JPanel attriTabPane; + private JPanel attriCardPane; + private CardLayout attriCardLayout; - private JPanel cardPaneForTreeSetting; + //数字字典属性容器 + private JPanel dictTabPane; + private JPanel dictCardPane; + private CardLayout dictCardLayout; - private JPanel formPane; - private WidgetEventPane eventTabPane; + //构建树属性容器 + private JPanel treeTabPane; + + //事件属性容器 + private JPanel eventTabPane; + private WidgetEventPane eventPane; public CellWidgetCardPane(ElementCasePane pane) { this.initComponents(pane); @@ -47,26 +51,26 @@ public class CellWidgetCardPane extends BasicPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); tabbedPane = new UITabbedPane(); this.add(tabbedPane, BorderLayout.CENTER); - attriPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - formPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - eventTabPane = new WidgetEventPane(pane); - formPane.add(eventTabPane, BorderLayout.CENTER); - tabbedPane.add(Inter.getLocText("FR-Designer_Attribute"), attriPane); - tabbedPane.add(Inter.getLocText("FR-Designer_Form_Editing_Listeners"), formPane); + attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + eventTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + eventPane = new WidgetEventPane(pane); + eventTabPane.add(eventPane, BorderLayout.CENTER); + tabbedPane.add(Inter.getLocText("FR-Designer_Attribute"), attriTabPane); + tabbedPane.add(Inter.getLocText("FR-Designer_Form_Editing_Listeners"), eventTabPane); - presPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - cardPaneForPresent = FRGUIPaneFactory.createCardLayout_S_Pane(); - presPane.add(cardPaneForPresent, BorderLayout.CENTER); - cardForPresent = new CardLayout(); - cardPaneForPresent.setLayout(cardForPresent); + dictTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + dictCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + dictTabPane.add(dictCardPane, BorderLayout.CENTER); + dictCardLayout = new CardLayout(); + dictCardPane.setLayout(dictCardLayout); - cardPaneForTreeSetting = FRGUIPaneFactory.createBorderLayout_L_Pane(); + treeTabPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); widgetPropertyPane = new BasicWidgetPropertySettingPane(); - attriPane.add(widgetPropertyPane, BorderLayout.NORTH); - cardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); - attriPane.add(cardPane, BorderLayout.CENTER); - card = (CardLayout) cardPane.getLayout(); + attriTabPane.add(widgetPropertyPane, BorderLayout.NORTH); + attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); + attriTabPane.add(attriCardPane, BorderLayout.CENTER); + attriCardLayout = (CardLayout) attriCardPane.getLayout(); this.setPreferredSize(new Dimension(600, 450)); } @@ -84,49 +88,53 @@ public class CellWidgetCardPane extends BasicPane { this.tabbedPane.setEnabled(true); } - attriPane.remove(widgetPropertyPane); + attriTabPane.remove(widgetPropertyPane); widgetPropertyPane = new BasicWidgetPropertySettingPane(); JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); northPane.setBorder(BorderFactory.createEmptyBorder(5, 8, 0, 8)); JPanel basic = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Form_Basic_Properties")); northPane.add(basic); basic.add(widgetPropertyPane); - attriPane.add(northPane, BorderLayout.NORTH); + attriTabPane.add(northPane, BorderLayout.NORTH); WidgetDefinePaneFactory.RN rn = WidgetDefinePaneFactory.createWidgetDefinePane(cellWidget, new Operator() { @Override public void did(DataCreatorUI ui, String cardName) { if (ui == null) { - addPresPane(false); - addTreeSettingPane(false); + removeDictAttriPane(); + removeTreeAttriPane(); } if (ui instanceof DictionaryPane) { + removeDictAttriPane(); + removeTreeAttriPane(); showDictPane(ui, cardName); } else if (ui instanceof TreeSettingPane) { + removeDictAttriPane(); + removeTreeAttriPane(); showTreePane(ui); } } }); DataModify definePane = rn.getDefinePane(); - cardPane.add(definePane.toSwingComponent(), rn.getCardName()); - card.show(cardPane, rn.getCardName()); + attriCardPane.add(definePane.toSwingComponent(), rn.getCardName()); + attriCardLayout.show(attriCardPane, rn.getCardName()); currentEditorDefinePane = definePane; - eventTabPane.populate(cellWidget); + eventPane.populate(cellWidget); widgetPropertyPane.populate(cellWidget); tabbedPane.setSelectedIndex(0); } private void showDictPane(DataCreatorUI ui, String cardName) { - cardPaneForPresent.removeAll(); - cardPaneForPresent.add(ui.toSwingComponent(), cardName); - cardForPresent.show(cardPaneForPresent, cardName); - addPresPane(true); + dictCardPane.removeAll(); + dictCardPane.add(ui.toSwingComponent(), cardName); + dictCardLayout.show(dictCardPane, cardName); + addDictAttriPane(); } private void showTreePane(DataCreatorUI ui) { - cardPaneForTreeSetting.removeAll(); - cardPaneForTreeSetting.add(ui.toSwingComponent()); - addTreeSettingPane(true); + treeTabPane.removeAll(); + treeTabPane.add(ui.toSwingComponent()); + addTreeAttriPane(); } public Widget update() { @@ -139,7 +147,7 @@ public class CellWidgetCardPane extends BasicPane { } widgetPropertyPane.update(widget); - Listener[] listener = eventTabPane == null ? new Listener[0] : eventTabPane.updateListeners(); + Listener[] listener = eventPane == null ? new Listener[0] : eventPane.updateListeners(); widget.clearListeners(); for (Listener l : listener) { widget.addListener(l); @@ -155,25 +163,26 @@ public class CellWidgetCardPane extends BasicPane { */ public void checkValid() throws Exception { currentEditorDefinePane.checkValid(); - eventTabPane.checkValid(); + eventPane.checkValid(); } - //:jackie 如果选择的项有形态,则将形态面板加入tab面板 - private void addPresPane(boolean add) { - if (add) { - tabbedPane.add(this.presPane, 1); - tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_DS_Dictionary")); - } else { - tabbedPane.remove(presPane); - } + + private void addDictAttriPane() { + tabbedPane.add(this.dictTabPane, 1); + tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_DS_Dictionary")); } - private void addTreeSettingPane(boolean add) { - if (add) { - tabbedPane.add(this.cardPaneForTreeSetting, 1); - tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_Create_Tree")); - } else { - tabbedPane.remove(this.cardPaneForTreeSetting); - } + private void addTreeAttriPane() { + tabbedPane.add(this.treeTabPane, 1); + tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_Create_Tree")); + } + + private void removeDictAttriPane() { + tabbedPane.remove(this.dictTabPane); } -} \ No newline at end of file + + private void removeTreeAttriPane() { + tabbedPane.remove(this.treeTabPane); + } + +} diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index e646fce49e..508070d242 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -505,8 +505,8 @@ FR-Designer_JavaScript_Set= FR-Designer_Attribute= FR-Designer_Form_Editing_Listeners= FR-Designer_Form_Basic_Properties= -FR-Designer_DS_Dictionary= -FR-Designer_Create_Tree= +FR-Designer_DS_Dictionary=Data Dictionary +FR-Designer_Create_Tree=Build Tree FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title= From 1c69242ce3916691e19dbb630903d6661ed0f241 Mon Sep 17 00:00:00 2001 From: plough Date: Thu, 16 Feb 2017 15:46:06 +0800 Subject: [PATCH 075/127] =?UTF-8?q?REPORT-1182=20=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=90=8E=E4=BC=9A=E5=9C=A8=E5=B7=A5=E5=85=B7=E6=A0=8F=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=A1=86=E4=B8=AD=E5=8A=A0=E4=B8=80=E6=9D=A1=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E6=8F=92=E4=BB=B6=EF=BC=8C=E5=9C=A8=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E8=AE=BE=E8=AE=A1=E9=87=8D=E5=90=AF=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E6=97=B6=E6=9C=AA=E9=87=8D=E6=96=B0=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E7=9B=AE=E5=BD=95=EF=BC=8C=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=97=B6=E4=BC=9A=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index a0bdc0e132..4284b2155e 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -1483,6 +1483,8 @@ public class RemoteEnv implements Env { * @throws Exception 异常 */ public boolean writeSvgFile(SvgProvider svgFile) throws Exception { + testServerConnection(); + HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "design_save_svg"); @@ -1534,6 +1536,8 @@ public class RemoteEnv implements Env { */ @Override public boolean writeResource(XMLFileManagerProvider mgr) throws Exception { + testServerConnection(); + HashMap para = new HashMap(); para.put("op", "fr_remote_design"); para.put("cmd", "design_save_resource"); From 95532609161c441ef57685609c527b73fda782cf Mon Sep 17 00:00:00 2001 From: zhouping Date: Thu, 16 Feb 2017 16:19:41 +0800 Subject: [PATCH 076/127] =?UTF-8?q?REPORT-1814=20=E8=A1=A8=E5=8D=95tab?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=94=B9=E8=89=AFbug=20=E8=BD=AE=E6=92=ADbug?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E9=A1=B5=E7=AD=BE=E6=8B=96=E5=8A=A8=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/locale/designer_en_US.properties | 6 +++--- .../creator/cardlayout/TabMoveEndAction.java | 2 ++ .../cardlayout/TabMoveFirstAction.java | 2 ++ .../creator/cardlayout/TabMoveNextAction.java | 2 ++ .../creator/cardlayout/TabMovePrevAction.java | 2 ++ .../creator/cardlayout/XWCardLayout.java | 4 ++-- ...bsoluteBodyLayoutPropertiesGroupModel.java | 20 ++++++++++--------- .../mainframe/EditingMouseListener.java | 5 +++++ 8 files changed, 29 insertions(+), 14 deletions(-) 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 24c7a87c7a..a871d47aac 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 @@ -525,9 +525,9 @@ FR-Designer_Background_Gradient_Color=Gradient Color FR-Designer_Background_Image=Image FR-Designer_Background_Clear=Clear FR-Designer_Background_Image_Select=Select Picture -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -FR-Designer_carouselInterval= +FR-Designer_Tab_carousel=tab carousel +FR-Designer_setCarousel=set carousel +FR-Designer_carouselInterval=interval FR-Designer_Initial_Background_Tips=Initial background of the button FR-Designer_Mouse_Move_Tips=Move the mouse to the button on the background, in the absence of not changing the background FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java index ae101dbe4a..b2a5214c48 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java @@ -47,6 +47,8 @@ public class TabMoveEndAction extends FormUndoableAction { currentButton.setIndex(maxIndex - 1); currentTab.setIndex(maxIndex - 1); currentTab.setTabNameIndex(maxIndex - 1); + xwCardLayout.toData().setShowIndex(maxIndex - 1); + xwCardLayout.showCard(); xwCardTagLayout.setSwitchingTab(false); }catch (Exception e){ xwCardTagLayout.setSwitchingTab(false); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java index 0d6047636a..c9034d04b5 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java @@ -46,6 +46,8 @@ public class TabMoveFirstAction extends FormUndoableAction { currentButton.setIndex(0); currentTab.setIndex(0); currentTab.setTabNameIndex(0); + xwCardLayout.toData().setShowIndex(0); + xwCardLayout.showCard(); xwCardTagLayout.setSwitchingTab(false); }catch (Exception e){ xwCardTagLayout.setSwitchingTab(false); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java index 15bfa7337c..e7806a7ae0 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java @@ -45,6 +45,8 @@ public class TabMoveNextAction extends FormUndoableAction { currentButton.setIndex(currentIndex + 1); currentTab.setIndex(currentIndex + 1); currentTab.setTabNameIndex(currentIndex + 1); + xwCardLayout.toData().setShowIndex(currentIndex + 1); + xwCardLayout.showCard(); xwCardTagLayout.setSwitchingTab(false); }catch (Exception e){ xwCardTagLayout.setSwitchingTab(false); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java index cac70db824..e92852c6c9 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java @@ -45,6 +45,8 @@ public class TabMovePrevAction extends FormUndoableAction { currentButton.setIndex(currentIndex - 1); currentTab.setIndex(currentIndex - 1); currentTab.setTabNameIndex(currentIndex - 1); + xwCardLayout.toData().setShowIndex(currentIndex - 1); + xwCardLayout.showCard(); xwCardTagLayout.setSwitchingTab(false); }catch (Exception e){ xwCardTagLayout.setSwitchingTab(false); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 32a7134ad6..7597a45796 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -295,9 +295,9 @@ public class XWCardLayout extends XLayoutContainer { * 判断当前tab组件是不是嵌套的 * @return 嵌套与否 */ - private boolean isNested(){ + private boolean isNested() { XLayoutContainer xLayoutContainer = this.getBackupParent().getBackupParent(); - return xLayoutContainer != null && xLayoutContainer.acceptType(XWTabFitLayout.class); + return xLayoutContainer == null || xLayoutContainer.acceptType(XWTabFitLayout.class); } public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException { diff --git a/designer_form/src/com/fr/design/designer/properties/FRAbsoluteBodyLayoutPropertiesGroupModel.java b/designer_form/src/com/fr/design/designer/properties/FRAbsoluteBodyLayoutPropertiesGroupModel.java index b290bcccfb..eb4b31154e 100644 --- a/designer_form/src/com/fr/design/designer/properties/FRAbsoluteBodyLayoutPropertiesGroupModel.java +++ b/designer_form/src/com/fr/design/designer/properties/FRAbsoluteBodyLayoutPropertiesGroupModel.java @@ -26,8 +26,11 @@ import java.util.Comparator; public class FRAbsoluteBodyLayoutPropertiesGroupModel extends FRAbsoluteLayoutPropertiesGroupModel { private LayoutTypeEditor layoutTypeEditor; private LayoutTypeRenderer layoutTypeRenderer; + //默认body是0,自适应布局;1,绝对布局. private WBodyLayoutType layoutType = WBodyLayoutType.ABSOLUTE; + private static final int EACH_ROW_COUNT = 4; + public FRAbsoluteBodyLayoutPropertiesGroupModel(XWAbsoluteBodyLayout xwAbsoluteBodyLayout) { super(xwAbsoluteBodyLayout); } @@ -180,9 +183,8 @@ public class FRAbsoluteBodyLayoutPropertiesGroupModel extends FRAbsoluteLayoutPr // 把绝对布局中的元素按规则移动到自适应布局中 // 规则:各元素按顺序放置,其中每行最多4个元素,超出则换行,各元素均分body的高度和宽度 private void moveComponents2FitLayout(XWFitLayout xwFitLayout) { - int eachRowCount = 4; Component[] components = xwFitLayout.getComponents(); - if (components.length <= 1){ + if (components.length == 0){ xwFitLayout.updateBoundsWidget(); return; } @@ -191,17 +193,17 @@ public class FRAbsoluteBodyLayoutPropertiesGroupModel extends FRAbsoluteLayoutPr int leftMargin = xwFitLayout.toData().getMargin().getLeft(); int topMargin = xwFitLayout.toData().getMargin().getTop(); xwFitLayout.toData().setCompInterval(0); - int row = (components.length / eachRowCount) + (components.length % eachRowCount == 0 ? 0 : 1); + int row = (components.length / EACH_ROW_COUNT) + (components.length % EACH_ROW_COUNT == 0 ? 0 : 1); //最后一行的列数不定 - int column = components.length % eachRowCount == 0 ? eachRowCount : components.length % eachRowCount; - int componentWidth = layoutWidth / eachRowCount; + int column = components.length % EACH_ROW_COUNT == 0 ? EACH_ROW_COUNT : components.length % EACH_ROW_COUNT; + int componentWidth = layoutWidth / EACH_ROW_COUNT; int componentHeight = layoutHeight / row; for(int i = 0;i < row - 1;i++){ - for(int j = 0;j < eachRowCount;j++){ - components[eachRowCount * i + j].setBounds( + for(int j = 0;j < EACH_ROW_COUNT;j++){ + components[EACH_ROW_COUNT * i + j].setBounds( leftMargin + componentWidth * j, topMargin + componentHeight * i, - j == eachRowCount - 1 ? layoutWidth - componentWidth * (eachRowCount - 1) : componentWidth, + j == EACH_ROW_COUNT - 1 ? layoutWidth - componentWidth * (EACH_ROW_COUNT - 1) : componentWidth, componentHeight ); } @@ -210,7 +212,7 @@ public class FRAbsoluteBodyLayoutPropertiesGroupModel extends FRAbsoluteLayoutPr int lastRowWidth = layoutWidth / column; int lastRowHeight = layoutHeight - componentHeight * (row - 1); for (int i = 0;i < column;i++) { - components[eachRowCount * (row - 1) + i].setBounds( + components[EACH_ROW_COUNT * (row - 1) + i].setBounds( leftMargin + lastRowWidth * i, topMargin + componentHeight * (row - 1), i == column - 1 ? layoutWidth - lastRowWidth * (column - 1) : lastRowWidth, diff --git a/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java b/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java index f1f61b2b28..88dc9268fe 100644 --- a/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java +++ b/designer_form/src/com/fr/design/mainframe/EditingMouseListener.java @@ -11,6 +11,7 @@ import com.fr.design.designer.beans.location.Location; import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.beans.models.StateModel; import com.fr.design.designer.creator.*; +import com.fr.design.designer.creator.cardlayout.XCardSwitchButton; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.xpane.ToolTipEditor; @@ -519,6 +520,10 @@ public class EditingMouseListener extends MouseInputAdapter { public void mouseClicked(MouseEvent e) { XCreator creator = designer.getComponentAt(e); + if (e.getButton() != MouseEvent.BUTTON1 && !creator.acceptType(XCardSwitchButton.class)) { + return; + } + creator = processTopLayoutMouseClick(creator); if(creator != null){ From d6b22c772d202e1beb0e1f440bead7e92b40c48f Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Thu, 16 Feb 2017 19:24:41 +0800 Subject: [PATCH 077/127] REPORT-1899 --- .../adapters/layout/FRBodyLayoutAdapter.java | 298 ++++++++++-------- .../layout/FRTabFitLayoutAdapter.java | 120 +++---- 2 files changed, 227 insertions(+), 191 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java index 313c08b02b..dc1fb7d368 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java @@ -2,6 +2,7 @@ package com.fr.design.designer.beans.adapters.layout; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.PaddingMargin; @@ -17,7 +18,7 @@ import java.util.*; * 所以把公共的方法挪动这边父类里来 * Created by zhouping on 2016/8/18. */ -public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ +public class FRBodyLayoutAdapter extends AbstractLayoutAdapter { protected static final int COMP_TOP = 1; protected static final int COMP_BOTTOM = 2; protected static final int COMP_LEFT = 3; @@ -49,6 +50,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ protected int minHeight = 0; protected int actualVal = 0; // 存在间隔时,add move drag 判断对齐等都要考虑 protected PaddingMargin margin; // 布局容器边距 + /** * 在添加组件状态时,当鼠标移动到某个容器上方时,如果该容器有布局管理器,则会调用该布局 * 管理适配器的accept来决定当前位置是否可以放置,并提供特殊的标识,比如红色区域标识。比 @@ -76,9 +78,10 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ /** * 交叉点区域时,能否对应位置放入组件 + * * @param comp 待放置组件 - * @param x x - * @param y y + * @param x x + * @param y y * @return 能否放入 */ protected boolean canAcceptWhileCrossPoint(Component comp, int x, int y) { @@ -95,7 +98,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ min = isNotDefaultArea ? min : minWidth * 2; } else if (ComparatorUtils.equals(crossPointAreaDirect, COMP_RIGHT_BOTTOM)) { bottomComp = container.getRightBottomComp(cX, cY, cH, cW); - isNotDefaultArea = (bottomComp == null) || (bottomComp.getX()+bottomComp.getWidth() != cX + cW) ; + isNotDefaultArea = (bottomComp == null) || (bottomComp.getX() + bottomComp.getWidth() != cX + cW); rightComp = container.getBottomRightComp(cX, cY, cH, cW); minLength = isNotDefaultArea ? Math.min(cH, rightComp.getHeight()) : Math.min(cW, bottomComp.getWidth()); min = isNotDefaultArea ? min : minWidth * 2; @@ -105,12 +108,12 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ minLength = isNotDefaultArea ? Math.min(cW, bottomComp.getWidth()) : Math.min(cH, leftComp.getHeight()); min = isNotDefaultArea ? minWidth * 2 : min; } else if (ComparatorUtils.equals(crossPointAreaDirect, COMP_RIGHT_TOP)) { - isNotDefaultArea = (rightComp == null) || (rightComp.getY() != cY) ; + isNotDefaultArea = (rightComp == null) || (rightComp.getY() != cY); topComp = container.getRightTopComp(cX, cY, cW); minLength = isNotDefaultArea ? Math.min(cW, topComp.getWidth()) : Math.min(cH, rightComp.getWidth()); - min = isNotDefaultArea ? minWidth * 2 : min ; + min = isNotDefaultArea ? minWidth * 2 : min; } else if (ComparatorUtils.equals(crossPointAreaDirect, COMP_TOP)) { - minLength= Math.min(rightComp.getHeight(), Math.min(cH, leftComp.getHeight())); + minLength = Math.min(rightComp.getHeight(), Math.min(cH, leftComp.getHeight())); } else if (ComparatorUtils.equals(crossPointAreaDirect, COMP_BOTTOM)) { leftComp = container.getBottomLeftComp(cX, cY, cH); rightComp = container.getBottomRightComp(cX, cY, cH, cW); @@ -129,9 +132,10 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ /** * 三等分区域时,能否对应位置放入组件 + * * @param comp 待放置组件 - * @param x x - * @param y y + * @param x x + * @param y y * @return 能否放入 */ protected boolean canAcceptWhileTrisection(Component comp, int x, int y) { @@ -142,28 +146,28 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ upMinHeight = getUpMinHeightComp(cY, x); downMinHeight = getDownMinHeightComp(comp, y); return upMinHeight == 0 ? downMinHeight >= minHeight * 2 + actualVal : (upMinHeight + downMinHeight) >= minHeight * 3 + actualVal; - } else if(ComparatorUtils.equals(trisectAreaDirect, COMP_BOTTOM)) { + } else if (ComparatorUtils.equals(trisectAreaDirect, COMP_BOTTOM)) { upMinHeight = getUpMinHeightComp(cY + cH + actualVal, x); - if (cY + cH + DEFAULT_AREA_LENGTH>container.getHeight() - margin.getBottom()){ + if (cY + cH + DEFAULT_AREA_LENGTH > container.getHeight() - margin.getBottom()) { downMinHeight = 0; } else { Component targetComp = container.getBottomComp(x, cY, cH); downMinHeight = getDownMinHeightComp(targetComp, cY + cH + DEFAULT_AREA_LENGTH + actualVal); } - return downMinHeight == 0 ? (upMinHeight >= minHeight * 2 + actualVal) : ((upMinHeight+downMinHeight) >= minHeight * 3 + actualVal); - } else if(ComparatorUtils.equals(trisectAreaDirect, COMP_LEFT)) { - rightMinWidth = getMinRightWidth(cX, 0, y); - if(cX - DEFAULT_AREA_LENGTH < margin.getLeft()) { + return downMinHeight == 0 ? (upMinHeight >= minHeight * 2 + actualVal) : ((upMinHeight + downMinHeight) >= minHeight * 3 + actualVal); + } else if (ComparatorUtils.equals(trisectAreaDirect, COMP_LEFT)) { + rightMinWidth = getMinRightWidth(cX, 0, y); + if (cX - DEFAULT_AREA_LENGTH < margin.getLeft()) { leftMinWidth = 0; } else { Component targetRightComp = container.getLeftComp(cX, y); leftMinWidth = getMinLeftWidth(targetRightComp, cX - DEFAULT_AREA_LENGTH - actualVal); } - return leftMinWidth == 0 ? (rightMinWidth >= minWidth * 2 + actualVal) : ((leftMinWidth+rightMinWidth) >= minWidth * 3 + actualVal); - } else if(ComparatorUtils.equals(trisectAreaDirect, COMP_RIGHT)) { + return leftMinWidth == 0 ? (rightMinWidth >= minWidth * 2 + actualVal) : ((leftMinWidth + rightMinWidth) >= minWidth * 3 + actualVal); + } else if (ComparatorUtils.equals(trisectAreaDirect, COMP_RIGHT)) { leftMinWidth = getMinLeftWidth(comp, x); rightMinWidth = getMinRightWidth(cX, cW, y); - return rightMinWidth == 0 ? (leftMinWidth >= minWidth * 2 + actualVal) : ((leftMinWidth+rightMinWidth) >= minWidth * 3 + actualVal); + return rightMinWidth == 0 ? (leftMinWidth >= minWidth * 2 + actualVal) : ((leftMinWidth + rightMinWidth) >= minWidth * 3 + actualVal); } return false; } @@ -176,16 +180,16 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ if (cY == margin.getTop()) { return 0; } - int max=container.getWidth() - margin.getRight(); + int max = container.getWidth() - margin.getRight(); int mouseX = x; int minHeight = cY; int bott = 0; if (isFindRelatedComps) { upComps = new ArrayList(); } - for(; mouseX margin.getLeft()) { + while (mouseX > margin.getLeft()) { Component comp = container.getTopComp(mouseX, cY); - bott = comp.getHeight() + comp.getY()+actualVal; + bott = comp.getHeight() + comp.getY() + actualVal; if (bott == cY) { if (comp.getHeight() < minHeight) { minHeight = comp.getHeight(); } - mouseX = comp.getX()-DEFAULT_AREA_LENGTH-actualVal; + mouseX = comp.getX() - DEFAULT_AREA_LENGTH - actualVal; if (isFindRelatedComps) { upComps.add(comp); } - } else{ + } else { break; } } @@ -231,13 +235,13 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ int cX = currentcomp.getX(); int cY = currentcomp.getY(); int minHeight = currentcomp.getHeight(); - int max=container.getWidth() - margin.getRight(); + int max = container.getWidth() - margin.getRight(); if (isFindRelatedComps) { downComps = new ArrayList(); } int mouseX = cX + DEFAULT_AREA_LENGTH; while (mouseX < max) { - Component comp = container.getComponentAt(mouseX, y); + Component comp = container.getComponentAt(mouseX, y); if (comp.getY() == cY) { if (comp.getHeight() < minHeight) { minHeight = comp.getHeight(); @@ -246,12 +250,12 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ if (isFindRelatedComps) { downComps.add(comp); } - }else{ + } else { break; } } mouseX = cX - DEFAULT_AREA_LENGTH - actualVal; - while(mouseX > margin.getLeft()) { + while (mouseX > margin.getLeft()) { Component comp = container.getComponentAt(mouseX, y); if (comp.getY() == cY) { if (comp.getHeight() < minHeight) { @@ -261,7 +265,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ if (isFindRelatedComps) { downComps.add(comp); } - }else{ + } else { break; } } @@ -273,9 +277,9 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ * 判断对齐时考虑间隔 */ private int getMinRightWidth(int cX, int cW, int y) { - int xL = cX + DEFAULT_AREA_LENGTH ; + int xL = cX + DEFAULT_AREA_LENGTH; xL = cW == 0 ? xL : (xL + cW + actualVal); - if (xL > container.getWidth() - margin.getRight()){ + if (xL > container.getWidth() - margin.getRight()) { return 0; } // 以当前组件紧挨着右侧的组件为基准,在y轴方向查找符合条件的组件 @@ -286,7 +290,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ rightComps = new ArrayList(); } int mouseY = targetComp.getY() + DEFAULT_AREA_LENGTH; - while (mouseY margin.getTop()) { + while (mouseY > margin.getTop()) { Component comp = container.getComponentAt(xL, mouseY); if (comp.getX() == targetComp.getX()) { if (comp.getWidth() < minWidth) { @@ -311,7 +315,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ if (isFindRelatedComps) { rightComps.add(comp); } - }else{ + } else { break; } } @@ -329,9 +333,9 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ if (isFindRelatedComps) { leftComps = new ArrayList(); } - int rightx = 0; + int rightx = 0; int mouseY = currentComp.getY() + DEFAULT_AREA_LENGTH; - while(mouseYmargin.getTop()) { + while (mouseY > margin.getTop()) { Component comp = container.getComponentAt(x, mouseY); - rightx = comp.getX()+comp.getWidth(); + rightx = comp.getX() + comp.getWidth(); if (rightx == compRightLength) { if (comp.getWidth() < minWidth) { minWidth = comp.getWidth(); @@ -358,7 +362,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ if (isFindRelatedComps) { leftComps.add(comp); } - }else{ + } else { break; } } @@ -367,13 +371,14 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ /** * 判断是否鼠标在组件的三等分区域,如果组件在布局管理器中间,上下左右都可能会三等分 + * * @param parentComp 鼠标所在区域的组件 - * @param x 坐标x - * @param y 坐标y + * @param x 坐标x + * @param y 坐标y * @return 是则返回true */ public boolean isTrisectionArea(Component parentComp, int x, int y) { - XCreator creator = (XCreator)parentComp; + XCreator creator = (XCreator) parentComp; if (container.getComponentCount() <= 1) { return false; } @@ -382,23 +387,23 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ int xL = parentComp.getX(); int yL = parentComp.getY(); // 组件宽高的十分之一和默认值取大 - int minRangeWidth = Math.max(maxWidth/BORDER_PROPORTION, DEFAULT_AREA_LENGTH); - int minRangeHeight = Math.max(maxHeight/BORDER_PROPORTION, DEFAULT_AREA_LENGTH); - if(y < yL+minRangeHeight ) { + int minRangeWidth = Math.max(maxWidth / BORDER_PROPORTION, DEFAULT_AREA_LENGTH); + int minRangeHeight = Math.max(maxHeight / BORDER_PROPORTION, DEFAULT_AREA_LENGTH); + if (y < yL + minRangeHeight) { // 在组件上侧三等分 trisectAreaDirect = COMP_TOP; - } else if(y > yL + maxHeight - minRangeHeight) { + } else if (y > yL + maxHeight - minRangeHeight) { // 在组件下侧三等分 trisectAreaDirect = COMP_BOTTOM; } else if (x < xL + minRangeWidth) { // 在组件左侧三等分 trisectAreaDirect = COMP_LEFT; - } else if(x > xL + maxWidth - minRangeWidth) { + } else if (x > xL + maxWidth - minRangeWidth) { // 在组件右侧三等分 trisectAreaDirect = COMP_RIGHT; } // tab布局的边界特殊处理,不进行三等分 - if(!creator.getTargetChildrenList().isEmpty()){ + if (!creator.getTargetChildrenList().isEmpty()) { return false; } @@ -407,21 +412,22 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ /** * 是否为组件交叉点区域 或者是相邻三组建中间点 + * * @param currentComp 当前组件 - * @param x 坐标x - * @param y 坐标y + * @param x 坐标x + * @param y 坐标y * @return 是则返回true */ public boolean isCrossPointArea(Component currentComp, int x, int y) { // 3个及以上都会出现交叉点区域(包括边界处的) - if(currentComp == null || container.getComponentCount() <= 2){ + if (currentComp == null || container.getComponentCount() <= 2) { return false; } int cX = currentComp.getX(); int cY = currentComp.getY(); int cW = currentComp.getWidth(); int cH = currentComp.getHeight(); - int areaWidth = Math.max(cW / BORDER_PROPORTION ,DEFAULT_AREA_LENGTH); + int areaWidth = Math.max(cW / BORDER_PROPORTION, DEFAULT_AREA_LENGTH); int areaHeight = Math.max(cH / BORDER_PROPORTION, DEFAULT_AREA_LENGTH); int rx = cX + cW; int by = cY + cH; @@ -432,27 +438,27 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ if (x < objX && y < objY) { //左上角区域 crossPointAreaDirect = cY > margin.getTop() || cX > margin.getLeft() ? COMP_LEFT_TOP : 0; - } else if (y < objY && x > rx - areaWidth){ + } else if (y < objY && x > rx - areaWidth) { //右上角 crossPointAreaDirect = cY > margin.getTop() || rx < containerW ? COMP_RIGHT_TOP : 0; } else if (x < objX && y > by - areaHeight) { //左下角 crossPointAreaDirect = cX > margin.getLeft() || by < containerH ? COMP_LEFT_BOTTOM : 0; - } else if (x > rx-areaWidth && y > by - areaHeight) { + } else if (x > rx - areaWidth && y > by - areaHeight) { //右下角 crossPointAreaDirect = by < containerH || rx < containerW ? COMP_RIGHT_BOTTOM : 0; } else { isMiddlePosition(currentComp, x, y, areaWidth, areaHeight); } // tab布局的边界特殊处理 - XCreator creator = (XCreator)currentComp; - if(!creator.getTargetChildrenList().isEmpty()){ + XCreator creator = (XCreator) currentComp; + if (!creator.getTargetChildrenList().isEmpty()) { return false; } return crossPointAreaDirect != 0; } - private void isMiddlePosition(Component comp, int x, int y, int areaWidth , int areaHeight) { + private void isMiddlePosition(Component comp, int x, int y, int areaWidth, int areaHeight) { int cX = comp.getX(); int cY = comp.getY(); int cW = comp.getWidth(); @@ -479,14 +485,14 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ Component bottomComp = container.getBottomComp(cX, cY, cH); if (x < (cX + areaWidth)) { isCrosspoint = topComp != null && bottomComp != null && topComp.getX() == cX && bottomComp.getX() == cX; - crossPointAreaDirect = isCrosspoint ? COMP_LEFT : 0; + crossPointAreaDirect = isCrosspoint ? COMP_LEFT : 0; } else if (x > (cX + cW - areaWidth)) { topComp = container.getRightTopComp(cX, cY, cW); bottomComp = container.getRightBottomComp(cX, cY, cH, cW); if (topComp != null && bottomComp != null) { - isCrosspoint = topComp.getX() + topComp.getWidth() == cX + cW && bottomComp.getX() + bottomComp.getWidth() == cX+cW; + isCrosspoint = topComp.getX() + topComp.getWidth() == cX + cW && bottomComp.getX() + bottomComp.getWidth() == cX + cW; } - crossPointAreaDirect = isCrosspoint ? COMP_RIGHT : 0; + crossPointAreaDirect = isCrosspoint ? COMP_RIGHT : 0; } } } @@ -513,15 +519,16 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ /** * 平分,正常情况拖入组件时,按照上1/4区域、下1/4区域为上下平分,中左侧1/2区域、中右侧1/2区域为左右平分 + * * @param currentComp 当前位置组件 - * @param child 待放置组件 - * @param x x - * @param y y + * @param child 待放置组件 + * @param x x + * @param y y */ protected void fixHalve(Component currentComp, XCreator child, int x, int y) { - XCreator creator = (XCreator)currentComp; - if(!creator.getTargetChildrenList().isEmpty()){ - fixHalveOfTab(creator,child,x,y); + XCreator creator = (XCreator) currentComp; + if (!creator.getTargetChildrenList().isEmpty()) { + fixHalveOfTab(creator, child, x, y); return; } int maxWidth = currentComp.getWidth(); @@ -536,18 +543,18 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ int finalY = yL; int finalW = maxWidth; int finalH = maxHeight; - if (isDividUp){ + if (isDividUp) { dim.width = maxWidth; dim.height = maxHeight / 2 - actualVal / 2; finalY = yL + dim.height + actualVal; finalH = maxHeight - dim.height - actualVal; - } else if(isDividDown){ + } else if (isDividDown) { // 若当前区域高度非偶数,那么和isDividUp时计算一致,否则永远都是上半部分小1px dim.height = maxHeight / 2 - actualVal / 2; dim.width = maxWidth; finalH = maxHeight - dim.height - actualVal; yL = yL + finalH + actualVal; - } else if(isDividLeft){ + } else if (isDividLeft) { dim.width = maxWidth / 2 - actualVal / 2; dim.height = maxHeight; finalX = xL + dim.width + actualVal; @@ -571,7 +578,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ // 边界判断抄得原来的逻辑 // tab布局的边界拖入新组件,和当前tab布局平分,这时候的actualVal组建间隔是tab里面的组建间隔 // 不应该在外层自适应布局添加 - private void fixHalveOfTab(XCreator currentCreator, XCreator child, int x, int y){ + private void fixHalveOfTab(XCreator currentCreator, XCreator child, int x, int y) { int maxWidth = currentCreator.getWidth(); int maxHeight = currentCreator.getHeight(); int xL = currentCreator.getX(); @@ -582,7 +589,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ int finalY = yL; int finalW = maxWidth; int finalH = maxHeight; - switch(position){ + switch (position) { case COMP_TOP: dim.width = maxWidth; dim.height = maxHeight / 2; @@ -592,7 +599,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ case COMP_BOTTOM: dim.height = maxHeight / 2; dim.width = maxWidth; - finalH = maxHeight-dim.height; + finalH = maxHeight - dim.height; yL = yL + finalH; break; case COMP_LEFT: @@ -619,13 +626,31 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ } } - private int getPositionOfFix(XCreator currentCreator,int x,int y){ + private int getPositionOfFix(XCreator currentCreator, int x, int y) { int position = 0; XLayoutContainer cardLayout = ((XWCardMainBorderLayout) currentCreator).getCardPart(); + XLayoutContainer container = (XLayoutContainer) cardLayout.getComponent(0); Rectangle rect = ComponentUtils.getRelativeBounds(container); + + /* + * 为了获取到鼠标drop位置的控件, + * 我们之前已经将y值变为相对坐标值; + * 由于在x轴上没有偏移,所以x值一直等于相对坐标值,最多差一个边界值1。 + * 在进行新添加的控件位置计算时, + * 又通过ComponentUtils.getRelativeBounds()方法获取到了绝对坐标, + * 再次计算相对坐标,所以将y值重新变成绝对坐标。 + * */ + if (currentCreator.getParent().getParent().getComponent(0) instanceof XWParameterLayout) { + int high = currentCreator.getParent().getParent().getComponent(0).getHeight(); + y = y + WCardMainBorderLayout.TAB_HEIGHT + high; + + } else { + y = y + WCardMainBorderLayout.TAB_HEIGHT; + } + int tempX = x - rect.x; - int tempY = y - rect.y + WCardMainBorderLayout.TAB_HEIGHT; + int tempY = y - rect.y; int containerX = container.getX(); int containerY = container.getY(); int containerWidth = container.getWidth(); @@ -634,13 +659,13 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ Rectangle currentXY = new Rectangle(tempX, tempY, 1, 1); // 上边缘 Rectangle upEdge = new Rectangle(containerX, containerY, containerWidth, BORDER_PROPORTION); - if(upEdge.intersects(currentXY)){ + if (upEdge.intersects(currentXY)) { position = COMP_TOP; } int bottomY = containerY + containerHeight - BORDER_PROPORTION; // 下边缘 Rectangle bottomEdge = new Rectangle(containerX, bottomY, containerWidth, BORDER_PROPORTION); - if(bottomEdge.intersects(currentXY)){ + if (bottomEdge.intersects(currentXY)) { position = COMP_BOTTOM; } //左右边缘的高度 -10*2 是为了不和上下边缘重合 @@ -648,7 +673,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ int leftY = containerY + BORDER_PROPORTION; // 左边缘 Rectangle leftEdge = new Rectangle(containerX, leftY, BORDER_PROPORTION, verticalHeight); - if(leftEdge.intersects(currentXY)){ + if (leftEdge.intersects(currentXY)) { position = COMP_LEFT; } return position; @@ -658,37 +683,38 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ * 组件交叉区域进行插入时,调整受到变动的其他组件,之前是交叉区域插入也按照三等分逻辑,后面测试中发现有bug,改为和bi一样的鼠标所在侧平分 * 默认左上角、右下角区域是垂直方向插入组件 * 右上角和左下角是水平方向插入组件,这样避免田字块时重复 + * * @param currentComp 当前位置组件 - * @param child 待放置组件 - * @param x x - * @param y y + * @param child 待放置组件 + * @param x x + * @param y y */ protected void fixCrossPointArea(Component currentComp, XCreator child, int x, int y) { //计算前先全部初始化待调整控件所在的list initCompsList(); - switch(crossPointAreaDirect) { - case COMP_LEFT_TOP : + switch (crossPointAreaDirect) { + case COMP_LEFT_TOP: dealCrossPointAtLeftTop(currentComp, child); break; - case COMP_RIGHT_BOTTOM : + case COMP_RIGHT_BOTTOM: dealCrossPointAtRightBottom(currentComp, child); break; - case COMP_LEFT_BOTTOM : + case COMP_LEFT_BOTTOM: dealCrossPointAtLeftBottom(currentComp, child); break; - case COMP_RIGHT_TOP : + case COMP_RIGHT_TOP: dealCrossPointAtRightTop(currentComp, child); break; - case COMP_TOP : + case COMP_TOP: dealCrossPointAtTop(currentComp, child); break; - case COMP_BOTTOM : + case COMP_BOTTOM: dealCrossPointAtBottom(currentComp, child); break; - case COMP_LEFT : + case COMP_LEFT: dealCrossPointAtLeft(currentComp, child); break; - case COMP_RIGHT : + case COMP_RIGHT: dealCrossPointAtRight(currentComp, child); break; } @@ -708,16 +734,16 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ Component topComp = container.getTopComp(cX, cY); Component leftComp = container.getLeftComp(cX, cY); //上方没有组件或者有一个x坐标不相同的组件 - if (topComp==null || topComp.getX()!=cX) { + if (topComp == null || topComp.getX() != cX) { minDH = cH < leftComp.getHeight() ? cH : leftComp.getHeight(); downComps.add(leftComp); downComps.add(currentComp); int dLength = minDH / 2; - childw = leftComp.getWidth()+cW+actualVal; - childh = dLength-actualVal / 2; + childw = leftComp.getWidth() + cW + actualVal; + childh = dLength - actualVal / 2; if (isCalculateChildPos) { childPosition = new int[]{leftComp.getX(), leftComp.getY(), childw, childh}; - } else{ + } else { //先设置child位置,不然leftComp坐标调整后就不对了 child.setLocation(leftComp.getX(), leftComp.getY()); child.setSize(childw, childh); @@ -726,7 +752,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ } else { rightComps.add(currentComp); rightComps.add(topComp); - minRW = cW= minDH) { minDH -= actualVal / 2; if ((minDH * 2 / 3) < minHeight) { dLength = minDH - minHeight; - }else { + } else { dLength = minDH / 3; } uLength = averageH - dLength; - } else{ + } else { minUH -= actualVal / 2; if ((minUH * 2 / 3) < minHeight) { uLength = minUH - minHeight; - }else { + } else { uLength = minUH / 3; } dLength = averageH - uLength; @@ -999,16 +1026,16 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ child.setLocation(margin.getLeft(), margin.getRight()); child.setSize(rightLength - actualVal / 2, height); } else { - childPosition = new int[] {margin.getLeft(), margin.getRight(), rightLength - actualVal / 2, height}; + childPosition = new int[]{margin.getLeft(), margin.getRight(), rightLength - actualVal / 2, height}; } return; - } else if(minRW == 0){ + } else if (minRW == 0) { leftLength = minLW / 2; calculateLeftComps(leftLength, child, leftLength); return; } else if (minRW >= minLW) { minLW -= actualVal / 2; - if(minLW * 2 / 3 < minWidth) { + if (minLW * 2 / 3 < minWidth) { leftLength = minLW - minWidth; } else { leftLength = minLW / 3; @@ -1016,7 +1043,7 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ rightLength = averageW - leftLength; } else { minRW -= actualVal / 2; - if(minRW * 2 / 3 < minWidth) { + if (minRW * 2 / 3 < minWidth) { rightLength = minRW - minWidth; } else { rightLength = minRW / 3; @@ -1033,12 +1060,12 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ private void calculateBottomComps(int length) { length += actualVal / 2; - for (int i = 0,num = downComps.size(); i < num; i++){ + for (int i = 0, num = downComps.size(); i < num; i++) { Component comp = downComps.get(i); comp.setLocation(comp.getX(), comp.getY() + length); int offset = comp.getHeight() - length; comp.setSize(comp.getWidth(), offset); - XCreator creator = (XCreator)comp; + XCreator creator = (XCreator) comp; creator.recalculateChildHeight(offset); } } @@ -1048,24 +1075,24 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ int childWidth = (upComps.size() - 1) * actualVal; int childX = container.getWidth() - margin.getLeft() - margin.getRight(); int childY = 0; - if(upComps.size() > INDEX_ZERO){ + if (upComps.size() > INDEX_ZERO) { childY = upComps.get(INDEX_ZERO).getY() + upComps.get(INDEX_ZERO).getHeight() - length; } - for (int i = 0,num = upComps.size(); i < num; i++){ + for (int i = 0, num = upComps.size(); i < num; i++) { Component comp = upComps.get(i); childWidth += comp.getWidth(); - if (comp.getX() < childX){ + if (comp.getX() < childX) { childX = comp.getX(); } if (!isCalculateChildPos) { int offset = comp.getHeight() - length; comp.setSize(comp.getWidth(), offset); - XCreator creator = (XCreator)comp; + XCreator creator = (XCreator) comp; creator.recalculateChildHeight(offset); } } childY += actualVal; - averageH -= actualVal/2; + averageH -= actualVal / 2; if (isCalculateChildPos) { childPosition = new int[]{childX, childY, childWidth, averageH}; } else { @@ -1081,25 +1108,25 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ } int childH = (leftComps.size() - 1) * actualVal; int childX = 0; - if(leftComps.size() > INDEX_ZERO){ + if (leftComps.size() > INDEX_ZERO) { childX = leftComps.get(INDEX_ZERO).getX() + leftComps.get(INDEX_ZERO).getWidth() - length; } int childY = container.getHeight() - margin.getBottom(); - for (int i = 0,num = leftComps.size(); i < num; i++){ + for (int i = 0, num = leftComps.size(); i < num; i++) { Component comp = leftComps.get(i); childH += comp.getHeight(); - if (comp.getY() < childY){ + if (comp.getY() < childY) { childY = comp.getY(); } if (!isCalculateChildPos) { int offset = comp.getWidth() - length; comp.setSize(offset, comp.getHeight()); - XCreator creator = (XCreator)comp; + XCreator creator = (XCreator) comp; creator.recalculateChildWidth(offset); } } childX += actualVal; - averageW -= actualVal/2; + averageW -= actualVal / 2; if (isCalculateChildPos) { childPosition = new int[]{childX, childY, averageW, childH}; } else { @@ -1110,33 +1137,34 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter{ private void calculateRightComps(int length) { length += actualVal / 2; - for (int i=0,num=rightComps.size(); i Date: Fri, 17 Feb 2017 10:16:19 +0800 Subject: [PATCH 078/127] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=96=B9?= =?UTF-8?q?=E9=9D=A2=E5=AE=9E=E7=8E=B0=E4=BA=86=E6=8E=A7=E4=BB=B6=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E5=B1=9E=E6=80=A7=E8=A1=A8=201.=E5=B0=86MobileBodyWid?= =?UTF-8?q?getTable=E6=9B=B4=E5=90=8D=E4=B8=BAMobileWidgetTable=202.?= =?UTF-8?q?=E9=87=8D=E5=86=99MobieWidgetTable=E5=92=8CMobileParaWidgetTabl?= =?UTF-8?q?e=E7=9A=84=E6=8B=96=E5=8A=A8=E9=80=BB=E8=BE=91=203.=E5=B0=86Bod?= =?UTF-8?q?yAppRelayout=E4=BB=8Edesigner=5Fform\src\com\fr\design\designer?= =?UTF-8?q?\properties=E7=A7=BB=E5=8A=A8=E5=88=B0designer=5Fform\src\com\f?= =?UTF-8?q?r\design\designer\properties\mobile=204.=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E6=96=87=E4=BB=B6=205.=E6=95=B4?= =?UTF-8?q?=E7=90=86WidgetPropertyPane=E7=9A=84=E4=BB=A3=E7=A0=81=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E5=B9=B6=E4=B8=94=E5=8A=A0=E4=BB=A5=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3=E7=A0=81=206.?= =?UTF-8?q?=E7=94=B1=E4=BA=8E=E5=BC=95=E6=93=8E=E4=BB=A3=E7=A0=81=E4=B8=AD?= =?UTF-8?q?BoundsWidget=E4=BD=8D=E7=BD=AE=E5=8F=98=E5=8A=A8=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E7=9A=84import=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E4=BF=AE=E6=94=B9import=20BoundsWidget?= =?UTF-8?q?=E6=96=B0=E4=BD=8D=E7=BD=AE=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/itable/AbstractPropertyTable.java | 61 ++- .../fr/design/gui/itable/PropertyGroup.java | 22 +- .../com/fr/design/locale/designer.properties | 3 +- .../design/locale/designer_en_US.properties | 3 +- .../design/locale/designer_zh_CN.properties | 3 +- .../design/locale/designer_zh_TW.properties | 3 +- .../designer/beans/ConnectorCreator.java | 3 +- .../layout/FRAbsoluteLayoutAdapter.java | 4 +- .../adapters/layout/FRFitLayoutAdapter.java | 2 +- .../beans/location/AccessDirection.java | 2 +- .../design/designer/beans/location/Inner.java | 3 +- .../designer/creator/XWAbsoluteLayout.java | 16 +- .../design/designer/creator/XWFitLayout.java | 2 +- .../designer/creator/XWScaleLayout.java | 2 +- .../designer/creator/XWTitleLayout.java | 2 +- .../cardlayout/XWCardMainBorderLayout.java | 2 +- .../creator/cardlayout/XWTabFitLayout.java | 2 +- .../{ => mobile}/BodyAppRelayoutTable.java | 16 +- .../mobile/BodyMobilePropertyUI.java | 1 - .../fr/design/mainframe/ConnectorHelper.java | 2 +- .../mainframe/MobileBodyWidgetTable.java | 267 ---------- .../mainframe/MobileParaWidgetTable.java | 431 ++++++++++++++++ .../design/mainframe/MobileWidgetTable.java | 460 +++++++++--------- .../design/mainframe/WidgetPropertyPane.java | 269 ++++++---- 24 files changed, 911 insertions(+), 670 deletions(-) rename designer_form/src/com/fr/design/designer/properties/{ => mobile}/BodyAppRelayoutTable.java (89%) delete mode 100644 designer_form/src/com/fr/design/mainframe/MobileBodyWidgetTable.java create mode 100644 designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java diff --git a/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java b/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java index 02a6f547b8..6d36c31bdc 100644 --- a/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java +++ b/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java @@ -26,7 +26,7 @@ import com.fr.general.Inter; */ public abstract class AbstractPropertyTable extends JTable { - // 属性分组 + // // 所有数据组, 把数据分组,一个可折叠的项里面的所有行 为一组 protected ArrayList groups; protected TableModel default_table_model; // 属性表被选中的行加一个浅蓝色的背景 @@ -35,23 +35,34 @@ public abstract class AbstractPropertyTable extends JTable { public static final int PROPERTY_TABLE_ROW_HEIGHT = 22; public AbstractPropertyTable() { - this.setRowHeight(PROPERTY_TABLE_ROW_HEIGHT); + this.setTableProperties(); + this.initPopup(); + default_table_model = new DefaultTableModel(); + this.setModel(default_table_model); + } + + /** + * 设置表格属性 + */ + private void setTableProperties() { JTableHeader header = getTableHeader(); header.setReorderingAllowed(false); header.setPreferredSize(new Dimension(0, PROPERTY_TABLE_ROW_HEIGHT)); header.setDefaultRenderer(new HeaderRenderer()); + this.setRowHeight(PROPERTY_TABLE_ROW_HEIGHT); this.setGridColor(new Color(212, 208, 200)); this.setSelectionBackground(PROPERTY_SELECTION_BACKGROUND); this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); this.setColumnSelectionAllowed(false); this.setRowSelectionAllowed(true); this.setFillsViewportHeight(true); - this.initPopup(); - default_table_model = new DefaultTableModel(); - this.setModel(default_table_model); this.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); } + /** + * 在这个函数里面初始化表格数据再repaint + * @param source + */ public abstract void initPropertyGroups(Object source); public void fireValueChanged(Object old_value, boolean success, Object newValue) { @@ -64,24 +75,26 @@ public abstract class AbstractPropertyTable extends JTable { @Override public TableCellRenderer getCellRenderer(int row, int column) { + //如果数据组不为空 if (groups != null) { Point pIndex = getGroupIndex(row); if (pIndex == null){ return super.getCellRenderer(row, column); } + //拿出当前行所在的那个属性组 PropertyGroup group = groups.get(pIndex.x); + //如果是标题行 if (pIndex.y == 0) { - if (column == 0) { - return group.getFirstRenderer(); - } else { - return group.getSecondRenderer(); - } + //采用group中定义好的标题行渲染器 + return group.getRenderer(); } else { + //如果是非标题行第一列,采用默认渲染器 if (column == 0) { return super.getCellRenderer(row, column); } else { TableCellRenderer renderer = group.getModel().getRenderer(pIndex.y - 1); if (renderer instanceof Component) { + //如果这个渲染器是继承自Component,根据当前行列是否可编辑决定该控件是否可用 ((Component) renderer).setEnabled(isCellEditable(row, column)); } return renderer; @@ -115,6 +128,12 @@ public abstract class AbstractPropertyTable extends JTable { } } + /** + * 看懂了。。写个注释先 + * 获取当前row行的Point(x, y), x代表当前row行是属于groups中的第x个组,y代表当前row行所在的第x组里面的第y行 + * @param row + * @return + */ private Point getGroupIndex(int row) { int count = 0; for (int i = 0; i < groups.size(); i++) { @@ -135,6 +154,10 @@ public abstract class AbstractPropertyTable extends JTable { this.addMouseListener(new MouseAdapter() { + /** + * 如果点到标题行就要触发折叠事件 + * @param e + */ @Override public void mouseClicked(MouseEvent e) { if (!e.isPopupTrigger() && groups != null) { @@ -148,6 +171,11 @@ public abstract class AbstractPropertyTable extends JTable { } } + /** + * 这个mousePressed和上面的mouseClicked唯一不同的地方是单双击和e.getX() < 10 的判断 + * 这个意思应该就是说点到图标(加号减号),立即触发折叠效果,否则点其他处要双击才能触发 + * @param e + */ @Override public void mousePressed(MouseEvent e) { if (!e.isPopupTrigger() && groups != null) { @@ -163,16 +191,27 @@ public abstract class AbstractPropertyTable extends JTable { }); } + /** + * 切换属性组折叠属性true/false + * @param groupIndex + */ private void toggleCollapse(int groupIndex) { PropertyGroup group = groups.get(groupIndex); group.setCollapsed(!group.isCollapsed()); + //这里获取表格的父控件是为了当表格被折叠了后,装表格的父控件也要相应的重新布局一下 + //比如折叠之后表格行数应该比原来的少,占用父容器空间应该小点,不重新布局父容器,表格大小不会改变 Container parent = AbstractPropertyTable.this.getParent(); if (parent != null) { - parent.doLayout(); +// parent.doLayout(); // 这里还是用revalidate吧。。daLayout有时候会失效不知道为什么 + parent.revalidate(); } repaint(); } + /** + * BeanTableModel类,提供表格数据 + * 它的所有数据来源均来自PropertyGroup中的AbstractPropertyGroupModel中的descriptor + */ public class BeanTableModel extends AbstractTableModel { @Override diff --git a/designer_base/src/com/fr/design/gui/itable/PropertyGroup.java b/designer_base/src/com/fr/design/gui/itable/PropertyGroup.java index f66288e391..0e6426ac17 100644 --- a/designer_base/src/com/fr/design/gui/itable/PropertyGroup.java +++ b/designer_base/src/com/fr/design/gui/itable/PropertyGroup.java @@ -4,18 +4,19 @@ import javax.swing.table.TableCellRenderer; import com.fr.design.beans.GroupModel; +/** + * PropertyGroup类描述了属性表中一个属性分组 + */ public class PropertyGroup { - private GroupModel model; - private String name; - private boolean collapsed; - private GroupRenderer renderer1; - private GroupRenderer renderer2; + private GroupModel model; // 描述这个属性组中的数据model + private String name; // 这组属性的标题名称 + private boolean collapsed; // 这组属性是否折叠 + private GroupRenderer renderer; // 属性标题渲染器 public PropertyGroup(GroupModel model) { this(model.getGroupName(), model, false); - renderer1 = new GroupRenderer(); - renderer2 = new GroupRenderer(); + renderer = new GroupRenderer(); } public PropertyGroup(String name, GroupModel model, boolean collapsed) { @@ -48,11 +49,8 @@ public class PropertyGroup { this.collapsed = collapsed; } - public TableCellRenderer getFirstRenderer() { - return renderer1; + public TableCellRenderer getRenderer() { + return renderer; } - public TableCellRenderer getSecondRenderer() { - return renderer2; - } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 41f3c8cdd8..2140d85182 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -520,4 +520,5 @@ FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= +FR-Designer_WidgetOrder= \ 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 334e01ca8c..7067d99320 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 @@ -520,4 +520,5 @@ FR-Designer_Background_Clear=Clear FR-Designer_Background_Image_Select=Select Picture FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= +FR-Designer_WidgetOrder=Widget Order \ 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 10c53380d0..b86e381ba7 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 @@ -524,4 +524,5 @@ FR-Designer_Background_Clear=\u6E05\u9664 FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 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_WidgetOrder=\u63A7\u4EF6\u987A\u5E8F \ 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 96cb4260a9..795ae69876 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 @@ -512,4 +512,5 @@ FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= FR-Designer_Tab_carousel= FR-Designer_setCarousel= -FR-Designer_carouselInterval= \ No newline at end of file +FR-Designer_carouselInterval= +FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java b/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java index 2bfc0bf3f6..70a5d71f2c 100644 --- a/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java +++ b/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java @@ -6,8 +6,7 @@ import java.util.ArrayList; import java.util.PriorityQueue; import com.fr.form.ui.container.WLayout; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; - +import com.fr.form.ui.widget.BoundsWidget; public class ConnectorCreator { diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java index 3d53eab015..140204e75c 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java @@ -12,7 +12,7 @@ import com.fr.design.designer.properties.FRAbsoluteLayoutPropertiesGroupModel; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.gui.LayoutUtils; -import com.fr.form.ui.container.WBodyLayoutType; +import com.fr.form.ui.widget.BoundsWidget; import com.fr.general.ComparatorUtils; import com.fr.general.FRLogger; @@ -111,7 +111,7 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter { Rectangle curRec = new Rectangle(creatorX, creatorY, creator.getWidth(), creator.getHeight()); WAbsoluteLayout wAbsoluteLayout = (WAbsoluteLayout)topLayout.toData(); for (int i = 0, count = wAbsoluteLayout.getWidgetCount(); i < count; i++) { - WAbsoluteLayout.BoundsWidget temp = (WAbsoluteLayout.BoundsWidget) wAbsoluteLayout.getWidget(i); + BoundsWidget temp = (BoundsWidget) wAbsoluteLayout.getWidget(i); Rectangle rectangle = temp.getBounds(); if (curRec.intersects(rectangle)){ return false; diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java index 25b079caf0..0cfd0c7143 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java @@ -26,9 +26,9 @@ import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.mainframe.JForm; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.LayoutBorderStyle; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.WLayout; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; +import com.fr.form.ui.widget.BoundsWidget; import com.fr.general.ComparatorUtils; /** diff --git a/designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java b/designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java index a9d7007703..aa9125e5df 100644 --- a/designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java +++ b/designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java @@ -12,8 +12,8 @@ import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormSelection; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.container.WAbsoluteLayout; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.WParameterLayout; +import com.fr.form.ui.widget.BoundsWidget; /** * @author richer diff --git a/designer_form/src/com/fr/design/designer/beans/location/Inner.java b/designer_form/src/com/fr/design/designer/beans/location/Inner.java index c54796a0ab..3abe94730d 100644 --- a/designer_form/src/com/fr/design/designer/beans/location/Inner.java +++ b/designer_form/src/com/fr/design/designer/beans/location/Inner.java @@ -9,9 +9,8 @@ import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormSelection; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.container.WAbsoluteLayout; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; +import com.fr.form.ui.widget.BoundsWidget; import com.fr.stable.ArrayUtils; -import com.fr.third.com.lowagie.text.*; import java.awt.*; import java.awt.Rectangle; diff --git a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java index 06ae6fa785..4ed1b6549b 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -8,39 +8,25 @@ import java.awt.event.ContainerEvent; import java.awt.event.MouseEvent; import java.awt.image.BufferedImage; import java.beans.IntrospectionException; -import java.util.ArrayList; import java.util.HashMap; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.LayoutAdapter; -import com.fr.design.designer.beans.adapters.layout.AbsoluteLayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter; import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.models.SelectionModel; -import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; import com.fr.design.form.layout.FRAbsoluteLayout; -import com.fr.design.form.util.XCreatorConstants; -import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.icon.IconPathConstants; import com.fr.design.mainframe.*; -import com.fr.design.mainframe.widget.editors.PaddingMarginEditor; -import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor; -import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer; -import com.fr.design.mainframe.widget.renderer.PaddingMarginCellRenderer; import com.fr.form.ui.Connector; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WAbsoluteLayout; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; -import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WLayout; +import com.fr.form.ui.widget.BoundsWidget; import com.fr.general.FRScreen; import com.fr.general.IOUtils; import com.fr.general.Inter; -import com.fr.stable.core.PropertyChangeAdapter; -import org.eclipse.swt.internal.gdip.Rect; - -import javax.swing.*; /** * @author richer diff --git a/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java b/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java index 483b08fe59..340ec9cd1e 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java @@ -20,10 +20,10 @@ import com.fr.design.mainframe.FormArea; import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.ui.PaddingMargin; import com.fr.form.ui.Widget; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WLayout; +import com.fr.form.ui.widget.BoundsWidget; import com.fr.general.FRScreen; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; diff --git a/designer_form/src/com/fr/design/designer/creator/XWScaleLayout.java b/designer_form/src/com/fr/design/designer/creator/XWScaleLayout.java index 46683401b8..8dad2c7f07 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWScaleLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWScaleLayout.java @@ -11,8 +11,8 @@ import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRScaleLayoutAdapter; import com.fr.design.form.layout.FRScaleLayout; import com.fr.form.ui.Widget; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.WScaleLayout; +import com.fr.form.ui.widget.BoundsWidget; /** * 自适应布局中添加组件时,部分控件如数字文本下拉等需要保持控件默认高度21, 用此容器来实现 diff --git a/designer_form/src/com/fr/design/designer/creator/XWTitleLayout.java b/designer_form/src/com/fr/design/designer/creator/XWTitleLayout.java index c0f45c8889..0e1a293bdf 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWTitleLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWTitleLayout.java @@ -10,8 +10,8 @@ import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.form.ui.Label; import com.fr.form.ui.Widget; import com.fr.form.ui.WidgetTitle; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.WTitleLayout; +import com.fr.form.ui.widget.BoundsWidget; import com.fr.general.ComparatorUtils; import java.awt.*; diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java index 42a45c53c3..08f5765b99 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java @@ -18,8 +18,8 @@ import com.fr.design.icon.IconPathConstants; import com.fr.design.mainframe.EditingMouseListener; import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.container.WBorderLayout; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; +import com.fr.form.ui.widget.BoundsWidget; import com.fr.general.IOUtils; import com.fr.general.Inter; diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index d772e3b453..a1fafb0075 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -23,9 +23,9 @@ import com.fr.design.mainframe.widget.editors.ImgBackgroundEditor; import com.fr.design.mainframe.widget.renderer.FontCellRenderer; import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.ui.CardSwitchButton; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout; +import com.fr.form.ui.widget.BoundsWidget; import com.fr.general.Background; import com.fr.general.FRFont; import com.fr.general.Inter; diff --git a/designer_form/src/com/fr/design/designer/properties/BodyAppRelayoutTable.java b/designer_form/src/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java similarity index 89% rename from designer_form/src/com/fr/design/designer/properties/BodyAppRelayoutTable.java rename to designer_form/src/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java index 36bde25d82..fb0cc93b49 100644 --- a/designer_form/src/com/fr/design/designer/properties/BodyAppRelayoutTable.java +++ b/designer_form/src/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java @@ -1,9 +1,9 @@ -package com.fr.design.designer.properties; +package com.fr.design.designer.properties.mobile; +import java.awt.*; import java.awt.event.MouseEvent; import java.beans.IntrospectionException; import java.util.ArrayList; -import javax.swing.table.TableModel; import com.fr.base.FRContext; import com.fr.design.designer.beans.events.DesignerEvent; @@ -17,7 +17,9 @@ import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor; import com.fr.general.Inter; - +/** + * 将body的控件列表中再加入手机重布局选项 + */ public class BodyAppRelayoutTable extends AbstractPropertyTable { private XCreator xCreator; @@ -31,7 +33,6 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable { CRPropertyDescriptor[] propertyTableEditor = { new CRPropertyDescriptor("appRelayout", this.xCreator.toData().getClass()).setEditorClass(InChangeBooleanEditor.class) .setI18NName(Inter.getLocText("FR-Designer-App_ReLayout")) - .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, Inter.getLocText("FR-Designer-Layout_Adaptive_Layout")) }; return propertyTableEditor; } @@ -43,6 +44,7 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable { public void initPropertyGroups(Object source) { this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + this.setFillsViewportHeight(false); groups = new ArrayList(); CRPropertyDescriptor[] propertyTableEditor = null; @@ -55,8 +57,7 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable { groups.add(new PropertyGroup(new ReportAppPropertyGroupModel(Inter.getLocText("FR-Designer_Properties_Mobile"), xCreator, propertyTableEditor, designer))); - TableModel model = new BeanTableModel(); - setModel(model); + setModel(new BeanTableModel()); this.repaint(); } @@ -78,8 +79,9 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable { } /** - * 待说明 + * 触发控件编辑事件 */ + @Override public void firePropertyEdit() { designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); } diff --git a/designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java b/designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java index 70b80bc990..a3a1e5086a 100644 --- a/designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java +++ b/designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java @@ -3,7 +3,6 @@ package com.fr.design.designer.properties.mobile; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XWAbsoluteBodyLayout; import com.fr.design.designer.creator.XWFitLayout; -import com.fr.design.designer.properties.BodyAppRelayoutTable; import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider; import com.fr.design.gui.itable.AbstractPropertyTable; import com.fr.general.Inter; diff --git a/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java b/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java index e592a48c9b..f2b68043d1 100644 --- a/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java +++ b/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java @@ -7,12 +7,12 @@ import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.util.ArrayList; +import com.fr.form.ui.widget.BoundsWidget; import com.fr.stable.Constants; import com.fr.base.GraphHelper; import com.fr.design.designer.beans.ConnectorCreator; import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.form.ui.Connector; -import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; public class ConnectorHelper { //这个类是用来画连接线的,暂时用不到 diff --git a/designer_form/src/com/fr/design/mainframe/MobileBodyWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileBodyWidgetTable.java deleted file mode 100644 index 90e2316a67..0000000000 --- a/designer_form/src/com/fr/design/mainframe/MobileBodyWidgetTable.java +++ /dev/null @@ -1,267 +0,0 @@ -package com.fr.design.mainframe; - -import java.awt.Color; -import java.awt.Component; -import java.awt.Cursor; -import java.awt.Dimension; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.util.ArrayList; - -import javax.swing.BorderFactory; -import javax.swing.JLabel; -import javax.swing.JTable; -import javax.swing.ListSelectionModel; -import javax.swing.table.DefaultTableCellRenderer; -import javax.swing.table.DefaultTableModel; -import javax.swing.table.JTableHeader; -import javax.swing.table.TableModel; - -import com.fr.design.designer.creator.XCreator; -import com.fr.design.designer.creator.XLayoutContainer; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itable.HeaderRenderer; -import com.fr.form.ui.Widget; -import com.fr.form.ui.container.WFitLayout; -import com.fr.general.ComparatorUtils; -import com.fr.general.Inter; -import com.fr.stable.StringUtils; - -/** - * Created with IntelliJ IDEA. - * User: zx - * Date: 14-9-15 - * Time: 下午4:52 - */ -public class MobileBodyWidgetTable extends JTable { - - private FormDesigner designer; - protected TableModel defaultmodel; - private String[][] cellData; - private String[] headers = {Inter.getLocText("Form-Widget_Name")}; - public static final int WIDGET_TABLE_ROW_HEIGHT = 22; - private UILabel moveComponent = new UILabel(); - private int selectedRow = -1; - private int GAP = 10; - private boolean draging = false; - - - public MobileBodyWidgetTable(FormDesigner designer) { - this.designer = designer; - cellData = getData(); - this.setRowHeight(WIDGET_TABLE_ROW_HEIGHT); - JTableHeader header = getTableHeader(); - header.setReorderingAllowed(false); - header.setPreferredSize(new Dimension(0, WIDGET_TABLE_ROW_HEIGHT)); - HeaderRenderer headerRenderer = new HeaderRenderer(); - headerRenderer.setHorizontalAlignment(JLabel.CENTER); - header.setDefaultRenderer(headerRenderer); - this.setGridColor(new Color(212, 208, 200)); - this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - this.setColumnSelectionAllowed(false); - this.setRowSelectionAllowed(false); - this.setFillsViewportHeight(true); - defaultmodel = new BeanTableModel(); - this.setModel(defaultmodel); - this.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); - this.repaint(); - this.setDefaultRenderer(Object.class,new MobileWidgetTableCellRenderer()); - refresh(); - this.addMouseListener(mouseAdapter); - this.addMouseMotionListener(mouseAdapter); - add(moveComponent); - } - - private MouseAdapter mouseAdapter = new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - if(getSelectedRow() != -1){ - String widgetName = cellData[getSelectedRow()][0]; - if (StringUtils.isNotEmpty(widgetName)){ - XLayoutContainer root = getEditingDesigner().getRootComponent(); - int count = root.getXCreatorCount(); - for (int i = 0;i < count ;i++){ - XCreator xCreator = root.getXCreator(i).getEditingChildCreator(); - Widget widget = xCreator.toData(); - if (ComparatorUtils.equals(widgetName, widget.getWidgetName())) { - getEditingDesigner().getSelectionModel().setSelectedCreator(xCreator); - setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); - selectedRow = getSelectedRow(); - } - } - } - } - } - public void mouseExited(MouseEvent e) { - draging = false; - moveComponent.setVisible(false); - setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - } - - @Override - public void mouseMoved(MouseEvent e) { - int overRow = 0; - for (int i = 0;i < getRowCount();i++) { - if (e.getY() > i * WIDGET_TABLE_ROW_HEIGHT && e.getY() <= (i + 1) * WIDGET_TABLE_ROW_HEIGHT){ - overRow = i; - } - } - if (overRow == getSelectedRow()) { - setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); - } else { - setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - } - } - - @Override - public void mouseDragged(MouseEvent e) { - int width = getColumnModel().getColumn(0).getWidth(); - if (getCursor().getType() == Cursor.MOVE_CURSOR){ - draging = true; - //下面这句话太重要了,拖拽过程中选中的不变 - getInstance().setRowSelectionInterval(selectedRow,selectedRow); - moveComponent.setText(getValueAt(getSelectedRow(), getSelectedColumn()).toString()); - moveComponent.setLocation(0, e.getY() - GAP); - moveComponent.setPreferredSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT)); - moveComponent.setSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT)); - moveComponent.setVisible(true); - moveComponent.setForeground(Color.lightGray); - moveComponent.setBorder(BorderFactory.createLineBorder(Color.lightGray)); - } - } - @Override - public void mouseReleased(MouseEvent e) { - if(!draging){ - return; - } - draging = false; - moveComponent.setVisible(false); - int toIndex = e.getY() < GAP ? 0 : (int)Math.rint((e.getY() - GAP)/WIDGET_TABLE_ROW_HEIGHT) + 1; - ((WFitLayout) designer.getRootComponent().toData()).adjustOrder(getSelectedRow(), toIndex); - getInstance().setRowSelectionInterval(0,getRowCount() - 1); - refresh(); - getInstance().repaint(); - designer.fireTargetModified(); - } - }; - - public MobileBodyWidgetTable getInstance(){ - return this; - } - - public FormDesigner getEditingDesigner(){ - return designer; - } - - /** - * 刷新 - */ - public void refresh(){ - XCreator creator = designer.getSelectionModel().getSelection().getSelectedCreator(); - cellData = getData(); - if(creator != null){ - String widgetName =creator.toData().getWidgetName(); - int row = -1; - for (int i =0; i < cellData.length;i++){ - if(ComparatorUtils.equals(widgetName, cellData[i][0])){ - row = i; - break; - } - } - selectedRow = row; - changeSelection(row,0,false,false); - if(row == -1){ - this.clearSelection(); - } - } - } - - private String[][] getData(){ - if(designer.isFormParaDesigner()){ - return new String[0][0]; - } - XLayoutContainer paraContainer = designer.getRootComponent(); - if(paraContainer == null || !paraContainer.acceptType(WFitLayout.class)){ - return new String[0][0]; - } - - WFitLayout fitLayout = (WFitLayout) (paraContainer.toData()); - ArrayList strings = fitLayout.getMobileWidgetList(); - String[][] widgetName = new String[strings.size()][2]; - for(int i = 0;i < strings.size();i++){ - widgetName[i][0] = strings.get(i); - } - return widgetName; - } - - private class MobileWidgetTableCellRenderer extends DefaultTableCellRenderer { - public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, - boolean hasFocus, int row, int column) { - if (getCursor().getType() == Cursor.MOVE_CURSOR){ - if(selectedRow > -1 && selectedRow < getRowCount()){ - //拖拽过程中选中的不变 - getInstance().setRowSelectionInterval(selectedRow,selectedRow); - } - } - super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); - return this; - } - - } - - public class BeanTableModel extends DefaultTableModel { - public BeanTableModel() { - super(cellData,headers); - } - - @Override - public int getRowCount() { - return cellData.length; - } - - @Override - public int getColumnCount() { - return 1; - } - - - @Override - public Object getValueAt(int row, int column) { - if (row >= getRowCount() || column >= getColumnCount()) { - return null; - } - - return cellData[row][0]; - } - - @Override - public String getColumnName(int column) { - return headers[0]; - } - - - @Override - public void setValueAt(Object aValue, int row, int column) { - if (row >= getRowCount() || column >= getColumnCount()) { - return; - } - if (aValue == null) { - cellData[row] = null; - return; - } - cellData[row][0] = aValue.toString(); - } - - /** - * 是否可编辑 - * @param row 行号 - * @param column 列号 - * @return 是否可编辑 - */ - public boolean isCellEditable(int row, int column) { - return false; - } - - } - -} \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java new file mode 100644 index 0000000000..9d670db2ca --- /dev/null +++ b/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java @@ -0,0 +1,431 @@ +package com.fr.design.mainframe; + + +import java.awt.BasicStroke; +import java.awt.Color; +import java.awt.Component; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.RenderingHints; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.geom.RoundRectangle2D; +import java.util.EventObject; + +import javax.swing.AbstractCellEditor; +import javax.swing.BorderFactory; +import javax.swing.JTable; +import javax.swing.ListSelectionModel; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.JTableHeader; +import javax.swing.table.TableCellEditor; +import javax.swing.table.TableColumn; +import javax.swing.table.TableModel; + +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.GroupRenderer; +import com.fr.design.gui.itable.HeaderRenderer; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWParameterLayout; +import com.fr.form.ui.Label; +import com.fr.form.ui.Widget; +import com.fr.form.ui.container.WParameterLayout; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.StringUtils; + +/** + * MobileParaWidgetTable主要显示参数面板容器的控件列表,与MobileWidgetTable的区别就是该表多了UITextField这一列 + * Created with IntelliJ IDEA. + * User: zx + * Date: 14-7-9 + * Time: 上午11:26 + * Modified by fanglei during 2017/1/22 - 2017/2/ + */ +class MobileParaWidgetTable extends JTable { + + private FormDesigner designer; + private String[][] cellData ; + private String[] headers = {Inter.getLocText("FR-Utils_Label"), Inter.getLocText("Form-Widget_Name")}; + private static final int WIDGET_TABLE_ROW_HEIGHT = 22; + private static final int UITEXTFIELD_WIDTH = 40; + private UILabel moveComponent = new UILabel(); // 作为拖动时候随鼠标移动的那个半透明控件 + private int selectedRow = -1; + private int selectedColumn = -1; + private int GAP = 11; + private boolean draging = false; + + MobileParaWidgetTable(FormDesigner designer) { + this.designer = designer; + this.cellData = getData(); + this.setTableProperties(); + this.setDefaultEditor(Object.class, new MobileCellEditor()); + TableModel defaultModel = new BeanTableModel(); + this.setModel(defaultModel); + this.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); + TableColumn tc = this.getColumn(this.getColumnName(0)); + tc.setPreferredWidth(UITEXTFIELD_WIDTH); + this.repaint(); + this.setDefaultRenderer(Object.class,new MobileWidgetTableCellRenderer()); + refreshData(); + this.addMouseListener(mouseAdapter); + this.addMouseMotionListener(mouseAdapter); + add(moveComponent); + } + + /** + * 设置表格属性 + */ + private void setTableProperties() { + JTableHeader header = getTableHeader(); + header.setReorderingAllowed(false); + header.setPreferredSize(new Dimension(0, WIDGET_TABLE_ROW_HEIGHT)); + header.setDefaultRenderer(new HeaderRenderer()); + + this.setRowHeight(WIDGET_TABLE_ROW_HEIGHT); + this.setGridColor(new Color(212, 208, 200)); + this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + this.setColumnSelectionAllowed(false); + this.setRowSelectionAllowed(false); + this.setFillsViewportHeight(true); + } + + private MouseAdapter mouseAdapter = new MouseAdapter() { + /** + * 鼠标按下时处理的事件(设置当前选中的行列) + * @param e + */ + @Override + public void mousePressed(MouseEvent e) { + getInstance().setCellSelected(); + } + + /** + * 鼠标放开时处理的事件(如果是正在拖动则执行换位操作,重新绘制属性表,如果不是则什么也不做) + * @param e + */ + @Override + public void mouseReleased(MouseEvent e) { + if(!draging){ + return; + } + draging = false; + moveComponent.setVisible(false); + int toIndex = e.getY() < GAP ? 0 : (int)Math.rint((e.getY() - GAP)/WIDGET_TABLE_ROW_HEIGHT) + 1; + //当鼠标放开时,将选中的容器调整至新的顺序 + ((WParameterLayout) designer.getParaComponent().toData()).adjustOrder(selectedRow, toIndex); + //拿取排序后表格数据,然后重绘表格 + getInstance().refreshData(); + getInstance().repaint(); + designer.fireTargetModified(); + getInstance().setCellSelected(); + } + + /** + * 设置鼠标在属性表区域移动时候的事件 + * @param e + */ + @Override + public void mouseMoved(MouseEvent e) { + int overColumn = e.getX() < getColumnModel().getColumn(0).getWidth() ? 0 : 1; // 判断当前鼠标在哪一列 + int overRow = -1; + for (int i = 0;i < getRowCount();i++) { + if (e.getY() > i * WIDGET_TABLE_ROW_HEIGHT && e.getY() <= (i + 1) * WIDGET_TABLE_ROW_HEIGHT) { + overRow = i; //判断当前鼠标在哪一行 + } + } + //如果鼠标移动到当前选中的行列上面的时候,并且不能在第一列 + if (overRow == selectedRow && overColumn == selectedColumn && overColumn !=0) { + //把当前选中的那一列行的光标改成(除了第一列)移动样式MOVE_CURSOR + setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); + } else { + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } + } + + /** + * 鼠标拖动事件(如果鼠标当前是MOVE_CURSOR状态则执行开始拖动的代码, + * 绘制一个moveComponent来跟随鼠标移动) + * @param e + */ + @Override + public void mouseDragged(MouseEvent e) { + int width = getColumnModel().getColumn(1).getWidth(); + //如果点击选中的是第二列,就可以拖动 + if (selectedColumn == 1){ + setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); + draging = true; + moveComponent.setText(getValueAt(selectedRow, selectedColumn).toString()); + moveComponent.setLocation(getColumnModel().getColumn(0).getWidth(), e.getY() - GAP); + moveComponent.setSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT)); + moveComponent.setVisible(true); + moveComponent.setForeground(Color.lightGray); + moveComponent.setBorder(BorderFactory.createLineBorder(Color.lightGray)); + } + } + + /** + * 设置鼠标单击时处理的事件(单击第二列的控件列表进入控件属性表) + * @param e + */ + @Override + public void mouseClicked(MouseEvent e) { + if(getSelectedRow() != -1 && getSelectedColumn() == 1){ + String widgetName = cellData[getSelectedRow()][getSelectedColumn()]; + if (StringUtils.isNotEmpty(widgetName)){ + int count = getEditingDesigner().getParaComponent().getComponentCount(); + for (int i = 0; i < count; i++){ + XCreator xCreator = (XCreator)getEditingDesigner().getParaComponent().getComponent(i); + Widget widget = xCreator.toData(); + if (!widget.acceptType(Label.class) && ComparatorUtils.equals(widgetName,widget.getWidgetName())) { + //设置选中的component,这句代码控制点击之后跳转到相应component属性表 + getEditingDesigner().getSelectionModel().setSelectedCreator(xCreator); + } + } + } + } + } + + /** + * 鼠标离开属性表区域事件 + * @param e + */ + @Override + public void mouseExited(MouseEvent e) { + draging = false; + moveComponent.setVisible(false); + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } + }; + + public MobileParaWidgetTable getInstance(){ + return this; + } + + private FormDesigner getEditingDesigner(){ + return designer; + } + + /** + * 设置当前get到的行列的单元格为选中状态 + */ + private void setCellSelected() { + selectedRow = getSelectedRow(); + selectedColumn = getSelectedColumn(); + if (selectedRow != -1) { + this.setRowSelectionInterval(selectedRow, selectedRow); + } + if (selectedColumn != -1) { + this.setColumnSelectionInterval(selectedColumn, selectedColumn); + } + } + + /** + * 重新get排序后的数据 + */ + public void refreshData(){ + cellData = getData(); + } + + /** + * 获取参数面板的控件列表 + * + * @return String[][] 二维数组,[0][0]widgetTag, [0][1]widgetName + */ + private String[][] getData(){ + XLayoutContainer paraContainer = designer.getParaComponent(); + if(paraContainer == null || !paraContainer.acceptType(XWParameterLayout.class)){ + return new String[0][0]; + } + + WParameterLayout para = (WParameterLayout) (paraContainer.toData()); + return para.getWidgetNameTag(); // TODO 从这个函数开始看,可以看到后台如何决定拖动后的控件顺序的 + } + + /** + * 自定义的tableRender类 + */ + private class MobileWidgetTableCellRenderer extends DefaultTableCellRenderer{ + @Override + public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, + boolean hasFocus, int row, int column) { + super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); + if (column == 0){ + UITextField uiTableTextField; + if (getSelectedColumn() == column && getSelectedRow() == row){ + uiTableTextField = new UITableTextField(value.toString()); + } else { + uiTableTextField = new UITextField(value.toString()); + } + return uiTableTextField; + } + return this; + } + + } + + /** + * 自定义的tableEditor类 + */ + private class MobileCellEditor extends AbstractCellEditor implements TableCellEditor { + UITableTextField uiTableTextField; + MobileCellEditor(){ + uiTableTextField = new UITableTextField(); + uiTableTextField.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent evt) { + stopCellEditing(); + designer.fireTargetModified(); + } + }); + uiTableTextField.getDocument().addDocumentListener(new DocumentListener() { + @Override + public void insertUpdate(DocumentEvent e) { + firePropertyChange(); + } + + @Override + public void removeUpdate(DocumentEvent e) { + firePropertyChange(); + } + + @Override + public void changedUpdate(DocumentEvent e) { + firePropertyChange(); + } + }); + } + + /** + * cell改变,相应的nametag改变 + */ + private void firePropertyChange(){ + ((WParameterLayout) designer.getParaComponent().toData()).add2NameTagMap(uiTableTextField.getText(), + cellData[getSelectedRow()][1]); + } + + @Override + public Object getCellEditorValue(){ + return uiTableTextField.getText(); + } + + /** + * 双击以编辑, 表示只有双击的情况下才可以编辑 + */ + @Override + public boolean isCellEditable(EventObject anEvent) { + return !(anEvent instanceof MouseEvent) || ((MouseEvent) anEvent).getClickCount() >= 2; + } + + @Override + public Component getTableCellEditorComponent( JTable table,Object value, + boolean isSelected,int row,int column){ + uiTableTextField.setText(value.toString()); + return uiTableTextField; + } + } + + /** + * BeanTableModel类继承DefaultTableModel类,指定了表格的表头和内容 + */ + private class BeanTableModel extends DefaultTableModel { + BeanTableModel() { + super(cellData, headers); + } + + @Override + public int getRowCount() { + return cellData.length; + } + + @Override + public int getColumnCount() { + return headers.length; + } + + + @Override + public Object getValueAt(int row, int column) { + if (row >= getRowCount() || column >= getColumnCount()) { + return null; + } + Object[] rowValue = cellData[row]; + if (column > -1 && column < rowValue.length) { + return cellData[row][column]; + } + return null; + } + + @Override + public String getColumnName(int column) { + if (column == 0) { + return headers[0]; + } else { + return headers[1]; + } + } + + + @Override + public void setValueAt(Object aValue, int row, int column) { + if (row >= getRowCount() || column >= getColumnCount()) { + return; + } + if (aValue == null) { + cellData[row][column] = null; + return; + } + cellData[row][column] = aValue.toString(); + } + + /** + * 是否可编辑 控件标签列可以编辑,控件名不可编辑 + * @param row 行号 + * @param column 列号 + * @return 是否可编辑 + */ + public boolean isCellEditable(int row, int column) { + if(column ==1){ + return false; + } + return true; + } + + } + + /** + * 继承自JTextField类,重写了编辑框的样式 + */ + private class UITableTextField extends UITextField { + public UITableTextField(){ + super(); + } + + public UITableTextField(String string){ + super(string); + } + + protected void paintBorder(Graphics g) { + Graphics2D g2d = (Graphics2D) g; + g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + if (this.isFocusOwner()) { + g2d.setStroke(new BasicStroke(1.5f)); + } else { + g2d.setStroke(new BasicStroke(1f)); + } + RoundRectangle2D.Double rect = new RoundRectangle2D.Double(0, 0, this.getWidth() - 2, this.getHeight() - 2, 4, 4); + g2d.setColor(Color.orange); + g2d.draw(rect); + } + + } +} \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java index fb8f5fc861..a692e37667 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java @@ -1,167 +1,208 @@ package com.fr.design.mainframe; - -import java.awt.BasicStroke; -import java.awt.Color; -import java.awt.Component; -import java.awt.Cursor; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.RenderingHints; -import java.awt.event.FocusAdapter; -import java.awt.event.FocusEvent; +import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.awt.geom.RoundRectangle2D; -import java.util.EventObject; +import java.util.ArrayList; -import javax.swing.AbstractCellEditor; import javax.swing.BorderFactory; +import javax.swing.JLabel; import javax.swing.JTable; import javax.swing.ListSelectionModel; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; -import javax.swing.table.DefaultTableCellRenderer; -import javax.swing.table.DefaultTableModel; -import javax.swing.table.JTableHeader; -import javax.swing.table.TableCellEditor; -import javax.swing.table.TableColumn; -import javax.swing.table.TableModel; +import javax.swing.table.*; +import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itable.GroupRenderer; import com.fr.design.gui.itable.HeaderRenderer; -import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.designer.creator.XCreator; -import com.fr.design.designer.creator.XLayoutContainer; -import com.fr.design.designer.creator.XWParameterLayout; -import com.fr.form.ui.Label; import com.fr.form.ui.Widget; -import com.fr.form.ui.container.WParameterLayout; +import com.fr.form.ui.container.*; +import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; +import com.fr.form.ui.container.cardlayout.WCardTitleLayout; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.stable.StringUtils; /** + * MobileWidgetTable类主要显示各种容器的控件列表(body,tab,绝对布局快,不包括参数面板) * Created with IntelliJ IDEA. * User: zx - * Date: 14-7-9 - * Time: 上午11:26 + * Date: 14-9-15 + * Time: 下午4:52 + * Modified by fanglei at 2017/01/23 */ public class MobileWidgetTable extends JTable { private FormDesigner designer; - protected TableModel defaultmodel; - private String[][] cellData ; - private String[] headers = {Inter.getLocText("FR-Utils_Label"),Inter.getLocText("Form-Widget_Name")}; - public static final int WIDGET_TABLE_ROW_HEIGHT = 22; - private UILabel moveComponent = new UILabel(); + private String[][] cellData; + private String[] headers = {Inter.getLocText("Form-Widget_Name")}; + private static final int WIDGET_TABLE_ROW_HEIGHT = 22; + private UILabel moveComponent = new UILabel(); // 作为拖动时候随鼠标移动的那个半透明控件 private int selectedRow = -1; - private int GAP = 10; + private int GAP = 11; private boolean draging = false; + private boolean collapsed = false; // 控件列表是否折叠 + + @Override + public TableCellRenderer getCellRenderer(int row, int column) { + //第一行渲染成为标题的样子 + if (row == 0) { + return new GroupRenderer(); + } + return super.getCellRenderer(row, column); + } + public MobileWidgetTable(FormDesigner designer) { this.designer = designer; - this.cellData = getData(); - this.setRowHeight(WIDGET_TABLE_ROW_HEIGHT); + cellData = getData(); + this.setTableProperties(); + TableModel defaultModel = new BeanTableModel(); + this.setModel(defaultModel); + this.repaint(); + this.setDefaultRenderer(Object.class,new DefaultTableCellRenderer()); + refreshData(); + this.addMouseListener(mouseAdapter); + this.addMouseMotionListener(mouseAdapter); + add(moveComponent); + } + + /** + * 设置表格属性 + */ + private void setTableProperties() { JTableHeader header = getTableHeader(); header.setReorderingAllowed(false); - header.setPreferredSize(new Dimension(0, WIDGET_TABLE_ROW_HEIGHT)); - header.setDefaultRenderer(new HeaderRenderer()); + header.setPreferredSize(new Dimension(0, 0)); // 隐藏表头 + GroupRenderer headerRenderer = new GroupRenderer(); + headerRenderer.setPreferredSize(new Dimension(0, 0)); //这行代码隐藏表头。因为要实现折叠效果,表头不好监听事件 + headerRenderer.setHorizontalAlignment(JLabel.LEFT); + header.setDefaultRenderer(headerRenderer); + + this.setRowHeight(WIDGET_TABLE_ROW_HEIGHT); this.setGridColor(new Color(212, 208, 200)); this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); this.setColumnSelectionAllowed(false); this.setRowSelectionAllowed(false); - this.setFillsViewportHeight(true); - this.setDefaultEditor(Object.class,new MobileCellEditor()); - defaultmodel = new BeanTableModel(); - this.setModel(defaultmodel); + this.setFillsViewportHeight(false); this.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); - TableColumn tc = this.getColumn(this.getColumnName(0)); - tc.setPreferredWidth(30); - this.repaint(); - this.setDefaultRenderer(Object.class,new MobileWidgetTableCellRenderer()); - refresh(); - this.addMouseListener(mouseAdapter); - this.addMouseMotionListener(mouseAdapter); - add(moveComponent); } private MouseAdapter mouseAdapter = new MouseAdapter() { + /** + * 鼠标按下时处理的事件(设置当前选中的行列) + * @param e + */ @Override - public void mouseClicked(MouseEvent e) { - if(getSelectedRow() != -1 && getSelectedColumn() == 1){ - String widgetName = cellData[getSelectedRow()][getSelectedColumn()]; - if (StringUtils.isNotEmpty(widgetName)){ - int count = getEditingDesigner().getParaComponent().getComponentCount(); - for (int i = 0;i < count ;i++){ - XCreator xCreator = (XCreator)getEditingDesigner().getParaComponent().getComponent(i); - Widget widget = xCreator.toData(); - if (!widget.acceptType(Label.class) && ComparatorUtils.equals(widgetName,widget.getWidgetName())) { - getEditingDesigner().getSelectionModel().setSelectedCreator(xCreator); - setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); - selectedRow = getSelectedRow(); - } - } - } - } + public void mousePressed(MouseEvent e) { + getInstance().setCellSelected(); + if (selectedRow == 0 && !e.isPopupTrigger() && e.getClickCount() == 1 && e.getX() < 10){ // 如果是点击在第一行 + toggleCollapse(); + } + } + + /** + * 鼠标放开时处理的事件(如果是正在拖动则执行换位操作,重新绘制属性表,如果不是则什么也不做) + * 所谓的换行就是简单的重新拿到一次表格数据然后重新绘制表格 + * @param e + */ + @Override + public void mouseReleased(MouseEvent e) { + if(!draging){ + return; } - public void mouseExited(MouseEvent e) { draging = false; moveComponent.setVisible(false); - setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + int toIndex = e.getY() < GAP ? 0 : (int)Math.rint((e.getY() - GAP)/WIDGET_TABLE_ROW_HEIGHT) + 1; + //当鼠标放开时,将选中的容器调整至新的顺序 + ((WLayout)designer.getSelectionModel().getSelection().getSelectedCreator().toData()).adjustOrder(selectedRow - 1, toIndex - 1); + //拿取排序后表格数据,然后重绘表格 + getInstance().refreshData(); + getInstance().repaint(); + designer.fireTargetModified(); + getInstance().setCellSelected(); } + /** + * 设置鼠标在属性表区域移动时候的事件 + * @param e + */ @Override public void mouseMoved(MouseEvent e) { - int overColumn = e.getX() < getColumnModel().getColumn(0).getWidth() ? 0 : 1; - int overRow = -1; + int overRow = 0; for (int i = 0;i < getRowCount();i++) { if (e.getY() > i * WIDGET_TABLE_ROW_HEIGHT && e.getY() <= (i + 1) * WIDGET_TABLE_ROW_HEIGHT){ - overRow = i; + overRow = i; //判断鼠标在哪一行 } } - if (overRow == getSelectedRow() && overColumn == getSelectedColumn() && overColumn !=0) { + //如果鼠标移动到当前选中的行上面的时候 + if (overRow == selectedRow && selectedRow > 0) { + //把当前选中的那一行的光标改成(除了第一列)移动样式MOVE_CURSOR setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); } else { setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } } - @Override + /** + * 鼠标拖动事件(如果鼠标当前是MOVE_CURSOR状态则执行开始拖动的代码, + * 绘制一个moveComponent来跟随鼠标移动) + * @param e + */ + @Override public void mouseDragged(MouseEvent e) { - if (e.getX() < getColumnModel().getColumn(0).getWidth()) { - draging = false; - moveComponent.setVisible(false); - setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - } - int width = getColumnModel().getColumn(1).getWidth(); - if (getCursor().getType() == Cursor.MOVE_CURSOR){ - draging = true; - //下面这句话太重要了,拖拽过程中选中的不变 - getInstance().setRowSelectionInterval(selectedRow,selectedRow); - moveComponent.setText(getValueAt(getSelectedRow(), getSelectedColumn()).toString()); - moveComponent.setLocation(getColumnModel().getColumn(0).getWidth(), e.getY() - GAP); - moveComponent.setPreferredSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT)); - moveComponent.setSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT)); - moveComponent.setVisible(true); - moveComponent.setForeground(Color.lightGray); - moveComponent.setBorder(BorderFactory.createLineBorder(Color.lightGray)); - } + int width = getColumnModel().getColumn(0).getWidth(); + //如果当前选中的行的范围是合理的话,就可以拖动 + if (selectedRow < getRowCount() && selectedRow > 0){ + setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); + draging = true; + moveComponent.setText(getValueAt(selectedRow,0).toString()); + moveComponent.setLocation(0, e.getY() - GAP); + moveComponent.setSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT)); + moveComponent.setVisible(true); + moveComponent.setForeground(Color.lightGray); + moveComponent.setBorder(BorderFactory.createLineBorder(Color.lightGray)); + } } + + /** + * 设置鼠标单击时处理的事件(单击控件列表进入控件属性表) + * @param e + */ @Override - public void mouseReleased(MouseEvent e) { - if(!draging){ - return; + public void mouseClicked(MouseEvent e) { + if(selectedRow > 0){ + //当前点击的控件的名字 + String widgetName = cellData[selectedRow][0]; + if (StringUtils.isNotEmpty(widgetName)){ + //当前选择的容器 + XCreator selectedContainer = designer.getSelectionModel().getSelection().getSelectedCreator(); + WLayout selectedWidget = (WLayout)selectedContainer.toData(); + //当前选择的容器中的控件数量 + int count = selectedWidget.getWidgetCount(); + for (int i = 0;i < count ;i++){ + XCreator xCreator = (XCreator) selectedContainer.getComponent(i); + Widget widget = xCreator.toData(); + if (ComparatorUtils.equals(widgetName, widget.getWidgetName())) { + getEditingDesigner().getSelectionModel().setSelectedCreator(xCreator); + } + } + } + } else if (selectedRow == 0){ // 如果是点击在第一行 + if (!e.isPopupTrigger() && e.getClickCount() > 1) { + toggleCollapse(); + } } + } + + /** + * 鼠标离开属性表区域事件 + * @param e + */ + public void mouseExited(MouseEvent e) { draging = false; moveComponent.setVisible(false); - int toIndex = e.getY() < GAP ? 0 : (int)Math.rint((e.getY() - GAP)/WIDGET_TABLE_ROW_HEIGHT) + 1; - ((WParameterLayout) designer.getParaComponent().toData()).adjustOrder(getSelectedRow(), toIndex); - getInstance().setRowSelectionInterval(0,getRowCount() - 1); - refresh(); - getInstance().repaint(); - designer.fireTargetModified(); + setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } }; @@ -170,130 +211,90 @@ public class MobileWidgetTable extends JTable { } public FormDesigner getEditingDesigner(){ - return designer; + return designer; } /** - * 刷新 + * 设置当前get到的行列的单元格为选中状态 */ - public void refresh(){ - XCreator creator = designer.getSelectionModel().getSelection().getSelectedCreator(); - cellData = getData(); - if(creator != null){ - String widgetName =creator.toData().getWidgetName(); - int row = -1; - int column = -1; - for (int i =0; i < cellData.length;i++){ - if(ComparatorUtils.equals(widgetName, cellData[i][0])){ - row = i; - column = 0; - break; - } - if(ComparatorUtils.equals(widgetName, cellData[i][1])){ - row = i; - column = 1; - break; - } - } - selectedRow = row; - changeSelection(row,column,false,false); - if(row == -1){ - this.clearSelection(); - } + private void setCellSelected() { + selectedRow = getSelectedRow(); + if (selectedRow != -1) { + this.setRowSelectionInterval(selectedRow, selectedRow); + this.setColumnSelectionInterval(0, 0); } } - private String[][] getData(){ - XLayoutContainer paraContainer = designer.getParaComponent(); - if(paraContainer == null || !paraContainer.acceptType(XWParameterLayout.class)){ - return new String[0][0]; - } - - WParameterLayout para = (WParameterLayout) (paraContainer.toData()); - return para.getWidgetNameTag(); - } - - private class MobileWidgetTableCellRenderer extends DefaultTableCellRenderer{ - public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, - boolean hasFocus, int row, int column) { - if (getCursor().getType() == Cursor.MOVE_CURSOR){ - if(selectedRow > -1 && selectedRow < getRowCount()){ - //拖拽过程中选中的不变 - getInstance().setRowSelectionInterval(selectedRow,selectedRow); - } - } - super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); - if (column == 0){ - UITextField uiTableTextField; - if (getSelectedColumn() == column && getSelectedRow() == row){ - uiTableTextField = new UITableTextField(value.toString()); - } else { - uiTableTextField = new UITextField(value.toString()); - } - return uiTableTextField; - } - return this; + /** + * 切换属性组折叠属性true/false + */ + private void toggleCollapse() { + this.setCollapsed(!this.isCollapsed()); + //这里获取表格的父控件是为了当表格被折叠了后,装表格的父控件也要相应的重新布局一下 + //比如折叠之后表格行数应该比原来的少,占用父容器空间应该小点,不重新布局父容器,表格大小不会改变 + Container parent = MobileWidgetTable.this.getParent(); + if (parent != null) { + parent.revalidate(); } - + repaint(); } - private class MobileCellEditor extends AbstractCellEditor implements TableCellEditor { - UITableTextField uiTableTextField; - MobileCellEditor(){ - uiTableTextField = new UITableTextField(); - uiTableTextField.addFocusListener(new FocusAdapter() { - @Override - public void focusLost(FocusEvent evt) { - stopCellEditing(); - designer.fireTargetModified(); - } - }); - uiTableTextField.getDocument().addDocumentListener(new DocumentListener() { - @Override - public void insertUpdate(DocumentEvent e) { - firePropertyChange(); - } - @Override - public void removeUpdate(DocumentEvent e) { - firePropertyChange(); - } + /** + * 重新get排序后的数据 + */ + public void refreshData(){ + cellData = getData(); + } - @Override - public void changedUpdate(DocumentEvent e) { - firePropertyChange(); - } - }); + /** + * 获取选中控件的控件列表 + * + * @return String[][] 二维数组,[0][0]widgetName + */ + private String[][] getData(){ + if(designer.isFormParaDesigner()){ + return new String[0][0]; } - /** - * cell改变,相应的nametag改变 - */ - public void firePropertyChange(){ - ((WParameterLayout) designer.getParaComponent().toData()).add2NameTagMap(uiTableTextField.getText(), - cellData[getSelectedRow()][1]); - } + //选择的控件 + Widget selectedModel = designer.getSelectionModel().getSelection().getSelectedCreator().toData(); - public Object getCellEditorValue(){ - return uiTableTextField.getText(); + if(selectedModel == null){ + return new String[0][0]; } - /* - * 双击以编辑 - */ - public boolean isCellEditable(EventObject anEvent) { - if (anEvent instanceof MouseEvent) { - return ((MouseEvent)anEvent).getClickCount() >= 2; + // 选择的控件有两种类型,一种是WLayout,代表容器,一种是Widget,代表控件 + if (selectedModel.acceptType(WLayout.class)) { + //WCardLayout里面并不是控件,而仍然是容器TabFitLayout,故要向下获取控件 + //WCardTitlelLayout是XWCardLayout的标题容器,里面同样不是控件,不能获取MobileList + //WTitleLayout是标题容器,比如图表的标题,里面是图表控件和Label标题控件,但是不需要获取MobileList + if (selectedModel.acceptType(WCardLayout.class) || selectedModel.acceptType(WCardTitleLayout.class) + || selectedModel.acceptType(WTitleLayout.class) || selectedModel.acceptType(WCardMainBorderLayout.class)) { + return new String[0][0]; + } + ArrayList strings = ((WLayout)selectedModel).getMobileWidgetList(); + String[][] widgetName = new String[strings.size() + 1][1]; + widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); + for (int i = 0; i < strings.size(); i++) { + widgetName[i + 1][0] = strings.get(i); } - return true; + return widgetName; + } else { + return new String[0][0]; } + } - public Component getTableCellEditorComponent( JTable table,Object value, - boolean isSelected,int row,int column){ - uiTableTextField.setText(value.toString()); - return uiTableTextField; - } + public boolean isCollapsed() { + return collapsed; } + public void setCollapsed(boolean collapsed) { + this.collapsed = collapsed; + } + + /** + * 自定义的tableEditor类 + */ public class BeanTableModel extends DefaultTableModel { public BeanTableModel() { super(cellData,headers); @@ -301,12 +302,15 @@ public class MobileWidgetTable extends JTable { @Override public int getRowCount() { + if (isCollapsed()) { + return 1; + } return cellData.length; } @Override public int getColumnCount() { - return 2; + return 1; } @@ -315,20 +319,16 @@ public class MobileWidgetTable extends JTable { if (row >= getRowCount() || column >= getColumnCount()) { return null; } - Object[] rowValue = cellData[row]; - if (column > -1 && column < rowValue.length) { - return cellData[row][column]; + if (row == 0) { + return (isCollapsed()? "+" : "-") + cellData[row][0]; } - return null; + + return cellData[row][0]; } @Override public String getColumnName(int column) { - if (column == 0) { - return headers[0]; - } else { - return headers[1]; - } + return headers[0]; } @@ -338,10 +338,10 @@ public class MobileWidgetTable extends JTable { return; } if (aValue == null) { - cellData[row][column] = null; + cellData[row] = null; return; } - cellData[row][column] = aValue.toString(); + cellData[row][0] = aValue.toString(); } /** @@ -351,35 +351,9 @@ public class MobileWidgetTable extends JTable { * @return 是否可编辑 */ public boolean isCellEditable(int row, int column) { - if(column ==1){ return false; - } - return true; } } - private class UITableTextField extends UITextField { - public UITableTextField(){ - super(); - } - - public UITableTextField(String string){ - super(string); - } - - protected void paintBorder(Graphics g) { - Graphics2D g2d = (Graphics2D) g; - g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - if (this.isFocusOwner()) { - g2d.setStroke(new BasicStroke(1.5f)); - } else { - g2d.setStroke(new BasicStroke(1f)); - } - RoundRectangle2D.Double rect = new RoundRectangle2D.Double(0, 0, this.getWidth() - 2, this.getHeight() - 2, 4, 4); - g2d.setColor(Color.orange); - g2d.draw(rect); - } - - } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java index a5ec304718..23242e399e 100644 --- a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java @@ -13,39 +13,41 @@ import com.fr.design.designer.properties.WidgetPropertyTable; import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.icontainer.UIScrollPane; -import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itable.AbstractPropertyTable; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.form.ui.Widget; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import javax.swing.*; import javax.swing.border.LineBorder; +import javax.swing.table.JTableHeader; import java.awt.*; import java.util.ArrayList; import java.util.List; import java.util.Set; /** - * 控件属性表Docking + * 控件属性表绘制 + * Modified by fanglei */ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPropertyPane { - private WidgetPropertyTable propertyTable; - private EventPropertyTable eventTable; - private List widgetPropertyTables; - private FormDesigner designer; - private JPanel wsp; - private MobileWidgetTable mobileWidgetTable; - private MobileBodyWidgetTable mobileBodyWidgetTable; - private UIScrollPane downPanel; - private JPanel centerPane; - private CardLayout cardLayout; - public static final String PARA = "para"; - public static final String BODY = "body"; - public static final int NODE_LENGTH = 2; - public boolean isrefresh = true; - + private WidgetPropertyTable propertyTable; // 控件的属性表 + private EventPropertyTable eventTable; // 控件的事件表 + private List widgetPropertyTables; // 这个变量应该是保存控件拓展的属性tab + private FormDesigner designer; // 当前designer + private UIScrollPane psp; // 用来装载属性表table的容器 + private UIScrollPane esp; //用来装载事件table的容器 + private JPanel wsp; // 装载移动端tab的容器,包括移动端属性表和控件拓展的移动端属性表 + private MobileParaWidgetTable mobileParaWidgetTable; // 参数面板的移动端属性tab(和body的移动端属性tab区别是没有标签名column) + private MobileWidgetTable mobileWidgetTable; // body的移动端属性tab + private UIScrollPane downPanel; // 这个滚动容器是用于装载centerPane的 + private JPanel centerPane; // 此centerPane采用的是cardLayout布局,装载着mobileWidgetTable和mobileBodyWidgetTable + private CardLayout cardLayout; // 卡片布局,选中参数面板时显示mobileWidgetTable,选中body时显示mobileBodyWidgetTable + private JTableHeader header;//把表头单独get出来作为一个组件 + private static final String PARA = "para"; + private static final String BODY = "body"; public static WidgetPropertyPane getInstance() { if (HOLDER.singleton == null) { @@ -68,37 +70,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper setLayout(FRGUIPaneFactory.createBorderLayout()); } - public class mobileWidgetDesignerAdapter implements DesignerEditListener { - - public mobileWidgetDesignerAdapter() { - } - - /** - * 响应界面改变事件 - * @param evt 事件 - */ - public void fireCreatorModified(DesignerEvent evt) { - if (evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED - || evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED - || evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED - || evt.getCreatorEventID() == DesignerEvent.CREATOR_ADDED) { - int value = downPanel.getVerticalScrollBar().getValue(); - if(hasSelectParaPane(getEditingFormDesigner())){ - cardLayout.show(centerPane,PARA); - mobileWidgetTable.refresh(); - } else { - cardLayout.show(centerPane,BODY); - mobileBodyWidgetTable.refresh(); - } - //出现滚动条 - downPanel.doLayout(); - //控件列表选中某组件,触发表单中选中控件,选中事件又触发列表刷新,滚动条回到0 - //此处设置滚动条值为刷新前 - downPanel.getVerticalScrollBar().setValue(value); - } - } - } - @Override public String getViewTitle() { return Inter.getLocText("Form-Widget_Property_Table"); @@ -110,6 +81,9 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper } @Override + /** + * 绘制属性表tab + */ public void refreshDockingView() { designer = this.getEditingFormDesigner(); removeAll(); @@ -118,66 +92,149 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper return; } widgetPropertyTables = new ArrayList(); + + //依次创建属性表、事件表、移动端表,再将它们整合到TabPane中去 + this.createPropertyTable(); + this.createEventTable(); + this.createMobileWidgetTable(); + this.createTabPane(); + + this.initTables(); + } + + /** + * 初始化属性表,事件表,移动端拓展的属性表 + */ + private void initTables() { + propertyTable.initPropertyGroups(null); + eventTable.refresh(); + for (AbstractPropertyTable propertyTable : widgetPropertyTables) { + propertyTable.initPropertyGroups(designer); + } + } + + /** + * 创建属性表table + */ + private void createPropertyTable() { propertyTable = new WidgetPropertyTable(designer); designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable)); propertyTable.setBorder(null); - UIScrollPane psp = new UIScrollPane(propertyTable); + psp = new UIScrollPane(propertyTable); // 用来装载属性表table psp.setBorder(null); + } + + /** + * 创建事件表(事件选项卡不是JTable) + */ + private void createEventTable() { eventTable = new EventPropertyTable(designer); designer.addDesignerEditListener(new EventPropertyDesignerAdapter(eventTable)); eventTable.setBorder(null); - UIScrollPane esp = new UIScrollPane(eventTable); + esp = new UIScrollPane(eventTable); //用来装载事件table esp.setBorder(null); - wsp = FRGUIPaneFactory.createBorderLayout_S_Pane(); + } + + /** + * 创建移动端控件列表 + */ + private void createMobileWidgetTable() { + //加上表头后,这里不再使用borderLayout布局,而采用BoxLayout布局 + wsp = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); wsp.setBorder(null); + mobileParaWidgetTable = new MobileParaWidgetTable(designer); mobileWidgetTable = new MobileWidgetTable(designer); - mobileBodyWidgetTable = new MobileBodyWidgetTable(designer); designer.addDesignerEditListener(new mobileWidgetDesignerAdapter()); centerPane = FRGUIPaneFactory.createCardLayout_S_Pane(); cardLayout = (CardLayout) centerPane.getLayout(); - centerPane.add(mobileWidgetTable,PARA); - centerPane.add(mobileBodyWidgetTable,BODY); + centerPane.add(mobileParaWidgetTable, PARA);// 采用卡片布局的容器必须指定卡片名字,如果没有卡片名字 + // 就会出现:Exception in thread "main" java.lang.IllegalArgumentException: + // cannot add to layout: constraint must be a string + // 第二个参数代表卡片的名字。后来show方法调用时通过名字找到要显示的卡片 + centerPane.add(mobileWidgetTable, BODY); //这两句代码,是把JTable放到一个JPanel中去了,表头不会显示, + //只有放到JScrollPanel中去表头才能正常显示,这就是MobileWidgetTable中定义了表头却没有显示的原因! + //解决方案:MobileWidgetTable实在无法直接放到JScrollPanel中去的时候,应该把表头get出来单独作为一个组件显示 + if(hasSelectParaPane(designer)){ cardLayout.show(centerPane,PARA); + header = mobileParaWidgetTable.getTableHeader(); } else { cardLayout.show(centerPane,BODY); + header = mobileWidgetTable.getTableHeader(); } downPanel = new UIScrollPane(centerPane); - downPanel.setBorder(new LineBorder(Color.gray)); - wsp.add(downPanel,BorderLayout.CENTER); + downPanel.setBorder(new LineBorder(Color.GRAY)); - UITabbedPane tabbedPane = new UITabbedPane(); - initTabPane(psp, esp, tabbedPane); + //获取拓展移动端属性tab WidgetPropertyUIProvider[] widgetAttrProviders = getExtraPropertyUIProviders(); + addWidgetAttr(widgetAttrProviders); + } + + /** + * 将属性表,事件表,移动端控件列表整合到TabPane里面去 + */ + private void createTabPane() { + UITabbedPane tabbedPane = new UITabbedPane(); // tab选项卡容器 + initTabPane(tabbedPane); add(tabbedPane, BorderLayout.CENTER); - propertyTable.initPropertyGroups(null); - eventTable.refresh(); - for (AbstractPropertyTable propertyTable : widgetPropertyTables) { - propertyTable.initPropertyGroups(designer); + } + + /** + * 获取当前控件扩展的属性tab + * 来源有两个: + * 1, 各个控件从各自的Xcreator里扩展(例如手机重布局的tab就是从Xcreator中扩展的); + * 2, 所有的控件从插件里扩展. + * + * @return 扩展的tab + */ + private WidgetPropertyUIProvider[] getExtraPropertyUIProviders() { + FormSelection selection = designer.getSelectionModel().getSelection(); + WidgetPropertyUIProvider[] embeddedPropertyUIProviders = null; + if (selection != null && selection.getSelectedCreator() != null) { + embeddedPropertyUIProviders = selection.getSelectedCreator().getWidgetPropertyUIProviders(); } - isrefresh = false; + Set set = ExtraDesignClassManager.getInstance().getArray(WidgetPropertyUIProvider.XML_TAG); + return ArrayUtils.addAll(embeddedPropertyUIProviders, set.toArray(new WidgetPropertyUIProvider[set.size()])); } + /** + * 判断是将拓展的tab放入属性表还是将原来的tab放入属性表 + * @param widgetAttrProviders 拓展的tab + */ private void addWidgetAttr(WidgetPropertyUIProvider[] widgetAttrProviders) { - if (widgetAttrProviders.length == 0) { - UILabel upLabel = new UILabel(Inter.getLocText("FR-Widget_Mobile_Table"), SwingConstants.CENTER); - upLabel.setBorder(BorderFactory.createEmptyBorder(6,0,6,0)); - wsp.add(upLabel, BorderLayout.NORTH); + if (widgetAttrProviders.length == 0) { // 判断有没有拓展的tab,没有就使用原来的 + wsp.add(header); + wsp.add(downPanel); } else { for (WidgetPropertyUIProvider widgetAttrProvider : widgetAttrProviders) { AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable(); widgetPropertyTables.add(propertyTable); designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable)); - UIScrollPane uiScrollPane = new UIScrollPane(propertyTable); - uiScrollPane.setBorder(null); + UIScrollPane uiScrollPane = new UIScrollPane(getExtraBodyTable(propertyTable)); wsp.add(uiScrollPane); - } } } - private void initTabPane(UIScrollPane psp, UIScrollPane esp, UITabbedPane tabbedPane) { + /** + * 如果是body的拓展属性表,那么要额外加上一张控件顺序表 + * @return + */ + private Component getExtraBodyTable(AbstractPropertyTable abstractPropertyTable) { + Widget selection = designer.getSelectionModel().getSelection().getSelectedCreator().toData(); + if (selection.getWidgetName().equals("body")) { + JPanel jPanel = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); + jPanel.add(abstractPropertyTable); + MobileWidgetTable mobileWidgetTable = new MobileWidgetTable(designer); + jPanel.add(mobileWidgetTable.getTableHeader()); + jPanel.add(mobileWidgetTable); + return jPanel; + } + return abstractPropertyTable; + } + + private void initTabPane(UITabbedPane tabbedPane) { tabbedPane.setOpaque(true); tabbedPane.setBorder(null); tabbedPane.setTabPlacement(SwingConstants.BOTTOM); @@ -201,31 +258,12 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper return xCreator.acceptType(XWParameterLayout.class) || container.acceptType(XWParameterLayout.class); } - /** - * 获取当前控件扩展的属性tab - * 来源有两个: - * 1, 各个控件从各自的Xcreator里扩展; - * 2, 所有的控件从插件里扩展. - * - * @return 扩展的tab - */ - private WidgetPropertyUIProvider[] getExtraPropertyUIProviders() { - FormSelection selection = designer.getSelectionModel().getSelection(); - WidgetPropertyUIProvider[] embeddedPropertyUIProviders = null; - if (selection != null && selection.getSelectedCreator() != null) { - embeddedPropertyUIProviders = selection.getSelectedCreator().getWidgetPropertyUIProviders(); - } - Set set = ExtraDesignClassManager.getInstance().getArray(WidgetPropertyUIProvider.XML_TAG); - WidgetPropertyUIProvider[] widgetAttrProviders = ArrayUtils.addAll(embeddedPropertyUIProviders, set.toArray(new WidgetPropertyUIProvider[set.size()])); - return widgetAttrProviders; - } - public void setEditingFormDesigner(BaseFormDesigner editor) { FormDesigner fd = (FormDesigner) editor; super.setEditingFormDesigner(fd); } - public void clearDockingView() { + private void clearDockingView() { propertyTable = null; eventTable = null; if (widgetPropertyTables != null) { @@ -236,10 +274,13 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper this.add(psp, BorderLayout.CENTER); } - public class WidgetPropertyDesignerAdapter implements DesignerEditListener { + /** + * 属性表监听界面事件(编辑,删除,选中,改变大小) + */ + private class WidgetPropertyDesignerAdapter implements DesignerEditListener { AbstractPropertyTable propertyTable; - public WidgetPropertyDesignerAdapter(AbstractPropertyTable propertyTable) { + WidgetPropertyDesignerAdapter(AbstractPropertyTable propertyTable) { this.propertyTable = propertyTable; } @@ -260,17 +301,19 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper } } - public class EventPropertyDesignerAdapter implements DesignerEditListener { + /** + * 事件表监听界面事件(编辑,选中) + */ + private class EventPropertyDesignerAdapter implements DesignerEditListener { EventPropertyTable propertyTable; - public EventPropertyDesignerAdapter(EventPropertyTable eventTable) { + EventPropertyDesignerAdapter(EventPropertyTable eventTable) { this.propertyTable = eventTable; } @Override public void fireCreatorModified(DesignerEvent evt) { if (evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED - || evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED || evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED) { propertyTable.refresh(); } @@ -282,6 +325,40 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper } } + /** + * 移动端属性表监听界面事件(改变大小,编辑,选中,增加控件) + */ + private class mobileWidgetDesignerAdapter implements DesignerEditListener { + + mobileWidgetDesignerAdapter() { + } + + /** + * 响应界面改变事件 + * @param evt 事件 + */ + public void fireCreatorModified(DesignerEvent evt) { + if (evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED + || evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED + || evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED + || evt.getCreatorEventID() == DesignerEvent.CREATOR_ADDED) { + int value = downPanel.getVerticalScrollBar().getValue(); + if(hasSelectParaPane(getEditingFormDesigner())){ + cardLayout.show(centerPane,PARA); + mobileParaWidgetTable.refreshData(); + } else { + cardLayout.show(centerPane,BODY); + mobileWidgetTable.refreshData(); + } + //出现滚动条 + downPanel.doLayout(); + //控件列表选中某组件,触发表单中选中控件,选中事件又触发列表刷新,滚动条回到0 + //此处设置滚动条值为刷新前 + downPanel.getVerticalScrollBar().setValue(value); + } + } + } + @Override public Location preferredLocation() { return Location.WEST_BELOW; From 37bf96ab161e77804543edc99e24271e17146be9 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Fri, 17 Feb 2017 10:43:49 +0800 Subject: [PATCH 079/127] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= 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_zh_CN.properties | 1 + designer_base/src/com/fr/design/locale/designer_zh_TW.properties | 1 + 4 files changed, 4 insertions(+) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index ab71e8be89..157c125257 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -562,3 +562,4 @@ FR-Designer-Move_Tab_Prev=move to previous FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. +FR-Designer_WidgetOrder=Widget Order 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 24c7a87c7a..9735aa3d27 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 @@ -562,3 +562,4 @@ FR-Designer_Role=Role FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. +FR-Designer_WidgetOrder=Widget Order 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 f448c6f623..7255d42bf0 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 @@ -566,3 +566,4 @@ FR-Designer_Role=\u89D2\u8272 FR-Designer_DS_TableData=\u6570\u636E\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6 +FR-Designer_WidgetOrder=\u63A7\u4EF6\u987A\u5E8F \ 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 0b150c205b..96c6d0d888 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 @@ -554,3 +554,4 @@ FR-Designer_Role= FR-Designer_DS_TableData=\u8CC7\u6599\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u633F\u4EF6\u7248\u672C\u904E\u4F4E\uFF0C\u5B58\u5728API\u4E0D\u76F8\u5BB9\uFF0C\u8ACB\u806F\u7CFB\u958B\u767C\u8005\u965E\u7D1A\u633F\u4EF6 +FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F \ No newline at end of file From 7f9f64f09e12e559ff1d713a992c41bede861b69 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Fri, 17 Feb 2017 11:54:36 +0800 Subject: [PATCH 080/127] =?UTF-8?q?=E6=B6=88=E9=99=A4PMD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hanlder/BottomCornerMouseHanlder.java | 2 +- .../fr/design/beans/location/MoveUtils.java | 2 +- .../gui/itable/AbstractPropertyTable.java | 3 +- .../designer/beans/ConnectorCreator.java | 10 +- .../beans/location/AccessDirection.java | 6 +- .../design/designer/beans/location/Inner.java | 164 ++++++++++-------- .../cardlayout/XWCardMainBorderLayout.java | 2 +- .../fr/design/mainframe/ConnectorHelper.java | 5 +- .../design/mainframe/MobileWidgetTable.java | 9 +- 9 files changed, 109 insertions(+), 94 deletions(-) diff --git a/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java b/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java index 729562740e..e42835abbb 100644 --- a/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java +++ b/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java @@ -170,7 +170,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter { * @return 重叠 */ @Override - public boolean getWidgetsIntersects() { + public boolean isWidgetsIntersects() { return false; } diff --git a/designer_base/src/com/fr/design/beans/location/MoveUtils.java b/designer_base/src/com/fr/design/beans/location/MoveUtils.java index f796768a63..fcd4f90eee 100644 --- a/designer_base/src/com/fr/design/beans/location/MoveUtils.java +++ b/designer_base/src/com/fr/design/beans/location/MoveUtils.java @@ -83,7 +83,7 @@ public class MoveUtils { * 获取designer内部组件是否重叠的标志位 * @return 重叠 */ - boolean getWidgetsIntersects(); + boolean isWidgetsIntersects(); //TODO 消除PMD检查错误,把getWidgetsIntersects改成isWidgetsIntersects /** * 获取designer相对屏幕的位置 diff --git a/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java b/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java index 6d36c31bdc..96c9a5c1e4 100644 --- a/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java +++ b/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java @@ -33,6 +33,7 @@ public abstract class AbstractPropertyTable extends JTable { public static final Color PROPERTY_SELECTION_BACKGROUND = new Color(153, 204, 255); // 属性表的行高 public static final int PROPERTY_TABLE_ROW_HEIGHT = 22; + private static final int PROPERTY_ICON_WIDTH = 10; public AbstractPropertyTable() { this.setTableProperties(); @@ -182,7 +183,7 @@ public abstract class AbstractPropertyTable extends JTable { int row = AbstractPropertyTable.super.rowAtPoint(e.getPoint()); if (row != -1) { Point pIndex = getGroupIndex(row); - if (pIndex.y == 0 && e.getClickCount() == 1 && e.getX() < 10) { + if (pIndex.y == 0 && e.getClickCount() == 1 && e.getX() < PROPERTY_ICON_WIDTH) { toggleCollapse(pIndex.x); } } diff --git a/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java b/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java index 70a5d71f2c..350235d453 100644 --- a/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java +++ b/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java @@ -13,7 +13,7 @@ public class ConnectorCreator { public static final int UNIT = 10; public static final int SIDE = 2; public static final int CORNER_LOSS = 20; - public static final int vector[][] = { { UNIT, 0 }, { -UNIT, 0 }, { 0, UNIT }, { 0, -UNIT } }; + public static final int VECTOR[][] = { { UNIT, 0 }, { -UNIT, 0 }, { 0, UNIT }, { 0, -UNIT } }; private long timeOut = 200; private boolean beyond; @@ -178,8 +178,8 @@ public class ConnectorCreator { } void pushInto() { - for (int i = 0; i < vector.length; i++) { - Point temp = new Point(p.x + vector[i][0], p.y + vector[i][1]); + for (int i = 0; i < VECTOR.length; i++) { + Point temp = new Point(p.x + VECTOR[i][0], p.y + VECTOR[i][1]); if (parent != null && parent.x == temp.x && parent.y == temp.y) { continue; } @@ -191,8 +191,8 @@ public class ConnectorCreator { } boolean reCheck() { - for (int i = 0; i < vector.length; i++) { - Point temp = new Point(p.x + SIDE * vector[i][0], p.y + SIDE * vector[i][1]); + for (int i = 0; i < VECTOR.length; i++) { + Point temp = new Point(p.x + SIDE * VECTOR[i][0], p.y + SIDE * VECTOR[i][1]); AssessedPoint ap = new AssessedPoint(temp, this, loss(temp)); if (check(temp)) { open.add(ap); diff --git a/designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java b/designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java index aa9125e5df..a2a57c4ff3 100644 --- a/designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java +++ b/designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java @@ -11,6 +11,7 @@ import com.fr.design.designer.creator.*; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormSelection; import com.fr.design.utils.ComponentUtils; +import com.fr.form.main.Form; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.widget.BoundsWidget; @@ -66,10 +67,8 @@ public abstract class AccessDirection implements Direction { protected void sorptionPoint(Point point, Rectangle current_bounds,FormDesigner designer) { boolean findInX = current_bounds.getWidth() <= MoveUtils.SORPTION_UNIT ? true : false; boolean findInY = current_bounds.getHeight() <= MoveUtils.SORPTION_UNIT ? true : false; - WAbsoluteLayout layout =getLayout(designer); FormSelection selection = designer.getSelectionModel().getSelection(); - boolean isWidgetsIntersect = false; for (int i = 0, count = layout.getWidgetCount(); i < count; i++) { BoundsWidget temp = (BoundsWidget) layout.getWidget(i); @@ -111,7 +110,10 @@ public abstract class AccessDirection implements Direction { } } processRectangleIntersects(designer, point.x, point.y, isWidgetsIntersect); + setDesignerStateModelProperties(designer, findInX, findInY, current_bounds, point); + } + private void setDesignerStateModelProperties (FormDesigner designer, boolean findInX, boolean findInY, Rectangle current_bounds, Point point) { designer.getStateModel().setXAbsorptionline(findInX && current_bounds.getWidth() > MoveUtils.SORPTION_UNIT ? Absorptionline.createXAbsorptionline(point.x) : null); designer.getStateModel().setYAbsorptionline(findInY && current_bounds.getHeight() > MoveUtils.SORPTION_UNIT ? Absorptionline.createYAbsorptionline(point.y) : null); designer.getStateModel().setEquidistantLine(null); diff --git a/designer_form/src/com/fr/design/designer/beans/location/Inner.java b/designer_form/src/com/fr/design/designer/beans/location/Inner.java index 3abe94730d..5c3c38844f 100644 --- a/designer_form/src/com/fr/design/designer/beans/location/Inner.java +++ b/designer_form/src/com/fr/design/designer/beans/location/Inner.java @@ -46,89 +46,99 @@ public class Inner extends AccessDirection { return new Point(x, y); } - @Override - protected void sorptionPoint(Point point, Rectangle current_bounds, final FormDesigner designer) { - RectangleDesigner rd = new RectangleDesigner() { - public void setXAbsorptionline(Absorptionline line) { - designer.getStateModel().setXAbsorptionline(line); - } - public void setYAbsorptionline(Absorptionline line) { - designer.getStateModel().setYAbsorptionline(line); - } - - /** - * 获取当前选中块的水平线数组 - * - * @return 块的水平线数组 - * - */ - public int[] getHorizontalLine(){ - return ArrayUtils.EMPTY_INT_ARRAY; - } - - /** - * 获取当前选中块的垂直线数组 - * - * @return 块的垂直线数组 - * - */ - public int[] getVerticalLine(){ - return ArrayUtils.EMPTY_INT_ARRAY; - } - public RectangleIterator createRectangleIterator() { - return getRectangleIterator(designer); - } + //TODO 原先这个类是通过一个new一个匿名类继承RectangleDesigner接口实现的,但是报了方法超过50行的PMD错误 + //TODO 暂时就先这样命名,请原作者看到后重新命名 + private class RectangleDesigner1 implements RectangleDesigner { + private FormDesigner designer = null; - /** - * 设置designer内部组件是否重叠的标志位 - * - * @param isIntersects 是否重叠 - */ - @Override - public void setWidgetsIntersects(boolean isIntersects) { - designer.setWidgetsIntersect(isIntersects); - } + public RectangleDesigner1(FormDesigner designer) { + this.designer = designer; + } - /** - * 获取designer内部组件是否重叠的标志位 - * - * @return 重叠 - */ - @Override - public boolean getWidgetsIntersects() { - return designer.isWidgetsIntersect(); - } + public void setXAbsorptionline(Absorptionline line) { + designer.getStateModel().setXAbsorptionline(line); + } + public void setYAbsorptionline(Absorptionline line) { + designer.getStateModel().setYAbsorptionline(line); + } - /** - * 获取designer相对屏幕的位置 - * - * @return 位置 - */ - @Override - public Point getDesignerLocationOnScreen() { - return designer.getLocationOnScreen(); - } + /** + * 获取当前选中块的水平线数组 + * + * @return 块的水平线数组 + * + */ + public int[] getHorizontalLine(){ + return ArrayUtils.EMPTY_INT_ARRAY; + } - /** - * 设置等距线 - * - * @param line 吸附线 - */ - @Override - public void setEquidistantLine(Absorptionline line) { - designer.getStateModel().setEquidistantLine(line); - } + /** + * 获取当前选中块的垂直线数组 + * + * @return 块的垂直线数组 + * + */ + public int[] getVerticalLine(){ + return ArrayUtils.EMPTY_INT_ARRAY; + } + public RectangleIterator createRectangleIterator() { + return getRectangleIterator(designer); + } - @Override - public int getDesignerScrollHorizontalValue() { - return designer.getArea().getHorizontalValue(); - } + /** + * 设置designer内部组件是否重叠的标志位 + * + * @param isIntersects 是否重叠 + */ + @Override + public void setWidgetsIntersects(boolean isIntersects) { + designer.setWidgetsIntersect(isIntersects); + } - @Override - public int getDesignerScrollVerticalValue() { - return designer.getArea().getVerticalValue(); - } - }; + /** + * 获取designer内部组件是否重叠的标志位 + * + * @return 重叠 + */ + @Override + public boolean isWidgetsIntersects() { + return designer.isWidgetsIntersect(); + } + + /** + * 获取designer相对屏幕的位置 + * + * @return 位置 + */ + @Override + public Point getDesignerLocationOnScreen() { + return designer.getLocationOnScreen(); + } + + /** + * 设置等距线 + * + * @param line 吸附线 + */ + @Override + public void setEquidistantLine(Absorptionline line) { + designer.getStateModel().setEquidistantLine(line); + } + + @Override + public int getDesignerScrollHorizontalValue() { + return designer.getArea().getHorizontalValue(); + } + + @Override + public int getDesignerScrollVerticalValue() { + return designer.getArea().getVerticalValue(); + } + } + + @Override + protected void sorptionPoint(Point point, Rectangle current_bounds, final FormDesigner designer) { + RectangleDesigner1 rd = new RectangleDesigner1(designer); //判断当前操作的是不是参数面板,要特殊处理 boolean isParameterLayout = ((XCreator)(designer.getSelectionModel().getSelection().getSelectedCreator().getParent())).acceptType(XWParameterLayout.class); point.setLocation(MoveUtils.sorption(point.x, point.y, current_bounds.width, current_bounds.height, rd, isParameterLayout)); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java index 08f5765b99..9b778f850f 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java @@ -231,7 +231,7 @@ public class XWCardMainBorderLayout extends XWBorderLayout{ ); g2d.setColor(Color.BLACK); //画编辑文字 - g2d.drawString(Inter.getLocText("Edit"), x + w / 2 - 2, y + h / 2 + 5); + g2d.drawString(Inter.getLocText("FR-Designer_Edit"), x + w / 2 - 2, y + h / 2 + 5); } } diff --git a/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java b/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java index f2b68043d1..0c4bdd2be6 100644 --- a/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java +++ b/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java @@ -19,6 +19,8 @@ public class ConnectorHelper { public static final int NEAR = 5; private static double ratio = 0.5; + // TODO 为了消除魔术数错误,我不清楚这个15代表什么,先这样命名了,原作者看到了请改一下 + private final static int magicNumber1 = 15; private ArrayList drawingPoint; private FormDesigner designer; private boolean drawing; @@ -67,7 +69,6 @@ public class ConnectorHelper { ConnectorCreator cc = new ConnectorCreator(designer.getTarget().getContainer(), new Point(startPoint), new Point(endPoint)); ArrayList p = cc.createPointList(); long e = System.currentTimeMillis(); - System.out.println("useTime:" + (e - s)); return p; } @@ -87,7 +88,7 @@ public class ConnectorHelper { public void createDefalutLine() { if (drawingPoint != null && drawingPoint.size() > 1 - && ConnectorCreator.getMinimumDistance(drawingPoint.get(0), drawingPoint.get(drawingPoint.size() - 1)) > 15) { + && ConnectorCreator.getMinimumDistance(drawingPoint.get(0), drawingPoint.get(drawingPoint.size() - 1)) > magicNumber1) { ((XWAbsoluteLayout) designer.getRootComponent()).addConnector(new Connector().addAll(drawingPoint)); } drawingPoint = null; diff --git a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java index a692e37667..9b589b09b0 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java @@ -96,7 +96,7 @@ public class MobileWidgetTable extends JTable { @Override public void mousePressed(MouseEvent e) { getInstance().setCellSelected(); - if (selectedRow == 0 && !e.isPopupTrigger() && e.getClickCount() == 1 && e.getX() < 10){ // 如果是点击在第一行 + if (selectedRow == 0 && !e.isPopupTrigger() && e.getClickCount() == 1 && e.getX() < WIDGET_TABLE_ROW_HEIGHT / 2){ // 如果是点击在第一行 toggleCollapse(); } } @@ -268,9 +268,10 @@ public class MobileWidgetTable extends JTable { //WCardLayout里面并不是控件,而仍然是容器TabFitLayout,故要向下获取控件 //WCardTitlelLayout是XWCardLayout的标题容器,里面同样不是控件,不能获取MobileList //WTitleLayout是标题容器,比如图表的标题,里面是图表控件和Label标题控件,但是不需要获取MobileList - if (selectedModel.acceptType(WCardLayout.class) || selectedModel.acceptType(WCardTitleLayout.class) - || selectedModel.acceptType(WTitleLayout.class) || selectedModel.acceptType(WCardMainBorderLayout.class)) { - return new String[0][0]; + if (selectedModel.acceptType(WCardLayout.class) || selectedModel.acceptType(WCardTitleLayout.class)) { + if (selectedModel.acceptType(WTitleLayout.class) || selectedModel.acceptType(WCardMainBorderLayout.class)) { + return new String[0][0]; + } } ArrayList strings = ((WLayout)selectedModel).getMobileWidgetList(); String[][] widgetName = new String[strings.size() + 1][1]; From 821ef73086172840c2e4f5f0a64d9c599b6ecd9a Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Fri, 17 Feb 2017 12:00:37 +0800 Subject: [PATCH 081/127] =?UTF-8?q?=E6=B6=88=E9=99=A4PMD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/beans/location/MoveUtils.java | 5 +++-- .../src/com/fr/design/mainframe/ConnectorHelper.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/beans/location/MoveUtils.java b/designer_base/src/com/fr/design/beans/location/MoveUtils.java index fcd4f90eee..1e110358ce 100644 --- a/designer_base/src/com/fr/design/beans/location/MoveUtils.java +++ b/designer_base/src/com/fr/design/beans/location/MoveUtils.java @@ -16,6 +16,7 @@ import java.util.ArrayList; public class MoveUtils { public static final int SORPTION_UNIT = 5; + private static final int EQUIDISTANTLINE_UNIT = 4; public static WidgetForbidWindow widgetForbidWindow = new WidgetForbidWindow(); @@ -479,10 +480,10 @@ public class MoveUtils { } private static void processEquidistantLinesList(PlacePointing pEquidistantX, PlacePointing pEquidistantY, Rectangle operatingRectangle){ - EquidistantLine[] equidistantLines1 = new EquidistantLine[4]; + EquidistantLine[] equidistantLines1 = new EquidistantLine[EQUIDISTANTLINE_UNIT]; //先按方向处理,只保留四个方向上距离最近 for(int count = 0; count < equidistantLines.size(); count++){ - for (int direction = 0; direction < 4; direction++){ + for (int direction = 0; direction < EQUIDISTANTLINE_UNIT; direction++){ if(equidistantLines.get(count).getDirection() == (direction + 1)){//direction 1,2,3,4 分别对应top,left,bottom,right if(equidistantLines1[direction] != null && equidistantLines1[direction].getDistance() > equidistantLines.get(count).getDistance() diff --git a/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java b/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java index 0c4bdd2be6..b4d8972818 100644 --- a/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java +++ b/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java @@ -20,7 +20,7 @@ public class ConnectorHelper { public static final int NEAR = 5; private static double ratio = 0.5; // TODO 为了消除魔术数错误,我不清楚这个15代表什么,先这样命名了,原作者看到了请改一下 - private final static int magicNumber1 = 15; + private final static int MAGICNUMBER = 15; private ArrayList drawingPoint; private FormDesigner designer; private boolean drawing; @@ -88,7 +88,7 @@ public class ConnectorHelper { public void createDefalutLine() { if (drawingPoint != null && drawingPoint.size() > 1 - && ConnectorCreator.getMinimumDistance(drawingPoint.get(0), drawingPoint.get(drawingPoint.size() - 1)) > magicNumber1) { + && ConnectorCreator.getMinimumDistance(drawingPoint.get(0), drawingPoint.get(drawingPoint.size() - 1)) > MAGICNUMBER) { ((XWAbsoluteLayout) designer.getRootComponent()).addConnector(new Connector().addAll(drawingPoint)); } drawingPoint = null; From 4abace6d53aa2a50138f44b20351cc4cb68b33bc Mon Sep 17 00:00:00 2001 From: zhouping Date: Fri, 17 Feb 2017 14:17:25 +0800 Subject: [PATCH 082/127] =?UTF-8?q?REPORT-1814=20=E8=A1=A8=E5=8D=95tab?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=94=B9=E8=89=AFbug=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B4=A8=E9=87=8F=EF=BC=8C=E6=8A=BD=E5=87=BA=E7=88=B6=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/TabMoveAction.java | 80 +++++++++++++++++++ .../cardlayout/TabMoveCustomAction.java | 23 +----- .../creator/cardlayout/TabMoveEndAction.java | 64 ++++----------- .../cardlayout/TabMoveFirstAction.java | 61 ++++---------- .../creator/cardlayout/TabMoveNextAction.java | 60 ++++---------- .../creator/cardlayout/TabMovePrevAction.java | 60 ++++---------- 6 files changed, 143 insertions(+), 205 deletions(-) create mode 100644 designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveAction.java diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveAction.java new file mode 100644 index 0000000000..354846d91a --- /dev/null +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveAction.java @@ -0,0 +1,80 @@ +package com.fr.design.designer.creator.cardlayout; + +import com.fr.design.designer.beans.actions.FormUndoableAction; +import com.fr.design.mainframe.FormDesigner; +import com.fr.form.ui.CardSwitchButton; +import com.fr.form.ui.container.cardlayout.WTabFitLayout; +import com.fr.general.FRLogger; + +/** + * Created by zhouping on 2017/2/17. + */ +public class TabMoveAction extends FormUndoableAction { + private XCardSwitchButton xCardSwitchButton; + + public TabMoveAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { + super(t); + this.xCardSwitchButton = xCardSwitchButton; + } + + @Override + public boolean executeActionReturnUndoRecordNeeded() { + XCardSwitchButton xCardSwitchButton = getxCardSwitchButton(); + XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); + XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); + CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); + try { + int currentIndex = currentButton.getIndex(); + int maxIndex = xwCardTagLayout.getComponentCount(); + XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); + WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); + xwCardTagLayout.setSwitchingTab(true); + + changeTabIndex(xwCardTagLayout, xwCardLayout, currentIndex, maxIndex); + + moveTabAction(xwCardTagLayout, currentButton, xCurrentTab, currentTab); + + xwCardTagLayout.setSwitchingTab(false); + }catch (Exception e){ + xwCardTagLayout.setSwitchingTab(false); + FRLogger.getLogger().error(e.getMessage()); + return false; + } + return true; + } + + private void moveTabAction(XWCardTagLayout xwCardTagLayout, CardSwitchButton currentButton, XWTabFitLayout xCurrentTab, WTabFitLayout currentTab) { + int move2Index = getTabMoveIndex(currentButton); + XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); + xwCardTagLayout.remove(xCardSwitchButton); + xwCardTagLayout.add(xCardSwitchButton, move2Index); + xwCardLayout.remove(xCurrentTab); + xwCardLayout.add(xCurrentTab, move2Index); + currentButton.setIndex(move2Index); + currentTab.setIndex(move2Index); + currentTab.setTabNameIndex(move2Index); + xwCardLayout.toData().setShowIndex(move2Index); + xwCardLayout.showCard(); + } + + //改变Tab的索引号 + protected void changeTabIndex(XWCardTagLayout xwCardTagLayout, XWCardLayout xwCardLayout, int currentIndex, int maxIndex) { + } + + /** + * 获取tab移动的目的索引:首位,末尾,下一个,上一个 + * @param currentButton 当前按钮 + * @return 索引 + */ + protected int getTabMoveIndex(CardSwitchButton currentButton) { + return currentButton.getIndex(); + } + + public XCardSwitchButton getxCardSwitchButton() { + return xCardSwitchButton; + } + + public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { + this.xCardSwitchButton = xCardSwitchButton; + } +} diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java index 93a62287e0..8930c686c4 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java @@ -1,32 +1,17 @@ package com.fr.design.designer.creator.cardlayout; -import com.fr.base.BaseUtils; -import com.fr.design.designer.beans.actions.FormUndoableAction; import com.fr.design.mainframe.FormDesigner; +import com.fr.general.IOUtils; /** * Created by zhouping on 2017/2/9. */ -public class TabMoveCustomAction extends FormUndoableAction { - private XCardSwitchButton xCardSwitchButton; +public class TabMoveCustomAction extends TabMoveAction { public TabMoveCustomAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { - super(t); + super(t, xCardSwitchButton); this.setName(""); - this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); - this.xCardSwitchButton = xCardSwitchButton; + this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/control/refresh.png")); } - @Override - public boolean executeActionReturnUndoRecordNeeded() { - return false; - } - - public XCardSwitchButton getxCardSwitchButton() { - return xCardSwitchButton; - } - - public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { - this.xCardSwitchButton = xCardSwitchButton; - } } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java index b2a5214c48..5da5dd1c73 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java @@ -1,68 +1,36 @@ package com.fr.design.designer.creator.cardlayout; -import com.fr.base.BaseUtils; -import com.fr.design.designer.beans.actions.FormUndoableAction; import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.container.cardlayout.WTabFitLayout; -import com.fr.general.FRLogger; +import com.fr.general.IOUtils; import com.fr.general.Inter; /** * Created by zhouping on 2017/2/9. */ -public class TabMoveEndAction extends FormUndoableAction { - private XCardSwitchButton xCardSwitchButton; +public class TabMoveEndAction extends TabMoveAction { public TabMoveEndAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { - super(t); + super(t, xCardSwitchButton); this.setName(Inter.getLocText("FR-Designer-Move_Tab_End")); - this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/rightright.png")); - this.xCardSwitchButton = xCardSwitchButton; + this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/control/rightright.png")); } - @Override - public boolean executeActionReturnUndoRecordNeeded() { - XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); - XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); - CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); - try { - int currentIndex = currentButton.getIndex(); - int maxIndex = xwCardTagLayout.getComponentCount(); - XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); - WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); - xwCardTagLayout.setSwitchingTab(true); - //修改当前tab往后所有tab的索引号 - for (int i = currentIndex + 1; i < maxIndex; i++) { - CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData(); - tempBtn.setIndex(i - 1); - WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData(); - tempTab.setIndex(i - 1); - tempTab.setTabNameIndex(i - 1); - } - xwCardTagLayout.remove(xCardSwitchButton); - xwCardTagLayout.add(xCardSwitchButton); - xwCardLayout.remove(xCurrentTab); - xwCardLayout.add(xCurrentTab); - currentButton.setIndex(maxIndex - 1); - currentTab.setIndex(maxIndex - 1); - currentTab.setTabNameIndex(maxIndex - 1); - xwCardLayout.toData().setShowIndex(maxIndex - 1); - xwCardLayout.showCard(); - xwCardTagLayout.setSwitchingTab(false); - }catch (Exception e){ - xwCardTagLayout.setSwitchingTab(false); - FRLogger.getLogger().error(e.getMessage()); - return false; + //改变Tab的索引号 + protected void changeTabIndex(XWCardTagLayout xwCardTagLayout, XWCardLayout xwCardLayout, int currentIndex, int maxIndex) { + //修改当前tab往后所有tab的索引号 + for (int i = currentIndex + 1; i < maxIndex; i++) { + CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData(); + tempBtn.setIndex(i - 1); + WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData(); + tempTab.setIndex(i - 1); + tempTab.setTabNameIndex(i - 1); } - return true; - } - - public XCardSwitchButton getxCardSwitchButton() { - return xCardSwitchButton; } - public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { - this.xCardSwitchButton = xCardSwitchButton; + @Override + protected int getTabMoveIndex(CardSwitchButton btn) { + return getxCardSwitchButton().getTagLayout().getComponentCount() - 1; } } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java index c9034d04b5..26195b9462 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java @@ -1,67 +1,36 @@ package com.fr.design.designer.creator.cardlayout; -import com.fr.base.BaseUtils; -import com.fr.design.designer.beans.actions.FormUndoableAction; import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.container.cardlayout.WTabFitLayout; -import com.fr.general.FRLogger; +import com.fr.general.IOUtils; import com.fr.general.Inter; /** * Created by zhouping on 2017/2/9. */ -public class TabMoveFirstAction extends FormUndoableAction { - private XCardSwitchButton xCardSwitchButton; +public class TabMoveFirstAction extends TabMoveAction { public TabMoveFirstAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { - super(t); + super(t, xCardSwitchButton); this.setName(Inter.getLocText("FR-Designer-Move_Tab_First")); - this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/leftleft.png")); - this.xCardSwitchButton = xCardSwitchButton; + this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/control/leftleft.png")); } @Override - public boolean executeActionReturnUndoRecordNeeded() { - XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); - XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); - CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); - try { - int currentIndex = currentButton.getIndex(); - XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); - WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); - xwCardTagLayout.setSwitchingTab(true); - //修改当前tab往前所有tab的索引号 - for (int i = currentIndex - 1; i >= 0; i--) { - CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData(); - tempBtn.setIndex(i + 1); - WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData(); - tempTab.setIndex(i + 1); - tempTab.setTabNameIndex(i + 1); - } - xwCardTagLayout.remove(xCardSwitchButton); - xwCardTagLayout.add(xCardSwitchButton, 0); - xwCardLayout.remove(xCurrentTab); - xwCardLayout.add(xCurrentTab, 0); - currentButton.setIndex(0); - currentTab.setIndex(0); - currentTab.setTabNameIndex(0); - xwCardLayout.toData().setShowIndex(0); - xwCardLayout.showCard(); - xwCardTagLayout.setSwitchingTab(false); - }catch (Exception e){ - xwCardTagLayout.setSwitchingTab(false); - FRLogger.getLogger().error(e.getMessage()); - return false; + protected void changeTabIndex(XWCardTagLayout xwCardTagLayout, XWCardLayout xwCardLayout, int currentIndex, int maxIndex) { + //修改当前tab往前所有tab的索引号 + for (int i = currentIndex - 1; i >= 0; i--) { + CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData(); + tempBtn.setIndex(i + 1); + WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData(); + tempTab.setIndex(i + 1); + tempTab.setTabNameIndex(i + 1); } - return true; } - public XCardSwitchButton getxCardSwitchButton() { - return xCardSwitchButton; - } - - public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { - this.xCardSwitchButton = xCardSwitchButton; + @Override + protected int getTabMoveIndex(CardSwitchButton btn) { + return 0; } } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java index e7806a7ae0..10e796abc9 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java @@ -1,66 +1,34 @@ package com.fr.design.designer.creator.cardlayout; -import com.fr.base.BaseUtils; -import com.fr.design.designer.beans.actions.FormUndoableAction; import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.container.cardlayout.WTabFitLayout; -import com.fr.general.FRLogger; +import com.fr.general.IOUtils; import com.fr.general.Inter; /** * Created by zhouping on 2017/2/9. */ -public class TabMoveNextAction extends FormUndoableAction { - private XCardSwitchButton xCardSwitchButton; +public class TabMoveNextAction extends TabMoveAction { public TabMoveNextAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { - super(t); + super(t, xCardSwitchButton); this.setName(Inter.getLocText("FR-Designer-Move_Tab_Next")); - this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/right.png")); - this.xCardSwitchButton = xCardSwitchButton; + this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/control/right.png")); } @Override - public boolean executeActionReturnUndoRecordNeeded() { - XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); - XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); - CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); - try { - int currentIndex = currentButton.getIndex(); - XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); - WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); - xwCardTagLayout.setSwitchingTab(true); - //修改下一个tab的索引号 - CardSwitchButton nextBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex + 1).toData(); - nextBtn.setIndex(currentIndex); - WTabFitLayout nextTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex + 1).toData(); - nextTab.setIndex(currentIndex); - nextTab.setTabNameIndex(currentIndex); - - xwCardTagLayout.remove(xCardSwitchButton); - xwCardTagLayout.add(xCardSwitchButton, currentIndex + 1); - xwCardLayout.remove(xCurrentTab); - xwCardLayout.add(xCurrentTab, currentIndex + 1); - currentButton.setIndex(currentIndex + 1); - currentTab.setIndex(currentIndex + 1); - currentTab.setTabNameIndex(currentIndex + 1); - xwCardLayout.toData().setShowIndex(currentIndex + 1); - xwCardLayout.showCard(); - xwCardTagLayout.setSwitchingTab(false); - }catch (Exception e){ - xwCardTagLayout.setSwitchingTab(false); - FRLogger.getLogger().error(e.getMessage()); - return false; - } - return true; - } - - public XCardSwitchButton getxCardSwitchButton() { - return xCardSwitchButton; + protected void changeTabIndex(XWCardTagLayout xwCardTagLayout, XWCardLayout xwCardLayout, int currentIndex, int maxIndex) { + //修改下一个tab的索引号 + CardSwitchButton nextBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex + 1).toData(); + nextBtn.setIndex(currentIndex); + WTabFitLayout nextTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex + 1).toData(); + nextTab.setIndex(currentIndex); + nextTab.setTabNameIndex(currentIndex); } - public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { - this.xCardSwitchButton = xCardSwitchButton; + @Override + protected int getTabMoveIndex(CardSwitchButton currentButton) { + return currentButton.getIndex() + 1; } } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java index e92852c6c9..859a27eea2 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java @@ -1,66 +1,34 @@ package com.fr.design.designer.creator.cardlayout; -import com.fr.base.BaseUtils; -import com.fr.design.designer.beans.actions.FormUndoableAction; import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.container.cardlayout.WTabFitLayout; -import com.fr.general.FRLogger; +import com.fr.general.IOUtils; import com.fr.general.Inter; /** * Created by zhouping on 2017/2/9. */ -public class TabMovePrevAction extends FormUndoableAction { - private XCardSwitchButton xCardSwitchButton; +public class TabMovePrevAction extends TabMoveAction { public TabMovePrevAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { - super(t); + super(t, xCardSwitchButton); this.setName(Inter.getLocText("FR-Designer-Move_Tab_Prev")); - this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/left.png")); - this.xCardSwitchButton = xCardSwitchButton; + this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/control/left.png")); } @Override - public boolean executeActionReturnUndoRecordNeeded() { - XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); - XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); - CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); - try { - int currentIndex = currentButton.getIndex(); - XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); - WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); - xwCardTagLayout.setSwitchingTab(true); - //修改上一个tab的索引号 - CardSwitchButton prevBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex - 1).toData(); - prevBtn.setIndex(currentIndex); - WTabFitLayout prevTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex - 1).toData(); - prevTab.setIndex(currentIndex); - prevTab.setTabNameIndex(currentIndex); - - xwCardTagLayout.remove(xCardSwitchButton); - xwCardTagLayout.add(xCardSwitchButton, currentIndex - 1); - xwCardLayout.remove(xCurrentTab); - xwCardLayout.add(xCurrentTab, currentIndex - 1); - currentButton.setIndex(currentIndex - 1); - currentTab.setIndex(currentIndex - 1); - currentTab.setTabNameIndex(currentIndex - 1); - xwCardLayout.toData().setShowIndex(currentIndex - 1); - xwCardLayout.showCard(); - xwCardTagLayout.setSwitchingTab(false); - }catch (Exception e){ - xwCardTagLayout.setSwitchingTab(false); - FRLogger.getLogger().error(e.getMessage()); - return false; - } - return true; - } - - public XCardSwitchButton getxCardSwitchButton() { - return xCardSwitchButton; + protected void changeTabIndex(XWCardTagLayout xwCardTagLayout, XWCardLayout xwCardLayout, int currentIndex, int maxIndex) { + //修改上一个tab的索引号 + CardSwitchButton prevBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex - 1).toData(); + prevBtn.setIndex(currentIndex); + WTabFitLayout prevTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex - 1).toData(); + prevTab.setIndex(currentIndex); + prevTab.setTabNameIndex(currentIndex); } - public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { - this.xCardSwitchButton = xCardSwitchButton; + @Override + protected int getTabMoveIndex(CardSwitchButton currentButton) { + return currentButton.getIndex() - 1; } } From 5aeaf116985970713264c1c8528632a7dd919606 Mon Sep 17 00:00:00 2001 From: zhouping Date: Fri, 17 Feb 2017 18:01:28 +0800 Subject: [PATCH 083/127] =?UTF-8?q?REPORT-1838=20frm=E9=87=8C=E5=A4=9A?= =?UTF-8?q?=E5=B1=82tab=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=8A=A5=E8=A1=A8=E5=9D=97=E5=A4=A7=E5=B0=8F=E6=9C=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beans/adapters/layout/FRFitLayoutAdapter.java | 6 +++++- .../beans/adapters/layout/FRTabFitLayoutAdapter.java | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java index 25b079caf0..d8243a24bb 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java @@ -277,6 +277,10 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { super.clearCompsList(); } + protected Rectangle getLayoutBound(XWCardMainBorderLayout mainLayout){ + return mainLayout.getBounds(); + } + private Rectangle adjustBackupBound(Rectangle backupBound, XWCardMainBorderLayout mainLayout) { // 参数界面高度对纵坐标产生的影响 JForm jform = (JForm) (HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); @@ -284,7 +288,7 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { backupBound.y -= jform.getFormDesign().getParaHeight(); } - Rectangle rec = mainLayout.getBounds(); + Rectangle rec = getLayoutBound(mainLayout); // XWTabLayout里面的横纵坐标收到外层XWCardMainBorderLayout的横纵坐标影响 // 减掉之后可以按照它原来的逻辑执行 backupBound.x -= rec.x; diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java index 8c67a44ab0..bd85fc83be 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java @@ -4,13 +4,12 @@ package com.fr.design.designer.beans.adapters.layout; -import java.awt.Rectangle; - import com.fr.design.beans.GroupModel; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWidgetCreator; import com.fr.design.designer.creator.cardlayout.XWCardLayout; +import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout; import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; import com.fr.design.designer.properties.FRTabFitLayoutPropertiesGroupModel; import com.fr.design.utils.ComponentUtils; @@ -18,6 +17,8 @@ import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; import com.fr.general.ComparatorUtils; +import java.awt.*; + /** * tab布局tabFit适配器 * @@ -91,4 +92,8 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter { } return y; } + + protected Rectangle getLayoutBound(XWCardMainBorderLayout mainLayout){ + return ComponentUtils.getRelativeBounds(mainLayout); + } } \ No newline at end of file From ae2dac569b3109713ff901449c50d5f66d419256 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 20 Feb 2017 11:00:44 +0800 Subject: [PATCH 084/127] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E5=B1=9E=E6=80=A7=E4=BF=AE=E6=94=B9=E4=B8=BA=E7=A7=81?= =?UTF-8?q?=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapters/layout/FRBodyLayoutAdapter.java | 42 +++++++++---------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java index dc1fb7d368..e189c607f5 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java @@ -19,37 +19,37 @@ import java.util.*; * Created by zhouping on 2016/8/18. */ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter { - protected static final int COMP_TOP = 1; - protected static final int COMP_BOTTOM = 2; - protected static final int COMP_LEFT = 3; - protected static final int COMP_RIGHT = 4; + private static final int COMP_TOP = 1; + private static final int COMP_BOTTOM = 2; + private static final int COMP_LEFT = 3; + private static final int COMP_RIGHT = 4; private static final int COMP_LEFT_TOP = 5; private static final int COMP_LEFT_BOTTOM = 6; private static final int COMP_RIGHT_TOP = 7; private static final int COMP_RIGHT_BOTTOM = 8; private static final int INDEX_ZERO = 0; - protected static final double TOP_HALF = 0.25; - protected static final double BOTTOM_HALF = 0.75; - protected static final int DEFAULT_AREA_LENGTH = 5; //判断交叉区域范围的默认长度 - protected static final int BORDER_PROPORTION = 10; //边界三等分或交叉区域大小取组件1/10和默认大小 + private static final double TOP_HALF = 0.25; + private static final double BOTTOM_HALF = 0.75; + private static final int DEFAULT_AREA_LENGTH = 5; //判断交叉区域范围的默认长度 + private static final int BORDER_PROPORTION = 10; //边界三等分或交叉区域大小取组件1/10和默认大小 - protected int trisectAreaDirect = 0; - protected int crossPointAreaDirect = 0; + private int trisectAreaDirect = 0; + private int crossPointAreaDirect = 0; // 增加删除拉伸控件用的临时list - protected java.util.List rightComps; - protected java.util.List leftComps; - protected java.util.List downComps; - protected java.util.List upComps; + private java.util.List rightComps; + private java.util.List leftComps; + private java.util.List downComps; + private java.util.List upComps; // 三等分时计算对应侧的组件 - protected boolean isFindRelatedComps = false; + private boolean isFindRelatedComps = false; // 渲染时只计算对应的bounds而不调整 private boolean isCalculateChildPos = false; private int[] childPosition = null; //painter用的位置 - protected int minWidth = 0; // 最小尺寸,由于屏幕百分比里不同,显示的最小大小也不同 - protected int minHeight = 0; - protected int actualVal = 0; // 存在间隔时,add move drag 判断对齐等都要考虑 - protected PaddingMargin margin; // 布局容器边距 + private int minWidth = 0; // 最小尺寸,由于屏幕百分比里不同,显示的最小大小也不同 + private int minHeight = 0; + private int actualVal = 0; // 存在间隔时,add move drag 判断对齐等都要考虑 + private PaddingMargin margin; // 布局容器边距 /** * 在添加组件状态时,当鼠标移动到某个容器上方时,如果该容器有布局管理器,则会调用该布局 @@ -629,10 +629,8 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter { private int getPositionOfFix(XCreator currentCreator, int x, int y) { int position = 0; XLayoutContainer cardLayout = ((XWCardMainBorderLayout) currentCreator).getCardPart(); - XLayoutContainer container = (XLayoutContainer) cardLayout.getComponent(0); Rectangle rect = ComponentUtils.getRelativeBounds(container); - /* * 为了获取到鼠标drop位置的控件, * 我们之前已经将y值变为相对坐标值; @@ -644,11 +642,9 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter { if (currentCreator.getParent().getParent().getComponent(0) instanceof XWParameterLayout) { int high = currentCreator.getParent().getParent().getComponent(0).getHeight(); y = y + WCardMainBorderLayout.TAB_HEIGHT + high; - } else { y = y + WCardMainBorderLayout.TAB_HEIGHT; } - int tempX = x - rect.x; int tempY = y - rect.y; int containerX = container.getX(); From 58ad4ecbf0d1fa8379ae2e4ba71b05f0e3f50666 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Mon, 20 Feb 2017 11:20:01 +0800 Subject: [PATCH 085/127] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=E4=B8=8D=E8=A7=84=E8=8C=83=E7=9A=84=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../poly/hanlder/BottomCornerMouseHanlder.java | 2 +- .../com/fr/design/beans/location/MoveUtils.java | 2 +- .../gui/itable/AbstractPropertyTable.java | 17 +++++++---------- .../com/fr/design/gui/itable/PropertyGroup.java | 14 ++++++++++---- .../design/designer/beans/location/Inner.java | 10 ++++------ .../fr/design/mainframe/ConnectorHelper.java | 5 ++--- .../design/mainframe/MobileParaWidgetTable.java | 3 --- .../fr/design/mainframe/MobileWidgetTable.java | 3 --- 8 files changed, 25 insertions(+), 31 deletions(-) diff --git a/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java b/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java index e42835abbb..1a895cbfef 100644 --- a/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java +++ b/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java @@ -170,7 +170,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter { * @return 重叠 */ @Override - public boolean isWidgetsIntersects() { + public boolean isWidgetsIntersected() { return false; } diff --git a/designer_base/src/com/fr/design/beans/location/MoveUtils.java b/designer_base/src/com/fr/design/beans/location/MoveUtils.java index 1e110358ce..853e37026a 100644 --- a/designer_base/src/com/fr/design/beans/location/MoveUtils.java +++ b/designer_base/src/com/fr/design/beans/location/MoveUtils.java @@ -84,7 +84,7 @@ public class MoveUtils { * 获取designer内部组件是否重叠的标志位 * @return 重叠 */ - boolean isWidgetsIntersects(); //TODO 消除PMD检查错误,把getWidgetsIntersects改成isWidgetsIntersects + boolean isWidgetsIntersected(); /** * 获取designer相对屏幕的位置 diff --git a/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java b/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java index 96c9a5c1e4..340b554505 100644 --- a/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java +++ b/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java @@ -28,23 +28,17 @@ public abstract class AbstractPropertyTable extends JTable { // // 所有数据组, 把数据分组,一个可折叠的项里面的所有行 为一组 protected ArrayList groups; - protected TableModel default_table_model; // 属性表被选中的行加一个浅蓝色的背景 public static final Color PROPERTY_SELECTION_BACKGROUND = new Color(153, 204, 255); // 属性表的行高 public static final int PROPERTY_TABLE_ROW_HEIGHT = 22; - private static final int PROPERTY_ICON_WIDTH = 10; public AbstractPropertyTable() { this.setTableProperties(); this.initPopup(); - default_table_model = new DefaultTableModel(); - this.setModel(default_table_model); + this.setModel(new DefaultTableModel()); } - /** - * 设置表格属性 - */ private void setTableProperties() { JTableHeader header = getTableHeader(); header.setReorderingAllowed(false); @@ -86,8 +80,11 @@ public abstract class AbstractPropertyTable extends JTable { PropertyGroup group = groups.get(pIndex.x); //如果是标题行 if (pIndex.y == 0) { - //采用group中定义好的标题行渲染器 - return group.getRenderer(); + if (column == 0) { + return group.getFirstRenderer(); + } else { + return group.getSecondRenderer(); + } } else { //如果是非标题行第一列,采用默认渲染器 if (column == 0) { @@ -183,7 +180,7 @@ public abstract class AbstractPropertyTable extends JTable { int row = AbstractPropertyTable.super.rowAtPoint(e.getPoint()); if (row != -1) { Point pIndex = getGroupIndex(row); - if (pIndex.y == 0 && e.getClickCount() == 1 && e.getX() < PROPERTY_ICON_WIDTH) { + if (pIndex.y == 0 && e.getClickCount() == 1 && e.getX() < 10) { toggleCollapse(pIndex.x); } } diff --git a/designer_base/src/com/fr/design/gui/itable/PropertyGroup.java b/designer_base/src/com/fr/design/gui/itable/PropertyGroup.java index 0e6426ac17..c863c882d6 100644 --- a/designer_base/src/com/fr/design/gui/itable/PropertyGroup.java +++ b/designer_base/src/com/fr/design/gui/itable/PropertyGroup.java @@ -12,11 +12,13 @@ public class PropertyGroup { private GroupModel model; // 描述这个属性组中的数据model private String name; // 这组属性的标题名称 private boolean collapsed; // 这组属性是否折叠 - private GroupRenderer renderer; // 属性标题渲染器 + private GroupRenderer renderer1; + private GroupRenderer renderer2; public PropertyGroup(GroupModel model) { this(model.getGroupName(), model, false); - renderer = new GroupRenderer(); + renderer1 = new GroupRenderer(); + renderer2 = new GroupRenderer(); } public PropertyGroup(String name, GroupModel model, boolean collapsed) { @@ -49,8 +51,12 @@ public class PropertyGroup { this.collapsed = collapsed; } - public TableCellRenderer getRenderer() { - return renderer; + public TableCellRenderer getFirstRenderer() { + return renderer1; + } + + public TableCellRenderer getSecondRenderer() { + return renderer2; } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/beans/location/Inner.java b/designer_form/src/com/fr/design/designer/beans/location/Inner.java index 5c3c38844f..d400a064ca 100644 --- a/designer_form/src/com/fr/design/designer/beans/location/Inner.java +++ b/designer_form/src/com/fr/design/designer/beans/location/Inner.java @@ -46,12 +46,10 @@ public class Inner extends AccessDirection { return new Point(x, y); } - //TODO 原先这个类是通过一个new一个匿名类继承RectangleDesigner接口实现的,但是报了方法超过50行的PMD错误 - //TODO 暂时就先这样命名,请原作者看到后重新命名 - private class RectangleDesigner1 implements RectangleDesigner { + private class RectDesigner implements RectangleDesigner { private FormDesigner designer = null; - public RectangleDesigner1(FormDesigner designer) { + public RectDesigner(FormDesigner designer) { this.designer = designer; } @@ -101,7 +99,7 @@ public class Inner extends AccessDirection { * @return 重叠 */ @Override - public boolean isWidgetsIntersects() { + public boolean isWidgetsIntersected() { return designer.isWidgetsIntersect(); } @@ -138,7 +136,7 @@ public class Inner extends AccessDirection { @Override protected void sorptionPoint(Point point, Rectangle current_bounds, final FormDesigner designer) { - RectangleDesigner1 rd = new RectangleDesigner1(designer); + RectDesigner rd = new RectDesigner(designer); //判断当前操作的是不是参数面板,要特殊处理 boolean isParameterLayout = ((XCreator)(designer.getSelectionModel().getSelection().getSelectedCreator().getParent())).acceptType(XWParameterLayout.class); point.setLocation(MoveUtils.sorption(point.x, point.y, current_bounds.width, current_bounds.height, rd, isParameterLayout)); diff --git a/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java b/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java index b4d8972818..2bc38699e2 100644 --- a/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java +++ b/designer_form/src/com/fr/design/mainframe/ConnectorHelper.java @@ -19,8 +19,7 @@ public class ConnectorHelper { public static final int NEAR = 5; private static double ratio = 0.5; - // TODO 为了消除魔术数错误,我不清楚这个15代表什么,先这样命名了,原作者看到了请改一下 - private final static int MAGICNUMBER = 15; + private final static int ADSORPTION = 15; // 吸附距离 private ArrayList drawingPoint; private FormDesigner designer; private boolean drawing; @@ -88,7 +87,7 @@ public class ConnectorHelper { public void createDefalutLine() { if (drawingPoint != null && drawingPoint.size() > 1 - && ConnectorCreator.getMinimumDistance(drawingPoint.get(0), drawingPoint.get(drawingPoint.size() - 1)) > MAGICNUMBER) { + && ConnectorCreator.getMinimumDistance(drawingPoint.get(0), drawingPoint.get(drawingPoint.size() - 1)) > ADSORPTION) { ((XWAbsoluteLayout) designer.getRootComponent()).addConnector(new Connector().addAll(drawingPoint)); } drawingPoint = null; diff --git a/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java index 9d670db2ca..67f47f951a 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java @@ -82,9 +82,6 @@ class MobileParaWidgetTable extends JTable { add(moveComponent); } - /** - * 设置表格属性 - */ private void setTableProperties() { JTableHeader header = getTableHeader(); header.setReorderingAllowed(false); diff --git a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java index 9b589b09b0..bb7ba99187 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java @@ -67,9 +67,6 @@ public class MobileWidgetTable extends JTable { add(moveComponent); } - /** - * 设置表格属性 - */ private void setTableProperties() { JTableHeader header = getTableHeader(); header.setReorderingAllowed(false); From 3b3481f7685cf32f84681902559ae16cbd47c251 Mon Sep 17 00:00:00 2001 From: zhouping Date: Mon, 20 Feb 2017 11:20:01 +0800 Subject: [PATCH 086/127] =?UTF-8?q?REPORT-1814=20=E8=A1=A8=E5=8D=95tab?= =?UTF-8?q?=E5=9D=97=E7=9A=84=E6=94=B9=E8=89=AFbug=20=E5=B5=8C=E5=A5=97?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/cardlayout/XWCardLayout.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 7597a45796..8a7db60597 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -296,8 +296,14 @@ public class XWCardLayout extends XLayoutContainer { * @return 嵌套与否 */ private boolean isNested() { - XLayoutContainer xLayoutContainer = this.getBackupParent().getBackupParent(); - return xLayoutContainer == null || xLayoutContainer.acceptType(XWTabFitLayout.class); + XCreator xCreator = (XCreator)this.getBackupParent().getParent(); + while (xCreator != null) { + if (xCreator.acceptType(XWCardMainBorderLayout.class)) { + return true; + } + xCreator = (XCreator) xCreator.getParent(); + } + return false; } public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException { From 0403b6e3cc2a049424e6c28c7f95d354693e3f1c Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Mon, 20 Feb 2017 11:31:06 +0800 Subject: [PATCH 087/127] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=B0=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/itable/AbstractPropertyTable.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java b/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java index 340b554505..36e9cc17d1 100644 --- a/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java +++ b/designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java @@ -32,6 +32,7 @@ public abstract class AbstractPropertyTable extends JTable { public static final Color PROPERTY_SELECTION_BACKGROUND = new Color(153, 204, 255); // 属性表的行高 public static final int PROPERTY_TABLE_ROW_HEIGHT = 22; + private static final int PROPERTY_ICON_WIDTH = 10; public AbstractPropertyTable() { this.setTableProperties(); @@ -180,7 +181,7 @@ public abstract class AbstractPropertyTable extends JTable { int row = AbstractPropertyTable.super.rowAtPoint(e.getPoint()); if (row != -1) { Point pIndex = getGroupIndex(row); - if (pIndex.y == 0 && e.getClickCount() == 1 && e.getX() < 10) { + if (pIndex.y == 0 && e.getClickCount() == 1 && e.getX() < PROPERTY_ICON_WIDTH) { toggleCollapse(pIndex.x); } } From bb99b03e2b30c2cd433662fb29076e24f526bf5c Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 20 Feb 2017 14:06:08 +0800 Subject: [PATCH 088/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapters/layout/FRBodyLayoutAdapter.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java index e189c607f5..8db19d9fba 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java @@ -19,37 +19,37 @@ import java.util.*; * Created by zhouping on 2016/8/18. */ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter { - private static final int COMP_TOP = 1; - private static final int COMP_BOTTOM = 2; - private static final int COMP_LEFT = 3; - private static final int COMP_RIGHT = 4; + protected static final int COMP_TOP = 1; + protected static final int COMP_BOTTOM = 2; + protected static final int COMP_LEFT = 3; + protected static final int COMP_RIGHT = 4; private static final int COMP_LEFT_TOP = 5; private static final int COMP_LEFT_BOTTOM = 6; private static final int COMP_RIGHT_TOP = 7; private static final int COMP_RIGHT_BOTTOM = 8; private static final int INDEX_ZERO = 0; - private static final double TOP_HALF = 0.25; - private static final double BOTTOM_HALF = 0.75; - private static final int DEFAULT_AREA_LENGTH = 5; //判断交叉区域范围的默认长度 - private static final int BORDER_PROPORTION = 10; //边界三等分或交叉区域大小取组件1/10和默认大小 + protected static final double TOP_HALF = 0.25; + protected static final double BOTTOM_HALF = 0.75; + protected static final int DEFAULT_AREA_LENGTH = 5; //判断交叉区域范围的默认长度 + protected static final int BORDER_PROPORTION = 10; //边界三等分或交叉区域大小取组件1/10和默认大小 - private int trisectAreaDirect = 0; + protected int trisectAreaDirect = 0; private int crossPointAreaDirect = 0; // 增加删除拉伸控件用的临时list - private java.util.List rightComps; - private java.util.List leftComps; - private java.util.List downComps; - private java.util.List upComps; + protected java.util.List rightComps; + protected java.util.List leftComps; + protected java.util.List downComps; + protected java.util.List upComps; // 三等分时计算对应侧的组件 - private boolean isFindRelatedComps = false; + protected boolean isFindRelatedComps = false; // 渲染时只计算对应的bounds而不调整 private boolean isCalculateChildPos = false; private int[] childPosition = null; //painter用的位置 - private int minWidth = 0; // 最小尺寸,由于屏幕百分比里不同,显示的最小大小也不同 - private int minHeight = 0; - private int actualVal = 0; // 存在间隔时,add move drag 判断对齐等都要考虑 - private PaddingMargin margin; // 布局容器边距 + protected int minWidth = 0; // 最小尺寸,由于屏幕百分比里不同,显示的最小大小也不同 + protected int minHeight = 0; + protected int actualVal = 0; // 存在间隔时,add move drag 判断对齐等都要考虑 + protected PaddingMargin margin; // 布局容器边距 /** * 在添加组件状态时,当鼠标移动到某个容器上方时,如果该容器有布局管理器,则会调用该布局 From f91cec5562e296c8450ca3c2c712ea0efb2b13c7 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Mon, 20 Feb 2017 14:20:03 +0800 Subject: [PATCH 089/127] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java | 2 +- .../src/com/fr/design/beans/location/MoveUtils.java | 6 +++--- .../src/com/fr/design/designer/beans/location/Inner.java | 2 +- .../src/com/fr/design/mainframe/WidgetPropertyPane.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java b/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java index 1a895cbfef..3f063e21d4 100644 --- a/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java +++ b/designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java @@ -161,7 +161,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter { * @param isIntersects 是否重叠 */ @Override - public void setWidgetsIntersects(boolean isIntersects) { + public void setWidgetsIntersected(boolean isIntersects) { } /** diff --git a/designer_base/src/com/fr/design/beans/location/MoveUtils.java b/designer_base/src/com/fr/design/beans/location/MoveUtils.java index 853e37026a..d898484464 100644 --- a/designer_base/src/com/fr/design/beans/location/MoveUtils.java +++ b/designer_base/src/com/fr/design/beans/location/MoveUtils.java @@ -78,7 +78,7 @@ public class MoveUtils { * 设置designer内部组件是否重叠的标志位 * @param isIntersects 是否重叠 */ - void setWidgetsIntersects(boolean isIntersects); + void setWidgetsIntersected(boolean isIntersects); /** * 获取designer内部组件是否重叠的标志位 @@ -358,10 +358,10 @@ public class MoveUtils { if(designer.getDesignerLocationOnScreen() != null) { displayForbidWindow(x + designer.getDesignerLocationOnScreen().x, y + designer.getDesignerLocationOnScreen().y); } - designer.setWidgetsIntersects(true); + designer.setWidgetsIntersected(true); } else{ - designer.setWidgetsIntersects(false); + designer.setWidgetsIntersected(false); hideForbidWindow(); } } diff --git a/designer_form/src/com/fr/design/designer/beans/location/Inner.java b/designer_form/src/com/fr/design/designer/beans/location/Inner.java index d400a064ca..4f475adf09 100644 --- a/designer_form/src/com/fr/design/designer/beans/location/Inner.java +++ b/designer_form/src/com/fr/design/designer/beans/location/Inner.java @@ -89,7 +89,7 @@ public class Inner extends AccessDirection { * @param isIntersects 是否重叠 */ @Override - public void setWidgetsIntersects(boolean isIntersects) { + public void setWidgetsIntersected(boolean isIntersects) { designer.setWidgetsIntersect(isIntersects); } diff --git a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java index 23242e399e..33736ac0a0 100644 --- a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java @@ -33,6 +33,8 @@ import java.util.Set; */ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPropertyPane { + private static final String PARA = "para"; + private static final String BODY = "body"; private WidgetPropertyTable propertyTable; // 控件的属性表 private EventPropertyTable eventTable; // 控件的事件表 private List widgetPropertyTables; // 这个变量应该是保存控件拓展的属性tab @@ -46,8 +48,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper private JPanel centerPane; // 此centerPane采用的是cardLayout布局,装载着mobileWidgetTable和mobileBodyWidgetTable private CardLayout cardLayout; // 卡片布局,选中参数面板时显示mobileWidgetTable,选中body时显示mobileBodyWidgetTable private JTableHeader header;//把表头单独get出来作为一个组件 - private static final String PARA = "para"; - private static final String BODY = "body"; public static WidgetPropertyPane getInstance() { if (HOLDER.singleton == null) { From 1b93011d988b18c6878a3373e56f4582b83ae2d6 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 20 Feb 2017 14:44:50 +0800 Subject: [PATCH 090/127] =?UTF-8?q?REPORT-1178=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E2=80=94=E2=80=9411/23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/widget/ui/FieldEditorDefinePane.java | 4 ++-- 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 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java index 34c355f511..bb3565c82c 100644 --- a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java @@ -20,7 +20,7 @@ import com.fr.form.ui.FieldEditor; import com.fr.general.Inter; public abstract class FieldEditorDefinePane extends AbstractDataModify { - private static final int ALLOW_BLANK_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("FR-Designer_Allow_Blank") + 30; + private static final int ALLOW_BLANK_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("FR-Designer_Allow_Null") + 30; private static final int ALLOW_BLANK_CHECK_BOX_HEIGHT = 30; private UICheckBox allowBlankCheckBox; // richer:错误信息,是所有控件共有的属性,所以放到这里来 @@ -39,7 +39,7 @@ public abstract class FieldEditorDefinePane extends Abstr initRegErrorMsgTextField(); //JPanel firstPanel = FRGUIPaneFactory.createBorderLayout_M_Pane(); - allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Blank")); + allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Null")); allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT)); allowBlankCheckBox.addItemListener(new ItemListener() { diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index ab71e8be89..4077af5206 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -534,7 +534,7 @@ FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=Version FR-Designer_About_CopyRight=Copy Right FR-Designer_Service_Phone=Service Phone -FR-Designer_Allow_Blank=Allow Blank +FR-Designer_Allow_Null=Allow null FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property 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 24c7a87c7a..ff68a3afc4 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 @@ -534,7 +534,7 @@ FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in FR-Designer_About_Version=Version FR-Designer_About_CopyRight=Copy Right FR-Designer_Service_Phone=Service Phone -FR-Designer_Allow_Blank=Allow Null +FR-Designer_Allow_Null=Allow null FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property 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 84559cf36e..a780c302c7 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 @@ -513,7 +513,7 @@ FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=\u30D0\u30FC\u30B8\u30E7\u30F3 FR-Designer_About_CopyRight=\u8457\u4F5C\u6A29\u6240\u6709 FR-Designer_Service_Phone=\u30B5\u30FC\u30D3\u30B9\u96FB\u8A71\uFF1A -FR-Designer_Allow_Blank=\u7A7A\u6B04\u3042\u308A +FR-Designer_Allow_Null=\u7A7A\u6B04\u3042\u308A FR-Designer_PageSetup_Page=\u30DA\u30FC\u30B8 FR-Designer_Custom_Job_Description=\u8A18\u8FF0 FR-Designer_Property=\u5C5E\u6027 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 f80d8ab0b8..0f18d5ba4b 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 @@ -508,7 +508,7 @@ FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=\uBC84\uC804 FR-Designer_About_CopyRight=\uD310\uAD8C\uC18C\uC720 FR-Designer_Service_Phone=\uC11C\uBE44\uC2A4\uC804\uD654\uFF1A -FR-Designer_Allow_Blank=\uBE48\uCE78\uD5C8\uC6A9 +FR-Designer_Allow_Null=\uBE48\uCE78\uD5C8\uC6A9 FR-Designer_PageSetup_Page=\uC6F9\uD398\uC774\uC9C0 FR-Designer_Custom_Job_Description=\uC124\uBA85 FR-Designer_Property=\uC18D\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 f448c6f623..2d28fd796e 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 @@ -538,7 +538,7 @@ FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u6 FR-Designer_About_Version=\u7248\u672C FR-Designer_About_CopyRight=\u7248\u6743\u6240\u6709 FR-Designer_Service_Phone=\u670D\u52A1\u7535\u8BDD\uFF1A -FR-Designer_Allow_Blank=\u5141\u8BB8\u4E3A\u7A7A +FR-Designer_Allow_Null=\u5141\u8BB8\u4E3A\u7A7A FR-Designer_PageSetup_Page=\u9875\u9762 FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C5E\u6027 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 0b150c205b..9312cbadfe 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 @@ -526,7 +526,7 @@ FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=\u7248\u672C FR-Designer_About_CopyRight=\u7248\u6B0A\u6240\u6709 FR-Designer_Service_Phone=\u670D\u52D9\u96FB\u8A71\uFF1A -FR-Designer_Allow_Blank=\u5141\u8A31\u70BA\u7A7A\u767D +FR-Designer_Allow_Null=\u5141\u8A31\u70BA\u7A7A\u767D FR-Designer_PageSetup_Page=\u9801\u9762 FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C6C\u6027 From 5cd24d91f81d1b6984382605c318d71de3ca3177 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 20 Feb 2017 16:32:52 +0800 Subject: [PATCH 091/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E3=80=82=E4=BF=AE=E5=A4=8DWindows=E4=B8=8B=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=99=A8=E6=97=A0=E6=B3=95=E6=89=93=E5=BC=80?= =?UTF-8?q?=E7=9A=84=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/formula/FunctionManagerPane.java | 10 +++++++++- .../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 +- 7 files changed, 15 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/formula/FunctionManagerPane.java b/designer_base/src/com/fr/design/formula/FunctionManagerPane.java index eb75dabe1c..844deb959d 100644 --- a/designer_base/src/com/fr/design/formula/FunctionManagerPane.java +++ b/designer_base/src/com/fr/design/formula/FunctionManagerPane.java @@ -159,7 +159,11 @@ public class FunctionManagerPane extends BasicPane { descriptionArea.setWrapStyleWord(true); descriptionArea.setLineWrap(true); northPane.add(descriptionArea); - descriptionArea.setText(Inter.getLocText("FR-Designer_Function_Description_Area_Text", File.separator, File.separator, FRContext.getCurrentEnv().getPath() + File.separator)); + + String path1 = getEscapePath(File.separator + "WEB-INF" + File.separator + "classes"); + String path2 = getEscapePath(FRContext.getCurrentEnv().getPath() + File.separator + "classes"); + descriptionArea.setText(Inter.getLocText("FR-Designer_Function_Description_Area_Text", path1, path2)); + JPanel descriptionPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); //Description Pane this.add(descriptionPane, BorderLayout.SOUTH); descriptionPane.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); @@ -167,6 +171,10 @@ public class FunctionManagerPane extends BasicPane { this.descriptionTextArea = new UITextArea(6, 24); descriptionPane.add(new JScrollPane(this.descriptionTextArea), BorderLayout.CENTER); } + + private String getEscapePath(String path) { + return path.replace("\\", "\\\\"); + } private ActionListener createEditorButtonActionListener() { return new ActionListener() { diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 4077af5206..feea088a89 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -540,7 +540,7 @@ FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name FR-Designer_Polyblock_Edit=Polyblock Edit -FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes} +FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R2}} FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Vertical=Vertical FR-Designer_Gradient_Direction=Gradient Direction 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 8f5c3549e6..c0204008de 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 @@ -540,7 +540,7 @@ FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name FR-Designer_Polyblock_Edit=Aggregation block edition -FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes +FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R2} FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Vertical=Vertical FR-Designer_Gradient_Direction=Gradient Direction 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 a780c302c7..0ef9ce10ca 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 @@ -519,7 +519,7 @@ FR-Designer_Custom_Job_Description=\u8A18\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u985E\u540D FR-Designer_Polyblock_Edit=\u30A2\u30B0\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30D6\u30ED\u30C3\u30AF\u7DE8\u96C6 -FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}WEB-INF{R2}classes" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R3}classes +FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R2} FR-Designer_PageSetup_Horizontal=\u6A2A\u65B9\u5411 FR-Designer_PageSetup_Vertical=\u7E26\u65B9\u5411 FR-Designer_Gradient_Direction=\u65B9\u5411\u3092\u5F90\u3005\u306B\u5909\u5316 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 0f18d5ba4b..5bc3966dc3 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 @@ -514,7 +514,7 @@ FR-Designer_Custom_Job_Description=\uC124\uBA85 FR-Designer_Property=\uC18D\uC131 FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 FR-Designer_Polyblock_Edit=\uCDE8\uD569\uBE14\uB7ED\uD3B8\uC9D1 -FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}WEB-INF{R2}classes" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R3}classes +FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R2} FR-Designer_PageSetup_Horizontal=\uAC00\uB85C FR-Designer_PageSetup_Vertical=\uC138\uB85C FR-Designer_Gradient_Direction=\uADF8\uB77C\uB370\uC774\uC158 \uBC29\uD5A5 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 2d28fd796e..669c1ea1ff 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 @@ -544,7 +544,7 @@ FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u7C7B\u540D FR-Designer_Polyblock_Edit=\u805A\u5408\u5757\u7F16\u8F91 -FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes +FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R2} FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Vertical=\u7EB5\u5411 FR-Designer_Gradient_Direction=\u6E10\u53D8\u65B9\u5411 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 9312cbadfe..43ca7268d0 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 @@ -532,7 +532,7 @@ FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C6C\u6027 FR-Designer_ClassName=\u985E\u540D FR-Designer_Polyblock_Edit=\u805A\u5408\u584A\u7DE8\u8F2F -FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes +FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R2} FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Vertical=\u7E31\u5411 FR-Designer_Gradient_Direction=\u6F38\u8B8A\u65B9\u5411 From 941ae3463c9fbb55d8bad845ef79986f9e93c8e4 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 20 Feb 2017 19:32:05 +0800 Subject: [PATCH 092/127] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/formula/FunctionManagerPane.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer_base/src/com/fr/design/formula/FunctionManagerPane.java b/designer_base/src/com/fr/design/formula/FunctionManagerPane.java index 844deb959d..001bd56264 100644 --- a/designer_base/src/com/fr/design/formula/FunctionManagerPane.java +++ b/designer_base/src/com/fr/design/formula/FunctionManagerPane.java @@ -20,6 +20,7 @@ import com.fr.file.FunctionManagerProvider; import com.fr.general.Inter; import com.fr.general.NameObject; import com.fr.stable.Nameable; +import com.fr.stable.ProductConstants; import com.fr.stable.project.ProjectConstants; import com.fr.stable.script.FunctionDef; @@ -160,8 +161,8 @@ public class FunctionManagerPane extends BasicPane { descriptionArea.setLineWrap(true); northPane.add(descriptionArea); - String path1 = getEscapePath(File.separator + "WEB-INF" + File.separator + "classes"); - String path2 = getEscapePath(FRContext.getCurrentEnv().getPath() + File.separator + "classes"); + String path1 = getEscapePath(File.separator + ProjectConstants.WEBINF_NAME + File.separator + ProjectConstants.CLASSES_NAME); + String path2 = getEscapePath(FRContext.getCurrentEnv().getPath() + File.separator + ProjectConstants.CLASSES_NAME); descriptionArea.setText(Inter.getLocText("FR-Designer_Function_Description_Area_Text", path1, path2)); JPanel descriptionPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); //Description Pane From ba719cab5edcfb234825a2ba11b119c9b3d3f3ba Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 20 Feb 2017 19:52:21 +0800 Subject: [PATCH 093/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=20designer=E6=89=93=E5=8C=85=E7=94=A81.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/build.dev.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/build.dev.gradle b/designer_form/build.dev.gradle index 20dc49a335..ae16b033e3 100644 --- a/designer_form/build.dev.gradle +++ b/designer_form/build.dev.gradle @@ -4,7 +4,7 @@ tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } //指定构建的jdk版本 -sourceCompatibility=1.8 +sourceCompatibility=1.7 //指定生成的jar包版本 version='8.0' From f9e6d148c7b8bda391bb54dbbcaedc01eb0bb084 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Tue, 21 Feb 2017 14:53:05 +0800 Subject: [PATCH 094/127] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=B0=8F=E9=94=99=E8=AF=AF=EF=BC=8CWLayout->WSortLayout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/MobileParaWidgetTable.java | 2 +- .../design/mainframe/MobileWidgetTable.java | 22 ++++++------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java index 67f47f951a..a39d3d94a3 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java @@ -245,7 +245,7 @@ class MobileParaWidgetTable extends JTable { } WParameterLayout para = (WParameterLayout) (paraContainer.toData()); - return para.getWidgetNameTag(); // TODO 从这个函数开始看,可以看到后台如何决定拖动后的控件顺序的 + return para.getWidgetNameTag(); } /** diff --git a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java index bb7ba99187..5044b4f8d1 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java @@ -3,7 +3,7 @@ package com.fr.design.mainframe; import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.util.ArrayList; +import java.util.List; import javax.swing.BorderFactory; import javax.swing.JLabel; @@ -14,11 +14,8 @@ import javax.swing.table.*; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itable.GroupRenderer; -import com.fr.design.gui.itable.HeaderRenderer; import com.fr.form.ui.Widget; import com.fr.form.ui.container.*; -import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; -import com.fr.form.ui.container.cardlayout.WCardTitleLayout; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.stable.StringUtils; @@ -67,6 +64,9 @@ public class MobileWidgetTable extends JTable { add(moveComponent); } + /** + * 设置表格属性 + */ private void setTableProperties() { JTableHeader header = getTableHeader(); header.setReorderingAllowed(false); @@ -112,7 +112,7 @@ public class MobileWidgetTable extends JTable { moveComponent.setVisible(false); int toIndex = e.getY() < GAP ? 0 : (int)Math.rint((e.getY() - GAP)/WIDGET_TABLE_ROW_HEIGHT) + 1; //当鼠标放开时,将选中的容器调整至新的顺序 - ((WLayout)designer.getSelectionModel().getSelection().getSelectedCreator().toData()).adjustOrder(selectedRow - 1, toIndex - 1); + ((WSortLayout)designer.getSelectionModel().getSelection().getSelectedCreator().toData()).adjustOrder(selectedRow - 1, toIndex - 1); //拿取排序后表格数据,然后重绘表格 getInstance().refreshData(); getInstance().repaint(); @@ -261,16 +261,8 @@ public class MobileWidgetTable extends JTable { } // 选择的控件有两种类型,一种是WLayout,代表容器,一种是Widget,代表控件 - if (selectedModel.acceptType(WLayout.class)) { - //WCardLayout里面并不是控件,而仍然是容器TabFitLayout,故要向下获取控件 - //WCardTitlelLayout是XWCardLayout的标题容器,里面同样不是控件,不能获取MobileList - //WTitleLayout是标题容器,比如图表的标题,里面是图表控件和Label标题控件,但是不需要获取MobileList - if (selectedModel.acceptType(WCardLayout.class) || selectedModel.acceptType(WCardTitleLayout.class)) { - if (selectedModel.acceptType(WTitleLayout.class) || selectedModel.acceptType(WCardMainBorderLayout.class)) { - return new String[0][0]; - } - } - ArrayList strings = ((WLayout)selectedModel).getMobileWidgetList(); + if (selectedModel.acceptType(WSortLayout.class)) { + List strings = ((WSortLayout)selectedModel).getMobileWidgetList(); String[][] widgetName = new String[strings.size() + 1][1]; widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); for (int i = 0; i < strings.size(); i++) { From 8ec71ac73598f1e90ae55bec10a1965901254078 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Tue, 21 Feb 2017 14:55:50 +0800 Subject: [PATCH 095/127] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/MobileWidgetTable.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java index 5044b4f8d1..7893ddf185 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java @@ -64,9 +64,6 @@ public class MobileWidgetTable extends JTable { add(moveComponent); } - /** - * 设置表格属性 - */ private void setTableProperties() { JTableHeader header = getTableHeader(); header.setReorderingAllowed(false); From 3ddef78aecfd87679785c06434f6f7b2f80f3420 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Tue, 21 Feb 2017 15:15:28 +0800 Subject: [PATCH 096/127] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/MobileWidgetTable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java index 7893ddf185..683d464558 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java @@ -259,7 +259,7 @@ public class MobileWidgetTable extends JTable { // 选择的控件有两种类型,一种是WLayout,代表容器,一种是Widget,代表控件 if (selectedModel.acceptType(WSortLayout.class)) { - List strings = ((WSortLayout)selectedModel).getMobileWidgetList(); + List strings = ((WSortLayout)selectedModel).getOrderedMobileWidgetList(); String[][] widgetName = new String[strings.size() + 1][1]; widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); for (int i = 0; i < strings.size(); i++) { From c7ad29b02f7fa10c4ee6422f11f8fb54adfbabef Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Tue, 21 Feb 2017 15:26:46 +0800 Subject: [PATCH 097/127] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/MobileWidgetTable.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java index 683d464558..e3c655c054 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java @@ -259,11 +259,11 @@ public class MobileWidgetTable extends JTable { // 选择的控件有两种类型,一种是WLayout,代表容器,一种是Widget,代表控件 if (selectedModel.acceptType(WSortLayout.class)) { - List strings = ((WSortLayout)selectedModel).getOrderedMobileWidgetList(); - String[][] widgetName = new String[strings.size() + 1][1]; + List mobileWidgetLists = ((WSortLayout)selectedModel).getOrderedMobileWidgetList(); + String[][] widgetName = new String[mobileWidgetLists.size() + 1][1]; widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); - for (int i = 0; i < strings.size(); i++) { - widgetName[i + 1][0] = strings.get(i); + for (int i = 0; i < mobileWidgetLists.size(); i++) { + widgetName[i + 1][0] = mobileWidgetLists.get(i); } return widgetName; } else { From 53f31b794e9832b914ba2f6373de8991c323b7ae Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Tue, 21 Feb 2017 15:27:39 +0800 Subject: [PATCH 098/127] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/mainframe/MobileWidgetTable.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java index e3c655c054..f79eca1a92 100644 --- a/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java +++ b/designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java @@ -259,11 +259,11 @@ public class MobileWidgetTable extends JTable { // 选择的控件有两种类型,一种是WLayout,代表容器,一种是Widget,代表控件 if (selectedModel.acceptType(WSortLayout.class)) { - List mobileWidgetLists = ((WSortLayout)selectedModel).getOrderedMobileWidgetList(); - String[][] widgetName = new String[mobileWidgetLists.size() + 1][1]; + List mobileWidgetList = ((WSortLayout)selectedModel).getOrderedMobileWidgetList(); + String[][] widgetName = new String[mobileWidgetList.size() + 1][1]; widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); - for (int i = 0; i < mobileWidgetLists.size(); i++) { - widgetName[i + 1][0] = mobileWidgetLists.get(i); + for (int i = 0; i < mobileWidgetList.size(); i++) { + widgetName[i + 1][0] = mobileWidgetList.get(i); } return widgetName; } else { From 23b20520b8171d1ccae70c5fd7bb931f7bc6b6dc Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 21 Feb 2017 17:06:19 +0800 Subject: [PATCH 099/127] =?UTF-8?q?report-1343=20ftp=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=BC=8F=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/controlpane/JListControlPane.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java index dd91b7824b..52802921a7 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java @@ -109,6 +109,10 @@ public abstract class JListControlPane extends JControlPane { } + protected void doBeforePopulate(ListModelElement el, Object obj) { + + } + @Override protected ShortCut4JControlPane addItemShortCut() { ShortCut addItemShortCut; @@ -832,6 +836,7 @@ public abstract class JListControlPane extends JControlPane { cardPane.add(updatePanes[i], String.valueOf(i)); } card.show(cardPane, String.valueOf(i)); + doBeforePopulate(el, ob2Populate); updatePanes[i].populateBean(ob2Populate); doWhenPopulate(updatePanes[i]); break; From 8691ee6d2f0d3a93179936fe1a4341bb322b2a14 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Wed, 22 Feb 2017 10:02:25 +0800 Subject: [PATCH 100/127] =?UTF-8?q?=E5=85=B6=E4=BB=96=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/DesignerFrameFileDealerPane.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index 9355a33486..352fc15641 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -29,6 +29,7 @@ import com.fr.file.filetree.FileNode; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; import com.fr.general.Inter; +import com.fr.plugin.proxy.PluginProxyCompatibleUtils; import com.fr.stable.CoreConstants; import com.fr.stable.StableUtils; import com.fr.stable.project.ProjectConstants; @@ -131,6 +132,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt } toolbarDef.addShortCut(delFileAction); Set extraShortCuts = ExtraDesignClassManager.getInstance().getArray(ShortCut.TEMPLATE_TREE); + extraShortCuts = PluginProxyCompatibleUtils.toOriObjectHashSet(extraShortCuts); for (ShortCut shortCut : extraShortCuts){ toolbarDef.addShortCut(shortCut); } From 19b23f813e2fe6409f5784844da3a1436d9d3099 Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 22 Feb 2017 17:04:16 +0800 Subject: [PATCH 101/127] ct --- .../fr/design/write/submit/CustomJobPane.java | 2 +- .../creator/cardlayout/XCardAddButton.java | 14 ++-- .../creator/cardlayout/XCardSwitchButton.java | 80 ++++++++++++------- .../creator/cardlayout/XWCardLayout.java | 38 +++++++-- .../creator/cardlayout/XWTabFitLayout.java | 12 ++- 5 files changed, 101 insertions(+), 45 deletions(-) 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 d986a8beee..d9368d87dd 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("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 +package com.fr.design.write.submit; import com.fr.base.GraphHelper; 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")); browserButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("FR-Designer_Select") + 20, classNameTextField.getPreferredSize().height)); UIButton editButton = new UIButton(Inter.getLocText("FR-Designer_Edit")); editButton.setPreferredSize(new Dimension( GraphHelper.getLocTextWidth("FR-Designer_Edit") + 20, 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"), null)); this.add(reportletNamePane, BorderLayout.NORTH); objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-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.SubmitJob"); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dsPane.add(area); dsPane.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText("FR-Designer_Custom_Job_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 diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java index caf259f3e2..85e26e877c 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardAddButton.java @@ -33,6 +33,7 @@ public class XCardAddButton extends XButton{ private static final int INDEX = 0; private static final int DEFAULT_BUTTON_WIDTH = 80; + private static Icon ADD_ICON = BaseUtils.readIcon("/com/fr/design/form/images/add.png"); private Icon addIcon = ADD_ICON; @@ -88,12 +89,12 @@ public class XCardAddButton extends XButton{ // addbutton对应的XWCardLayout和XWCardTagLayout暂未存入到xml中,重新打开之后先根据父子层获取 if(cardLayout == null && tagLayout ==null ){ - initRalateLayout(); + initRelateLayout(); } int index = cardLayout.toData().getWidgetCount(); //添加新的tab,并将原来的设为未选中状态 - setTabUnselectd(); + setTabUnselected(); addTab(index); this.tagLayout.adjustComponentWidth(); @@ -109,7 +110,7 @@ public class XCardAddButton extends XButton{ LayoutUtils.layoutRootContainer(designer.getRootComponent()); } - private void initRalateLayout(){ + private void initRelateLayout(){ XWCardTitleLayout titleLayout = (XWCardTitleLayout)this.getBackupParent(); this.tagLayout = titleLayout.getTagPart(); @@ -128,7 +129,7 @@ public class XCardAddButton extends XButton{ } //将原来的tab页设置为未选中状态 - private void setTabUnselectd(){ + private void setTabUnselected(){ for(int i=0;i Date: Wed, 22 Feb 2017 17:05:32 +0800 Subject: [PATCH 102/127] ct --- .../com/fr/design/locale/designer.properties | 55 ++++---- .../design/locale/designer_en_US.properties | 126 +++++++++-------- .../design/locale/designer_ja_JP.properties | 130 +++++++++--------- .../design/locale/designer_ko_KR.properties | 45 +++--- .../design/locale/designer_zh_CN.properties | 48 ++++--- .../design/locale/designer_zh_TW.properties | 94 +++++++------ .../mainframe/toolbar/ToolBarMenuDock.java | 10 +- 7 files changed, 254 insertions(+), 254 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 28d261ed24..268f5d53d7 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates= FR-Designer_File= FR-Designer_Filter_Conditions= FR-Designer_Finish-Modify-Share= -FR-Designer_Fit-App= +FR-Designer_Fit= FR-Designer_Font-Family= FR-Designer_Font-Size= FR-Designer_Forbid_Drag_into_Adapt_Pane=Forbid Drag into Para Pane @@ -357,7 +357,6 @@ FR-Designer_KeyPoint=KeyPoint FR-Designer_loadedTreeModel=loadedTreeModel FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\: FR-Designer-Plugin_Please_Update_Jar= -FR-Designer-Invalid_Page_Number=Invalid Page Number FR-Designer_XMLA_Database=Database FR-Designer_XMLA_UserName=User name FR-Designer_XMLA_Password=Password @@ -488,10 +487,6 @@ FR-Designer-LayerPageReport_PageQuery= FR-Designer-LayerPageReport_Define_PageQuerySQL= FR-Designer_Event= FR-Designer_Properties= -FR-Designer_Permissions_Edition=Permissions Edition -FR-Designer_Export_Excel_Page=Page -FR-Designer_Export_Excel_Simple=Simple -FR-Designer_Export_Excel_PageToSheet=Page To Sheet FR-Designer_Export_failed=Export failed FR-Designer_Exported_successfully=Exported successfully FR-Designer_Exporting=Exporting @@ -510,27 +505,11 @@ FR-Designer_JavaScript_Set= FR-Designer_Attribute= FR-Designer_Form_Editing_Listeners= FR-Designer_Form_Basic_Properties= -FR-Designer_DS_Dictionary= -FR-Designer_Create_Tree= +FR-Designer_DS_Dictionary=Data Dictionary +FR-Designer_Create_Tree=Build 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 -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -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 - FR-Designer_LayoutTable_Column_Width=160 FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited FR-Designer_Unload_Check=Prompt users when leave without submitting @@ -538,17 +517,30 @@ FR-Designer_ReportColumns_Columns_Optional= FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Center_Display=Center FR-Designer_Left_Display=Left +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=Version FR-Designer_About_CopyRight=Copy Right FR-Designer_Service_Phone=Service Phone -FR-Designer_Allow_Blank=Allow Blank +FR-Designer_Allow_Null=Allow null FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name - FR-Designer_Polyblock_Edit=Polyblock Edit -FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes} +FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R2}} FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Vertical=Vertical FR-Designer_Gradient_Direction=Gradient Direction @@ -562,5 +554,12 @@ FR-Designer_Show_As_Download=Display the binary content using download link FR-Designer_File_Name_For_Download=File Name For Download FR-Designer_No=No FR-Designer_Pagination=Page Break +FR-Designer_Role=Role +FR-Designer-Move_Tab_First=move to first +FR-Designer-Move_Tab_End=move to end +FR-Designer-Move_Tab_Next=move to next +FR-Designer-Move_Tab_Prev=move to previous FR-Designer_DS_TableData=Data Set -FR-Designer_Parameter-Formula=Formula \ No newline at end of file +FR-Designer_Parameter-Formula=Formula +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. +FR-Designer_WidgetOrder=Widget Order 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 26d5bc85fe..b0bf16d5d7 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 @@ -73,8 +73,8 @@ FR-Designer_Button-Type=Button Type FR-Designer_CardLayout=TabLayout FR-Designer_Cell=cell FR-Designer_Chart_Cell=Chart Hyperlink-Link Cell -FR-Designer_Chart_Float=Chart Hyperlink-Floating Element -FR-Designer_Chart_Float_chart=Chart Hyperlink-Floating Chart +FR-Designer_Chart_Float=Chart Hyperlink-Floating Elements +FR-Designer_Chart_Float_chart=Chart Hyperlink-Floating-window Chart FR-Designer_Check-for-Updates=Check for Updates FR-Designer_Choose-Data-Confusion-Tip=\ Please Choose the field needed to be confused and then preview FR-Designer_Close=close @@ -100,7 +100,6 @@ FR-Designer_FS_Close_Other_Templates=Close other templates FR-Designer_File=file FR-Designer_Filter_Conditions=Filter condition FR-Designer_Finish-Modify-Share=Finish Modification And Share -FR-Designer_Fit-App=App self-adaption FR-Designer_Fit=self-adaption FR-Designer_Font-Family=Font name FR-Designer_Font-Size=Font size @@ -119,7 +118,7 @@ FR-Designer_Get-CubeGetting cube= FR-Designer_Help=Help FR-Designer_Hide=Hide FR-Designer_Hyperlink=Hyperlink -FR-Designer_Hyperlink-Form_link=Current dashboard object +FR-Designer_Hyperlink-Form_link=Current form object FR-Designer_IDCard=IDCard FR-Designer_Icon=Icon FR-Designer_Index=index @@ -127,7 +126,7 @@ FR-Designer_Input_Rule=Input Rule FR-Designer_Language_Default=Default FR-Designer_Layout=Layout FR-Designer_Layout-HBox=Horizontal Box Layout -FR-Designer_Layout-Index=Index +FR-Designer_Layout-Index=Layout Index FR-Designer_Layout_Constraints=Layout Constraints FR-Designer_Length=Length FR-Designer_Loading_Data=Loading Data @@ -174,12 +173,12 @@ FR-Designer_Search=Search FR-Designer_Set=Set FR-Designer_Share-Template=Share Template FR-Designer_Simple_general=Simple custom query -FR-Designer_Song_TypeFace=Song typeface +FR-Designer_Song_TypeFace=song typeface FR-Designer_Start-Date=Start Date FR-Designer_Subscript=Subscript FR-Designer_Superscript=Superscript FR-Designer_Support_QQ=Support online -FR-Designer_Swatch=Sample +FR-Designer_Swatch=Swatch FR-Designer_Tab_title=Tab title FR-Designer_TableData=Data set FR-Designer_Thank_guest=Special thanks to @@ -191,8 +190,8 @@ FR-Designer_Underline=Underline FR-Designer_Used=Recently Used FR-Designer_User-defined-MDX=Custom MDX query FR-Designer_SampleText=SampleText SampleText -FR-Designer_Vertical-LeftToRight=Vertical Text (left to right) -FR-Designer_Vertical-RightToLeft=Vertical Text (right to left) +FR-Designer_Vertical-LeftToRight=Vertical Text (Left to Right) +FR-Designer_Vertical-RightToLeft=Vertical Text (Right To Left) FR-Designer_VerticalBoxLayout=Vertical Box Layout FR-Designer_Visible=Visible FR-Designer_WLayout-Border-ToolTips=The complete border layout container\uFF0Cis composed of central, eastern, western, northern and southern parts. You can adjust the height of the northern and southern ones and the width of the eastern and western ones. @@ -359,7 +358,6 @@ FR-Designer_KeyPoint=KeyPoint FR-Designer_loadedTreeModel=loadedTreeModel FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\: FR-Designer-Plugin_Please_Update_Jar=Please Update Jar -FR-Designer-Invalid_Page_Number=Invalid Page Number FR-Designer_XMLA_Database=DB FR-Designer_XMLA_UserName=User name FR-Designer_XMLA_Password=Password @@ -415,12 +413,12 @@ FR-Designer_Unit_PT=Pound FR-Designer-Write_Auto_Stash=auto stash FR-Designer_Printer_Native_Button=Native Print FR-Designer_Event_ShowWidgets=Display widgets directly -FR-Designer_Current_Preview_Rows=Current Number of Preview Rows +FR-Designer_Current_Preview_Rows=Current Number of Preview Rows FR-Designer_Data=Data FR-Designer_Error=Error FR-Designer_formDesignerModule=Form Designer FR-Designer-Website_Url=http\://www.finereport.com/en -FR-Designer-BBSLogin_Download-Unlogin-Tip=Login to download +FR-Designer-BBSLogin_Download-Unlogin-Tip= FR-Designer-App_ReLayout=AppRelayout FR-Designer_Mobile-Attr=Mobile Attr FR-Designer_Mobile-Vertical=Vertical Screen @@ -434,42 +432,42 @@ FR-Designer_COMMUNITY_NEED=need FR-Designer_COMMUNITY_BUG=bug report FR-Designer_COMMUNITY_SIGN=sign FR-Designer_COMMUNITY_QUESTIONS=questions -FR-Designer_Mobile-Zoom=Zoom +FR-Designer_Mobile-Zoom=zoom FR-Designer_Mobile-Open=Open -FR-Designer_Mobile-Warning=Max height cannot exceed 80% of display area +FR-Designer_Mobile-Warning= FR-Designer_Button-OK=OK FR-Designer_Button-Cancel=Cancel FR-Designer_Write-Save-Formula=Preserve formula when fill FR-Designer_Export-Save-Formula=Preserve formula when export -FR-Designer_Form-Fit-Tip=Adaptive plug-in -FR-Designer_Form-Frozen-Tip=When use Frozen, suggest install -FR-Designer_Form-Forzen-Speed=, use bidirectional and horizontal adaption to improve the speed. -FR-Designer_Attention=Attention -FR-Designer_Forbid_Widgets_Intersects=Forbid component overlap +FR-Designer_Form-Fit-Tip=Fit Plugin +FR-Designer_Form-Frozen-Tip=When Use Form Frozen, Suggest Install +FR-Designer_Form-Forzen-Speed=To Speed UP. +FR-Designer_Attention=attention +FR-Designer_Forbid_Widgets_Intersects=Forbid Widgets Intersects FR-Designer_Widget_Scaling_Mode_Fit=Area-Fit FR-Designer_Widget_Scaling_Mode_Fixed=Area-Fixed -FR-Designer-Widget_Area_Scaling=Component area scaling -FR-Designer-Widget_Scaling_Mode=Scaling mode +FR-Designer-Widget_Area_Scaling=Widget Area Scaling +FR-Designer-Widget_Scaling_Mode=Widget Scaling Mode FR-Designer-QQLogin-Determine=Determine FR-Designer-QQLogin-Cancel=Cancel -FR-Designer-Reuse_Manager=Component management -FR-Designer_TableData-Default-Para=Default parameter -FR-Designer_Layout_Block_Absolute=Absolute layout block -FR-Designer_Layout_Block_Tab=Tab block -FR-Designer_Layout_Block_Blank=Blank block -FR-Designer_Attr_Layout=Layout -FR-Designer_Attr_Layout_Type=Layout type -FR-Designer_Attr_Bidirectional_Adaptive=Bidirectional adaptive -FR-Designer-Selected_Widget=Selected widget -FR-Designer_LocalWidget=Local component library -FR-Designer_AllCategories=All categories -FR-Designer_Download_Template=Download components -FR-Designer_Install_Template=Install components -FR-Designer_Delete_Template=Delete components -FR-Designer_Mobile-Refresh=Refresh -FR-Designer_Mobile-ToolBar=Toolbar +FR-Designer-Reuse_Manager=Reuse Manager +FR-Designer_TableData-Default-Para=Default Para +FR-Designer_Layout_Block_Absolute=Absolute Layout Block +FR-Designer_Layout_Block_Tab=TabLayout +FR-Designer_Layout_Block_Blank=Blank Block +FR-Designer_Attr_Layout=layout +FR-Designer_Attr_Layout_Type=layout type +FR-Designer_Attr_Bidirectional_Adaptive=Bidirectional Adaptive +FR-Designer-Selected_Widget=selected widget +FR-Designer_LocalWidget=local widget +FR-Designer_AllCategories=all categories +FR-Designer_Download_Template=download template +FR-Designer_Install_Template=install template +FR-Designer_Delete_Template=delete template +FR-Designer_Mobile-Refresh=refresh +FR-Designer_Mobile-ToolBar=toolbar FR-Designer_WLayout-Absolute-ToolTips=Freestyle layout, add control in any position of the layout -FR-Designer_Reset=Reset +FR-Designer_Reset=reset FR-Designer_Add_all=Add all FR-Designer_Language_Change_Successful=New language setting will be enabled when designer is restarted FR-Designer_Template_Web_Attributes=Web Attributes @@ -488,10 +486,6 @@ FR-Designer-DS-Database_Query=DB Query FR-Designer_Is_Share_DBTableData=Shared data set FR-Designer_Event=Event FR-Designer_Properties=Properties -FR-Designer_Permissions_Edition=Permissions Edition -FR-Designer_Export_Excel_Page=Page Break -FR-Designer_Export_Excel_Simple=Original -FR-Designer_Export_Excel_PageToSheet=One Page Per Sheet FR-Designer_Export_failed=Export failed FR-Designer_Exported_successfully=Exported successfully FR-Designer_Exporting=Exporting @@ -514,24 +508,8 @@ FR-Designer_Form_Basic_Properties=Basic Property FR-Designer_DS_Dictionary=Data Dictionary FR-Designer_Create_Tree=Build Tree FR-Designer_Set_Callback_Function=Set Callback Function -FR-Designer_ConfirmDialog_Content=Confirm to delete Tab Control -FR-Designer_ConfirmDialog_Title=FineReport 8.0 - -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 -FR-Designer_Tab_carousel=Tab carousel -FR-Designer_setCarousel=Start -FR-Designer_carouselInterval=Interval - -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 - +FR-Designer_ConfirmDialog_Content= +FR-Designer_ConfirmDialog_Title= FR-Designer_LayoutTable_Column_Width=250 FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited FR-Designer_Unload_Check=Prompt users when leave without submitting @@ -539,17 +517,30 @@ FR-Designer_ReportColumns_Columns_Optional=\u3000 FR-Designer_Row_Icon_File_Name=row_en.png FR-Designer_Center_Display=Center FR-Designer_Left_Display=Left +FR-Designer_Background_Null=No Background +FR-Designer_Background_Color=Color +FR-Designer_Background_Texture=Texture +FR-Designer_Background_Pattern=Pattern +FR-Designer_Background_Gradient_Color=Gradient Color +FR-Designer_Background_Image=Image +FR-Designer_Background_Clear=Clear +FR-Designer_Background_Image_Select=Select Picture +FR-Designer_Tab_carousel=tab carousel +FR-Designer_setCarousel=set carousel +FR-Designer_carouselInterval=interval +FR-Designer_Initial_Background_Tips=Initial background of the button +FR-Designer_Mouse_Move_Tips=Move the mouse to the button on the background, in the absence of not changing the background +FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background FR-Designer_About_Version=Version FR-Designer_About_CopyRight=Copy Right FR-Designer_Service_Phone=Service Phone -FR-Designer_Allow_Blank=Allow Null +FR-Designer_Allow_Null=Allow null FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name - FR-Designer_Polyblock_Edit=Aggregation block edition -FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes +FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R2} FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Vertical=Vertical FR-Designer_Gradient_Direction=Gradient Direction @@ -563,5 +554,12 @@ FR-Designer_Show_As_Download=Display the binary content using download link FR-Designer_File_Name_For_Download=File Name For Download FR-Designer_No=No FR-Designer_Pagination=Page Break +FR-Designer-Move_Tab_First=move to first +FR-Designer-Move_Tab_End=move to end +FR-Designer-Move_Tab_Next=move to next +FR-Designer-Move_Tab_Prev=move to previous +FR-Designer_Role=Role FR-Designer_DS_TableData=Data Set -FR-Designer_Parameter-Formula=Formula \ No newline at end of file +FR-Designer_Parameter-Formula=Formula +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. +FR-Designer_WidgetOrder=Widget Order 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 d86d0a164c..0ef9ce10ca 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 @@ -100,7 +100,6 @@ FR-Designer_FS_Close_Other_Templates=\u305D\u306E\u4ED6\u30C6\u30F3\u30D7\u30EC\ FR-Designer_File=\u30D5\u30A1\u30A4\u30EB FR-Designer_Filter_Conditions=\u9078\u5225\u6761\u4EF6 FR-Designer_Finish-Modify-Share=\u4FEE\u6B63\u3092\u5B8C\u4E86\u3057\u3066\u30B7\u30A7\u30A2 -FR-Designer_Fit-App=App\u81EA\u9069\u5FDC FR-Designer_Fit=\u81EA\u9069\u5FDC FR-Designer_Font-Family=\u30D5\u30A9\u30F3\u30C8\u540D\u79F0 FR-Designer_Font-Size=\u30D5\u30A9\u30F3\u30C8\u5927\u5C0F @@ -223,7 +222,7 @@ FR-Designer-StyleAlignment_Style_Indentation=\u30A4\u30F3\u30C7\u30F3\u30C8 FR-Designer-StyleAlignment_Style_Spacing=\u9593\u9694\u8DDD\u96E2 FR-Designer-StyleAlignment_Style_Alignment=\u63C3\u3048 FR-Designer-CommitTab_Submit=\u63D0\u51FA\u3059\u308B -FR-Designer-CommitTab_SureToDelete=\u524A\u9664\u3057\u307E\u3059\u304B +FR-Designer-CommitTab_SureToDelete=Sure to delete FR-Designer-CommitTab_Remove=\u524A\u9664 FR-Designer-Collect_Information_free=\u7121\u6599 FR-Designer-Collect_Information_Description=\u8A18\u8FF0 @@ -370,13 +369,13 @@ FR-Designer_LiteCondition_ConditionB-OR=\u30AA\u30A2(OR) FR-Designer_LiteCondition_Common_Condition=\u666E\u901A\u6761\u4EF6 FR-Designer_LiteCondition_Formula_Condition=\u516C\u5F0F\u6761\u4EF6 FR-Designer_LiteCondition_Define=\u5B9A\u7FA9 -FR-Designer_Select_All=\u5168\u9078\u629E +FR-Designer_Select_All= FR-Designer-Plugin_Expire_Dialog_Title=\u671F\u9650\u5207\u308C\u306E\u30D7\u30E9\u30B0\u30A4\u30F3 FR-Designer-Plugin_Expire_Dialog_Text=\u30D7\u30E9\u30B0\u30A4\u30F3\u306F\u3001\u8CFC\u5165\u3092\u3059\u308B\u305F\u3081\u306B\u5E06\u30BD\u30D5\u30C8\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30BB\u30F3\u30BF\u30FC\u3092\u884C\u304F\u3001\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u3066\u3044\u307E\u3059\u3002 FR-Designer-Plugin_Finerest_Addon=\u5E06\u8EDF\u5FDC\u7528\u30BB\u30F3\u30BF\u30FC FR-Designer_Performance_First=\u6027\u80FD\u512A\u5148 FR-Designer_Total_N_Grade=\u5168\u90E8\u3067\:${N}\u5C64 -FR-Designer_time(s)=\u56DE +FR-Designer_time(s)= FR-Designer_General=\u5E38\u7528 FR-Designer_Advanced=\u9AD8\u7D1A FR-Designer_Oracle=\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB @@ -408,10 +407,10 @@ FR-Designer_Current_Preview_Rows=\u73FE\u5728\u306E\u30D7\u30EC\u30D3\u30E5\u30F FR-Designer_Data=\u30C7\u30FC\u30BF FR-Designer_Error=\u30A8\u30E9\u30FC FR-Designer-Website_Url=http\://www.finereport.com/jp -FR-Designer_formDesignerModule=\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u30C7\u30B6\u30A4\u30CA\u30FC -FR-Designer-BBSLogin_Login-Title=BBS\u30ED\u30B0\u30A4\u30F3 -FR-Designer_Get-CubeGetting=cube\u53D6\u5F97 -FR-Designer-BBSLogin_Download-Unlogin-Tip=\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9 +FR-Designer_formDesignerModule= +FR-Designer-BBSLogin_Login-Title= +FR-Designer_Get-CubeGetting= +FR-Designer-BBSLogin_Download-Unlogin-Tip= FR-Designer-App_ReLayout=\u96FB\u8A71\u518D\u30EC\u30A4\u30A2\u30A6\u30C8 FR-Designer_Mobile-Attr=\u30E2\u30D0\u30A4\u30EB\u7AEF\u672B\u5C5E\u6027 FR-Designer_Mobile-Vertical=\u7E26 @@ -436,76 +435,60 @@ FR-Designer_Widget_Scaling_Mode_Fixed=\u56FA\u5B9A\u30B5\u30A4\u30BA FR-Designer-Widget_Area_Scaling=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30A8\u30EA\u30A2\ FR-Designer-QQLogin-Determine=\u6C7A\u5B9A\u3057\u307E\u3059 FR-Designer-QQLogin-Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB -FR-Designer-Reuse_Manager=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8 -FR-Designer_Layout_Block_Absolute=\u7D76\u5BFE\u30EC\u30A4\u30A2\u30A6\u30C8\u30D6\u30ED\u30C3\u30AF -FR-Designer_Layout_Block_Tab=Tab\u30D6\u30ED\u30C3\u30AF -FR-Designer_Layout_Block_Blank=\u7A7A\u767D\u30D6\u30ED\u30C3\u30AF -FR-Designer_Attr_Layout=\u30EC\u30A4\u30A2\u30A6\u30C8 -FR-Designer_Attr_Layout_Type=\u30EC\u30A4\u30A2\u30A6\u30C8\u65B9\u5F0F -FR-Designer_Attr_Bidirectional_Adaptive=\u53CC\u65B9\u5411\u81EA\u5DF1\u8ABF\u6574 -FR-Designer_Download_Template=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9 +FR-Designer-Reuse_Manager= +FR-Designer_Layout_Block_Absolute= +FR-Designer_Layout_Block_Tab= +FR-Designer_Layout_Block_Blank= +FR-Designer_Attr_Layout= +FR-Designer_Attr_Layout_Type= +FR-Designer_Attr_Bidirectional_Adaptive= +FR-Designer_Download_Template= FR-Designer-Widget_Scaling_Mode=\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u8AD6\u7406 -FR-Designer_Mobile-Refresh=\u66F4\u65B0 -FR-Designer_Mobile-ToolBar=\u30C4\u30FC\u30EB\u30D0\u30FC +FR-Designer_Mobile-Refresh= +FR-Designer_Mobile-ToolBar= FR-Designer_WLayout-Absolute-ToolTips=\u81EA\u7531\u5F0F\u914D\u7F6E\u3067\u3059\u3002\u914D\u7F6E\u5185\u306E\u4EFB\u610F\u306E\u4F4D\u7F6E\u306B\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8FFD\u52A0\u3059\u308B\u3053\u3068 FR-Designer_Add_all=\u3059\u3079\u3066\u8FFD\u52A0 -FR-Designer_Language_Change_Successful=\u65B0\u3057\u3044\u8A00\u8A9E\u306F\u518D\u8D77\u52D5\u5F8C\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002 -FR-Designer_Template_Web_Attributes=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30A6\u30A7\u30D6\u30D7\u30ED\u30D1\u30C6\u30A3 +FR-Designer_Language_Change_Successful= +FR-Designer_Template_Web_Attributes= FR-Designer_Basic=\u57FA\u672C FR-Designer_Printers(Server)=\u30D7\u30EA\u30F3\u30BF\u30FC(\u30B5\u30FC\u30D0) FR-Designer_Pagination_Setting=\u30DA\u30FC\u30B8\u5225\u30D7\u30EC\u30D3\u30E5\u30FC\u8A2D\u5B9A -FR-Designer_Write_Setting=\u66F8\u304D\u8FBC\u307F\u30DA\u30FC\u30B8\u8A2D\u5B9A +FR-Designer_Write_Setting=\u5831\u544A\u30DA\u30FC\u30B8\u8A2D\u5B9A FR-Designer_Data_Analysis_Settings=\u30C7\u30FC\u30BF\u5206\u6790\u8A2D\u5B9A FR-Designer_Browser_Background=\u30D6\u30E9\u30A6\u30B6\u80CC\u666F FR-Designer_Import_Css=Css\u5F15\u7528 FR-Designer_Import_JavaScript=JavaScript\u5F15\u7528 FR-Designer-Datasource-Param_DES=  "${abc}"\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3068\u3057\u3066\u5165\u529B\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3002abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u540D\u524D\u3067\u3059\u3002\u4F8B\u3048\u3070
 select * from table where id\=${abc}\u3002
 select * from table where id\='${abc}'\u3002(\u3082\u3057id\u306F\u6587\u5B57\u5217\u306A\u3089)\uFFFD FR-Designer-DS-Database_Query=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30AF\u30A8\u30EA\u30FC -FR-Designer-LayerPageReport_PageQuery=\u6539\u30DA\u30FC\u30B8\u691C\u7D22 -FR-Designer-LayerPageReport_Define_PageQuerySQL=\u6539\u30DA\u30FC\u30B8\u691C\u7D22sql\u3092\u66F8\u304F +FR-Designer-LayerPageReport_PageQuery=\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EA +FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EAsql FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8 -FR-Designer_Event=\u30A4\u30D9\u30F3\u30C8 -FR-Designer_Properties=\u30D7\u30ED\u30D1\u30C6\u30A3 -FR-Designer_Permissions_Edition=\u6A29\u9650\u7DE8\u96C6 -FR-Designer_Export_Excel_Page=\u6539\u30DA\u30FC\u30B8\u51FA\u529B -FR-Designer_Export_Excel_Simple=\u305D\u306E\u307E\u307E\u51FA\u529B -FR-Designer_Export_Excel_PageToSheet=\u6539\u30DA\u30FC\u30B8\uFF06\u30B7\u30FC\u30C8\u5206\u3051 +FR-Designer_Event=\ +FR-Designer_Properties=FR-Designer_Properties=\ +\ FR-Designer_Export_failed=\u5C0E\u51FA\u306B\u5931\u6557\u3057\u307E\u3057\u305F FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 -FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 -FR-Designer_Button_OK=\u78BA\u5B9A +FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8FR-Designer_Button_OK=FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Button_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB -FR-Designer_JavaScript=JavaScript -FR-Designer_JavaScript_Form_Submit=\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u66F8\u304D\u8FBC\u307F -FR-Designer_JavaScript_Commit_to_Database=DB\u306B\u66F8\u304D\u8FBC\u307F -FR-Designer_JavaScript_Custom=\u30AB\u30B9\u30BF\u30E0 -FR-Designer_RWA_Submit=\u66F8\u304D\u8FBC\u307F -FR-Designer_Event_Name=\u30A4\u30D9\u30F3\u30C8\u540D -FR-Designer_Event_Type=\u30A4\u30D9\u30F3\u30C8\u30BF\u30A4\u30D7 -FR-Designer_Event_Name_Type=\u30A4\u30D9\u30F3\u30C8\u540D\u3068\u30BF\u30A4\u30D7 -FR-Designer_JavaScript_Set=JS\u8A2D\u5B9A -FR-Designer_Attribute=\u30D7\u30ED\u30D1\u30C6\u30A3 -FR-Designer_Form_Editing_Listeners=\u30A4\u30D9\u30F3\u30C8\u7DE8\u96C6 -FR-Designer_Form_Basic_Properties=\u57FA\u672C\u30D7\u30ED\u30D1\u30C6\u30A3 -FR-Designer_DS_Dictionary=\u30C7\u30FC\u30BF\u8F9E\u66F8 -FR-Designer_Create_Tree=\u30C4\u30EA\u30FC\u69CB\u7BC9 -FR-Designer_Set_Callback_Function=\u30B3\u30FC\u30EB\u30D0\u30C3\u30AF\u95A2\u6570\u8A2D\u5B9A -FR-Designer_ConfirmDialog_Content=tab\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059\u304B -FR-Designer_ConfirmDialog_Title=FineReport 8.0 -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 -FR-Designer_Tab_carousel=tab\u30AB\u30EB\u30FC\u30BB\u30EB -FR-Designer_setCarousel=\u30AB\u30EB\u30FC\u30BB\u30EB\u30AA\u30F3 -FR-Designer_carouselInterval=\u30AB\u30EB\u30FC\u30BB\u30EB\u9593\u9694 -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 +\uFFFD +FR-Designer_JavaScript= +FR-Designer_JavaScript_Form_Submit= +FR-Designer_JavaScript_Commit_to_Database= +FR-Designer_JavaScript_Custom= +FR-Designer_RWA_Submit= +FR-Designer_Event_Name= +FR-Designer_Event_Type= +FR-Designer_Event_Name_Type= +FR-Designer_JavaScript_Set= +FR-Designer_Attribute= +FR-Designer_Form_Editing_Listeners= +FR-Designer_Form_Basic_Properties= +FR-Designer_DS_Dictionary= +FR-Designer_Create_Tree= +FR-Designer_Set_Callback_Function= +FR-Designer_ConfirmDialog_Content= +FR-Designer_ConfirmDialog_Title= FR-Designer_LayoutTable_Column_Width=160 FR-Designer_Set_BG_Of_Current_Row=\u5831\u544A\u30AB\u30EC\u30F3\u30C8\u7DE8\u96C6\u884C\u80CC\u666F\u8A2D\u5B9A FR-Designer_Unload_Check=\u63D0\u51FA\u305B\u305A\u306B\u30D2\u30F3\u30C8 @@ -513,17 +496,30 @@ FR-Designer_ReportColumns_Columns_Optional=\u6BB5\u7D44\u307F FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Center_Display=\u4E2D\u592E\u63C3\u3048\u8868\u793A FR-Designer_Left_Display=\u5DE6\u8868\u793A +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=\u30D0\u30FC\u30B8\u30E7\u30F3 FR-Designer_About_CopyRight=\u8457\u4F5C\u6A29\u6240\u6709 FR-Designer_Service_Phone=\u30B5\u30FC\u30D3\u30B9\u96FB\u8A71\uFF1A -FR-Designer_Allow_Blank=\u7A7A\u6B04\u3042\u308A +FR-Designer_Allow_Null=\u7A7A\u6B04\u3042\u308A FR-Designer_PageSetup_Page=\u30DA\u30FC\u30B8 FR-Designer_Custom_Job_Description=\u8A18\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u985E\u540D - FR-Designer_Polyblock_Edit=\u30A2\u30B0\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30D6\u30ED\u30C3\u30AF\u7DE8\u96C6 -FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}WEB-INF{R2}classes" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R3}classes +FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R2} FR-Designer_PageSetup_Horizontal=\u6A2A\u65B9\u5411 FR-Designer_PageSetup_Vertical=\u7E26\u65B9\u5411 FR-Designer_Gradient_Direction=\u65B9\u5411\u3092\u5F90\u3005\u306B\u5909\u5316 @@ -537,5 +533,11 @@ FR-Designer_Show_As_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30EA\u30F3\u3 FR-Designer_File_Name_For_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30D5\u30A1\u30A4\u30EB\u540D FR-Designer_No=\u3044\u3044\u3048 FR-Designer_Pagination=\u30DA\u30FC\u30B8\u30F3\u30B0 +FR-Designer-Move_Tab_First= +FR-Designer-Move_Tab_End= +FR-Designer-Move_Tab_Next= +FR-Designer-Move_Tab_Prev= +FR-Designer_Role= FR-Designer_DS_TableData=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9 FR-Designer_Parameter-Formula=\u6570\u5F0F +FR-Designer_Plugin_Should_Update_Please_Contact_Developer= 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 dfb5ec78ff..5bc3966dc3 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 @@ -100,7 +100,6 @@ FR-Designer_FS_Close_Other_Templates=\uAE30\uD0C0\uD15C\uD50C\uB9BF\uB2EB\uAE30 FR-Designer_File=\uD30C\uC77C FR-Designer_Filter_Conditions=\uD544\uD130\uC870\uAC74 FR-Designer_Finish-Modify-Share=\uC218\uC815\uC644\uB8CC\uBC0F\uACF5\uC720 -FR-Designer_Fit-App=App\uC790\uAE30\uC801\uC751 FR-Designer_Fit=\uC790\uAE30\uC801\uC751 FR-Designer_Font-Family=\uAE00\uAF34\uBA85\uCE6D FR-Designer_Font-Size=\uAE00\uAF34\uD06C\uAE30 @@ -461,10 +460,6 @@ FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720 FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30 FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql FR-Designer_Event= -FR-Designer_Permissions_Edition=\uAD8C\uD55C\uD3B8\uC9D1 -FR-Designer_Export_Excel_Page=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uC5B4\uB0B4\uBCF4\uB0B4\uAE30 -FR-Designer_Export_Excel_Simple=\uC6D0\uB798\uBAA8\uC2B5\uB0B4\uBCF4\uB0B4\uAE30 -FR-Designer_Export_Excel_PageToSheet=\uD398\uC774\uC9C0\uC640 Sheet\uB098\uB204\uC5B4\uB0B4\uBCF4\uB0B4\uAE30 FR-Designer_Properties=\uFFFD FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328 FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 @@ -489,19 +484,6 @@ 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 -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -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 FR-Designer_LayoutTable_Column_Width=160 FR-Designer_Set_BG_Of_Current_Row=\uAE30\uC785\uD604\uC7AC\uD3B8\uC9D1\uD589\uBC30\uACBD\uC124\uC815 FR-Designer_Unload_Check=\uBBF8\uC81C\uCD9C\uB098\uAC14\uC74C\uC54C\uB9BC @@ -509,18 +491,30 @@ FR-Designer_ReportColumns_Columns_Optional=\uC140\uB098\uB204\uAE30 FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Center_Display=\uAC00\uC6B4\uB370\uC815\uB82C\uBCF4\uC774\uAE30 FR-Designer_Left_Display=\uC67C\uCABD\uBCF4\uC774\uAE30 +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=\uBC84\uC804 FR-Designer_About_CopyRight=\uD310\uAD8C\uC18C\uC720 FR-Designer_Service_Phone=\uC11C\uBE44\uC2A4\uC804\uD654\uFF1A -FR-Designer_Allow_Blank=\uBE48\uCE78\uD5C8\uC6A9 +FR-Designer_Allow_Null=\uBE48\uCE78\uD5C8\uC6A9 FR-Designer_PageSetup_Page=\uC6F9\uD398\uC774\uC9C0 FR-Designer_Custom_Job_Description=\uC124\uBA85 FR-Designer_Property=\uC18D\uC131 FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 -FR-Designer_Template_Web_Attributes=\uD15C\uD50C\uB9BF \uC6F9 \uC18D\uC131 - FR-Designer_Polyblock_Edit=\uCDE8\uD569\uBE14\uB7ED\uD3B8\uC9D1 -FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}WEB-INF{R2}classes" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R3}classes +FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R2} FR-Designer_PageSetup_Horizontal=\uAC00\uB85C FR-Designer_PageSetup_Vertical=\uC138\uB85C FR-Designer_Gradient_Direction=\uADF8\uB77C\uB370\uC774\uC158 \uBC29\uD5A5 @@ -534,5 +528,12 @@ FR-Designer_Show_As_Download=\uB2E4\uC6B4\uB85C\uB4DC\uB9C1\uD06C\uB85C2\uC9C4\u FR-Designer_File_Name_For_Download=\uB2E4\uC6B4\uB85C\uB4DC\uD30C\uC77C\uBA85 FR-Designer_No=\uC544\uB2C8\uC624 FR-Designer_Pagination=\uD398\uC774\uC9C0\uB098\uB204\uAE30 +FR-Designer-Move_Tab_First= +FR-Designer-Move_Tab_End= +FR-Designer-Move_Tab_Next= +FR-Designer-Move_Tab_Prev= +FR-Designer_Role= FR-Designer_DS_TableData=\uB370\uC774\uD130\uC138\uD2B8 FR-Designer_Parameter-Formula=\uC218\uC2DD +FR-Designer_Plugin_Should_Update_Please_Contact_Developer= + 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 367884033e..c8ecd5befb 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 @@ -100,7 +100,6 @@ FR-Designer_FS_Close_Other_Templates=\u5173\u95ED\u5176\u4ED6\u6A21\u677F FR-Designer_File=\u6587\u4EF6 FR-Designer_Filter_Conditions=\u8FC7\u6EE4\u6761\u4EF6 FR-Designer_Finish-Modify-Share=\u5B8C\u6210\u4FEE\u6539\u5E76\u5206\u4EAB -FR-Designer_Fit-App=App\u81EA\u9002\u5E94 FR-Designer_Fit=\u81EA\u9002\u5E94 FR-Designer_Font-Family=\u5B57\u4F53\u540D\u79F0 FR-Designer_Font-Size=\u5B57\u4F53\u5927\u5C0F @@ -359,7 +358,6 @@ FR-Designer_KeyPoint=\u5173\u952E\u8282\u70B9 FR-Designer_loadedTreeModel=\u52A0\u8F7D\u5931\u8D25,\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5 FR-Designer-Failed_to_load_the_plugin=\u65E0\u6CD5\u52A0\u8F7D\u63D2\u4EF6\uFF0C\u8BF7\u66F4\u65B0\u63D2\u4EF6\uFF1A FR-Designer-Plugin_Please_Update_Jar=\u8BF7\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C -FR-Designer-Invalid_Page_Number=\u65E0\u6548\u9875\u7801 FR-Designer_Get-CubeGetting=\u83B7\u53D6cube FR-Designer_XMLA_Database=\u6570\u636E\u5E93 FR-Designer_XMLA_UserName=\u7528\u6237\u540D @@ -492,10 +490,6 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u4E49\u5206\u9875\u67E5\u FR-Designer_Is_Share_DBTableData=\u5171\u4EAB\u6570\u636E\u96C6 FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Properties=\u5C5E\u6027 -FR-Designer_Permissions_Edition=\u6743\u9650\u7F16\u8F91 -FR-Designer_Export_Excel_Page=\u5206\u9875\u5BFC\u51FA -FR-Designer_Export_Excel_Simple=\u539F\u6837\u5BFC\u51FA -FR-Designer_Export_Excel_PageToSheet=\u5206\u9875\u5206Sheet\u5BFC\u51FA FR-Designer_Export_failed=\u5BFC\u51FA\u5931\u8D25 FR-Designer_Exported_successfully=\u5BFC\u51FA\u6210\u529F FR-Designer_Exporting=\u6B63\u5728\u5BFC\u51FA @@ -520,22 +514,6 @@ 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 -FR-Designer_Tab_carousel=tab\u8F6E\u64AD -FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD -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 - FR-Designer_LayoutTable_Column_Width=160 FR-Designer_Set_BG_Of_Current_Row=\u586B\u62A5\u5F53\u524D\u7F16\u8F91\u884C\u80CC\u666F\u8BBE\u7F6E FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u79BB\u5F00\u63D0\u793A @@ -543,17 +521,30 @@ FR-Designer_ReportColumns_Columns_Optional=\u5206\u680F FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Center_Display=\u5C45\u4E2D\u5C55\u793A FR-Designer_Left_Display=\u5DE6\u5C55\u793A +FR-Designer_Background_Null=\u6CA1\u6709\u80CC\u666F +FR-Designer_Background_Color=\u989C\u8272 +FR-Designer_Background_Texture=\u7EB9\u7406 +FR-Designer_Background_Pattern=\u56FE\u6848 +FR-Designer_Background_Gradient_Color=\u6E10\u53D8\u8272 +FR-Designer_Background_Image=\u56FE\u7247 +FR-Designer_Background_Clear=\u6E05\u9664 +FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 +FR-Designer_Tab_carousel=tab\u8F6E\u64AD +FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD +FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694 +FR-Designer_Initial_Background_Tips=\u6309\u94AE\u7684\u521D\u59CB\u80CC\u666F +FR-Designer_Mouse_Move_Tips=\u9F20\u6807\u79FB\u52A8\u5230\u6309\u94AE\u4E0A\u7684\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F +FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F FR-Designer_About_Version=\u7248\u672C FR-Designer_About_CopyRight=\u7248\u6743\u6240\u6709 FR-Designer_Service_Phone=\u670D\u52A1\u7535\u8BDD\uFF1A -FR-Designer_Allow_Blank=\u5141\u8BB8\u4E3A\u7A7A +FR-Designer_Allow_Null=\u5141\u8BB8\u4E3A\u7A7A FR-Designer_PageSetup_Page=\u9875\u9762 FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u7C7B\u540D - FR-Designer_Polyblock_Edit=\u805A\u5408\u5757\u7F16\u8F91 -FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes +FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R2} FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Vertical=\u7EB5\u5411 FR-Designer_Gradient_Direction=\u6E10\u53D8\u65B9\u5411 @@ -567,5 +558,12 @@ FR-Designer_Show_As_Download=\u7528\u4E0B\u8F7D\u94FE\u63A5\u663E\u793A\u4E8C\u8 FR-Designer_File_Name_For_Download=\u4E0B\u8F7D\u6587\u4EF6\u540D FR-Designer_No=\u5426 FR-Designer_Pagination=\u5206\u9875 +FR-Designer-Move_Tab_First=\u79FB\u52A8\u5230\u9996\u4F4D +FR-Designer-Move_Tab_End=\u79FB\u52A8\u5230\u672B\u5C3E +FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8 +FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8 +FR-Designer_Role=\u89D2\u8272 FR-Designer_DS_TableData=\u6570\u636E\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6 +FR-Designer_WidgetOrder=\u63A7\u4EF6\u987A\u5E8F 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 95aba53fff..a31f317606 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 @@ -100,7 +100,6 @@ FR-Designer_FS_Close_Other_Templates=\u95DC\u9589\u5176\u4ED6\u7BC4\u672C FR-Designer_File=\u6A94\u6848 FR-Designer_Filter_Conditions=\u904E\u6FFE\u689D\u4EF6 FR-Designer_Finish-Modify-Share=\u5B8C\u6210\u4FEE\u6539\u4E26\u5206\u4EAB -FR-Designer_Fit-App=App\u81EA\u9069\u61C9 FR-Designer_Fit=\u81EA\u9069\u61C9 FR-Designer_Font-Family=\u5B57\u9AD4\u540D\u7A31 FR-Designer_Font-Size=\u5B57\u9AD4\u5927\u5C0F @@ -358,7 +357,6 @@ FR-Designer_KeyPoint=\u95DC\u9375\u7BC0\u9EDE FR-Designer_loadedTreeModel=\u52A0\u8F09\u5931\u6557,\u8ACB\u6AA2\u67E5\u5F8C\u91CD\u8A66 FR-Designer-Failed_to_load_the_plugin=\u7121\u6CD5\u52A0\u8F09\u63D2\u4EF6\uFF0C\u8ACB\u66F4\u65B0\u63D2\u4EF6\uFF1A FR-Designer-Plugin_Please_Update_Jar=\u8ACB\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C -FR-Designer-Invalid_Page_Number=\u7121\u6548\u9801\u78BC FR-Designer_Get-CubeGetting=\u7372\u53D6cube FR-Designer_XMLA_Database=\u8CC7\u6599\u5EAB FR-Designer_XMLA_UserName=\u5E33\u865F @@ -453,12 +451,12 @@ FR-Designer-QQLogin-Determine=\u78BA\u5B9A FR-Designer-QQLogin-Cancel=\u53D6\u6D88 FR-Designer-Reuse_Manager=\u7D44\u4EF6\u7BA1\u7406 FR-Designer_TableData-Default-Para=\u6578\u64DA\u96C6\u9ED8\u8A8D\u53C3\u6578 -FR-Designer_Layout_Block_Absolute=\u7D55\u5C0D\u756B\u5E03\u584A -FR-Designer_Layout_Block_Tab=Tab\u584A -FR-Designer_Layout_Block_Blank=\u7A7A\u767D\u584A -FR-Designer_Attr_Layout=\u4F48\u5C40 -FR-Designer_Attr_Layout_Type=\u4F48\u5C40\u65B9\u5F0F -FR-Designer_Attr_Bidirectional_Adaptive=\u96D9\u5411\u81EA\u9069\u61C9 +FR-Designer_Layout_Block_Absolute= +FR-Designer_Layout_Block_Tab= +FR-Designer_Layout_Block_Blank= +FR-Designer_Attr_Layout= +FR-Designer_Attr_Layout_Type= +FR-Designer_Attr_Bidirectional_Adaptive= FR-Designer_Mobile-Refresh=\u5237\u65B0 FR-Designer_Mobile-ToolBar=\u5DE5\u5177\u6B04 FR-Designer_WLayout-Absolute-ToolTips=\u81EA\u7531\u5F0F\u5E03\u5C40\uFF0C\u53EF\u4EE5\u5728\u5E03\u5C40\u5167\u4EFB\u610F\u4F4D\u7F6E\u65B0\u589E\u63A7\u5236\u9805 @@ -480,10 +478,6 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u5206\u9801\u67E5\u FR-Designer_Is_Share_DBTableData=\u662F\u5426\u5171\u4EAB\u8CC7\u6599\u96C6 FR-Designer_Properties=\u5C6C\u6027 FR-Designer_Event=\u4E8B\u4EF6 -FR-Designer_Permissions_Edition=\u6B0A\u9650\u7DE8\u8F2F -FR-Designer_Export_Excel_Page=\u5206\u9801\u532F\u51FA -FR-Designer_Export_Excel_Simple=\u539F\u6A23\u532F\u51FA -FR-Designer_Export_Excel_PageToSheet=\u5206\u9801\u5206Sheet\u532F\u51FA FR-Designer_Export_failed=\u532F\u51FA\u5931\u6557 FR-Designer_Exported_successfully=\u532F\u51FA\u6210\u529F FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA... @@ -491,39 +485,23 @@ FR-Designer_Export-PDF=PDF\u683C\u5F0F FR-Designer_Properties_Mobile=\u624B\u6A5F\u5C6C\u6027 FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Button_Cancel=\u53D6\u6D88 -FR-Designer_JavaScript=JavaScript\u8173\u672C -FR-Designer_JavaScript_Form_Submit=\u8868\u55AE\u63D0\u4EA4 -FR-Designer_JavaScript_Commit_to_Database=\u63D0\u4EA4\u5165\u5EAB -FR-Designer_JavaScript_Custom=\u81EA\u5B9A\u7FA9 -FR-Designer_RWA_Submit=\u63D0\u4EA4 -FR-Designer_Event_Name=\u4E8B\u4EF6\u540D -FR-Designer_Event_Type=\u4E8B\u4EF6\u985E\u578B -FR-Designer_Event_Name_Type=\u4E8B\u4EF6\u540D\u5B57\u548C\u985E\u578B -FR-Designer_JavaScript_Set=JS\u8A2D\u7F6E -FR-Designer_Attribute=\u5C6C\u6027 -FR-Designer_Form_Editing_Listeners=\u4E8B\u4EF6\u7DE8\u8F2F -FR-Designer_Form_Basic_Properties=\u57FA\u672C\u5C6C\u6027 -FR-Designer_DS_Dictionary=\u6578\u64DA\u5B57\u5178 -FR-Designer_Create_Tree=\u69CB\u5EFA\u6A39 -FR-Designer_Set_Callback_Function=\u8A2D\u7F6E\u56DE\u8ABF\u51FD\u6578 -FR-Designer_ConfirmDialog_Content=\u662F\u5426\u78BA\u5B9A\u522A\u9664TAB\u63A7\u4EF6 -FR-Designer_ConfirmDialog_Title=FineReport 8.0 - -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 -FR-Designer_Tab_carousel=Tab\u8F2A\u64AD -FR-Designer_setCarousel=\u958B\u555F\u8F2A\u64AD -FR-Designer_carouselInterval=\u8F2A\u64AD\u9593\u9694 - -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 - +FR-Designer_JavaScript= +FR-Designer_JavaScript_Form_Submit= +FR-Designer_JavaScript_Commit_to_Database= +FR-Designer_JavaScript_Custom= +FR-Designer_RWA_Submit= +FR-Designer_Event_Name= +FR-Designer_Event_Type= +FR-Designer_Event_Name_Type= +FR-Designer_JavaScript_Set= +FR-Designer_Attribute= +FR-Designer_Form_Editing_Listeners= +FR-Designer_Form_Basic_Properties= +FR-Designer_DS_Dictionary= +FR-Designer_Create_Tree= +FR-Designer_Set_Callback_Function= +FR-Designer_ConfirmDialog_Content= +FR-Designer_ConfirmDialog_Title= FR-Designer_LayoutTable_Column_Width=160 FR-Designer_Set_BG_Of_Current_Row=\u586B\u5831\u7576\u524D\u7DE8\u8F2F\u5217\u80CC\u666F\u8A2D\u5B9A FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u96E2\u958B\u63D0\u793A @@ -531,17 +509,30 @@ FR-Designer_ReportColumns_Columns_Optional=\u5831\u8868\u6B04\u4F4D FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Center_Display=\u7F6E\u4E2D\u986F\u793A FR-Designer_Left_Display=\u5DE6\u986F\u793A +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +FR-Designer_carouselInterval= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=\u7248\u672C FR-Designer_About_CopyRight=\u7248\u6B0A\u6240\u6709 FR-Designer_Service_Phone=\u670D\u52D9\u96FB\u8A71\uFF1A -FR-Designer_Allow_Blank=\u5141\u8A31\u70BA\u7A7A\u767D +FR-Designer_Allow_Null=\u5141\u8A31\u70BA\u7A7A\u767D FR-Designer_PageSetup_Page=\u9801\u9762 FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C6C\u6027 FR-Designer_ClassName=\u985E\u540D - FR-Designer_Polyblock_Edit=\u805A\u5408\u584A\u7DE8\u8F2F -FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes +FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R2} FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Vertical=\u7E31\u5411 FR-Designer_Gradient_Direction=\u6F38\u8B8A\u65B9\u5411 @@ -555,5 +546,12 @@ FR-Designer_Show_As_Download=\u7528\u4E0B\u8F09\u93C8\u63A5\u986F\u793A\u4E8C\u9 FR-Designer_File_Name_For_Download=\u4E0B\u8F09\u6A94\u6848\u540D FR-Designer_No=\u5426 FR-Designer_Pagination=\u5206\u9801 +FR-Designer-Move_Tab_First=\u79FB\u52D5\u5230\u9996\u4F4D +FR-Designer-Move_Tab_End=\u79FB\u52D5\u5230\u672B\u5C3E +FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5 +FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5 +FR-Designer_Role= FR-Designer_DS_TableData=\u8CC7\u6599\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u633F\u4EF6\u7248\u672C\u904E\u4F4E\uFF0C\u5B58\u5728API\u4E0D\u76F8\u5BB9\uFF0C\u8ACB\u806F\u7CFB\u958B\u767C\u8005\u965E\u7D1A\u633F\u4EF6 +FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index b0a9ba1669..7fcea5d1ec 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -148,7 +148,7 @@ public abstract class ToolBarMenuDock { public void addCommunityMenuDef(java.util.List menuList){ Locale locale = FRContext.getLocale(); - Locale [] locales = supportCommunityLocales(); + Locale [] locales =supportCommunityLocales(); for(int i = 0; i < locales.length; i++) { if(locale.equals(locales[i])){ menuList.add(createCommunityMenuDef()); @@ -161,7 +161,6 @@ public abstract class ToolBarMenuDock { return new Locale[]{ Locale.CHINA, Locale.TAIWAN, - Locale.US }; } @@ -313,6 +312,11 @@ public abstract class ToolBarMenuDock { public ShortCut[] createHelpShortCuts() { java.util.List shortCuts = new ArrayList(); shortCuts.add(new WebDemoAction()); + // 英文,把 video 和帮助文档放到 Help 下面 + if (FRContext.getLocale().equals(Locale.US)) { + shortCuts.add(new VideoAction()); + shortCuts.add(new TutorialAction()); + } shortCuts.add(SeparatorDef.DEFAULT); //shortCuts.add(new TutorialAction()); shortCuts.add(SeparatorDef.DEFAULT); @@ -397,7 +401,7 @@ public abstract class ToolBarMenuDock { return toolBar; } else { - return polyToolBar(Inter.getLocText(new String[]{"Polybolck", "Edit"})); + return polyToolBar(Inter.getLocText("FR-Designer_Polyblock_Edit")); } } From ff38b20cab6818c8563d2c721eccf6e28959c0c0 Mon Sep 17 00:00:00 2001 From: neil Date: Thu, 23 Feb 2017 10:16:35 +0800 Subject: [PATCH 103/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=20=E4=BF=AE=E5=A4=8D=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/locale/designer.properties | 55 ++++---- .../design/locale/designer_en_US.properties | 126 ++++++++--------- .../design/locale/designer_ja_JP.properties | 130 +++++++++--------- .../design/locale/designer_ko_KR.properties | 45 +++--- .../design/locale/designer_zh_CN.properties | 48 +++---- .../design/locale/designer_zh_TW.properties | 94 ++++++------- .../mainframe/toolbar/ToolBarMenuDock.java | 6 +- 7 files changed, 255 insertions(+), 249 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 268f5d53d7..28d261ed24 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates= FR-Designer_File= FR-Designer_Filter_Conditions= FR-Designer_Finish-Modify-Share= -FR-Designer_Fit= +FR-Designer_Fit-App= FR-Designer_Font-Family= FR-Designer_Font-Size= FR-Designer_Forbid_Drag_into_Adapt_Pane=Forbid Drag into Para Pane @@ -357,6 +357,7 @@ FR-Designer_KeyPoint=KeyPoint FR-Designer_loadedTreeModel=loadedTreeModel FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\: FR-Designer-Plugin_Please_Update_Jar= +FR-Designer-Invalid_Page_Number=Invalid Page Number FR-Designer_XMLA_Database=Database FR-Designer_XMLA_UserName=User name FR-Designer_XMLA_Password=Password @@ -487,6 +488,10 @@ FR-Designer-LayerPageReport_PageQuery= FR-Designer-LayerPageReport_Define_PageQuerySQL= FR-Designer_Event= FR-Designer_Properties= +FR-Designer_Permissions_Edition=Permissions Edition +FR-Designer_Export_Excel_Page=Page +FR-Designer_Export_Excel_Simple=Simple +FR-Designer_Export_Excel_PageToSheet=Page To Sheet FR-Designer_Export_failed=Export failed FR-Designer_Exported_successfully=Exported successfully FR-Designer_Exporting=Exporting @@ -505,11 +510,27 @@ FR-Designer_JavaScript_Set= FR-Designer_Attribute= FR-Designer_Form_Editing_Listeners= FR-Designer_Form_Basic_Properties= -FR-Designer_DS_Dictionary=Data Dictionary -FR-Designer_Create_Tree=Build Tree +FR-Designer_DS_Dictionary= +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 +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +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 + FR-Designer_LayoutTable_Column_Width=160 FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited FR-Designer_Unload_Check=Prompt users when leave without submitting @@ -517,30 +538,17 @@ FR-Designer_ReportColumns_Columns_Optional= FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Center_Display=Center FR-Designer_Left_Display=Left -FR-Designer_Background_Null= -FR-Designer_Background_Color= -FR-Designer_Background_Texture= -FR-Designer_Background_Pattern= -FR-Designer_Background_Gradient_Color= -FR-Designer_Background_Image= -FR-Designer_Background_Clear= -FR-Designer_Background_Image_Select= -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -FR-Designer_carouselInterval= -FR-Designer_Initial_Background_Tips= -FR-Designer_Mouse_Move_Tips= -FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=Version FR-Designer_About_CopyRight=Copy Right FR-Designer_Service_Phone=Service Phone -FR-Designer_Allow_Null=Allow null +FR-Designer_Allow_Blank=Allow Blank FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name + FR-Designer_Polyblock_Edit=Polyblock Edit -FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R2}} +FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes} FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Vertical=Vertical FR-Designer_Gradient_Direction=Gradient Direction @@ -554,12 +562,5 @@ FR-Designer_Show_As_Download=Display the binary content using download link FR-Designer_File_Name_For_Download=File Name For Download FR-Designer_No=No FR-Designer_Pagination=Page Break -FR-Designer_Role=Role -FR-Designer-Move_Tab_First=move to first -FR-Designer-Move_Tab_End=move to end -FR-Designer-Move_Tab_Next=move to next -FR-Designer-Move_Tab_Prev=move to previous FR-Designer_DS_TableData=Data Set -FR-Designer_Parameter-Formula=Formula -FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. -FR-Designer_WidgetOrder=Widget Order +FR-Designer_Parameter-Formula=Formula \ 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 b0bf16d5d7..26d5bc85fe 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 @@ -73,8 +73,8 @@ FR-Designer_Button-Type=Button Type FR-Designer_CardLayout=TabLayout FR-Designer_Cell=cell FR-Designer_Chart_Cell=Chart Hyperlink-Link Cell -FR-Designer_Chart_Float=Chart Hyperlink-Floating Elements -FR-Designer_Chart_Float_chart=Chart Hyperlink-Floating-window Chart +FR-Designer_Chart_Float=Chart Hyperlink-Floating Element +FR-Designer_Chart_Float_chart=Chart Hyperlink-Floating Chart FR-Designer_Check-for-Updates=Check for Updates FR-Designer_Choose-Data-Confusion-Tip=\ Please Choose the field needed to be confused and then preview FR-Designer_Close=close @@ -100,6 +100,7 @@ FR-Designer_FS_Close_Other_Templates=Close other templates FR-Designer_File=file FR-Designer_Filter_Conditions=Filter condition FR-Designer_Finish-Modify-Share=Finish Modification And Share +FR-Designer_Fit-App=App self-adaption FR-Designer_Fit=self-adaption FR-Designer_Font-Family=Font name FR-Designer_Font-Size=Font size @@ -118,7 +119,7 @@ FR-Designer_Get-CubeGetting cube= FR-Designer_Help=Help FR-Designer_Hide=Hide FR-Designer_Hyperlink=Hyperlink -FR-Designer_Hyperlink-Form_link=Current form object +FR-Designer_Hyperlink-Form_link=Current dashboard object FR-Designer_IDCard=IDCard FR-Designer_Icon=Icon FR-Designer_Index=index @@ -126,7 +127,7 @@ FR-Designer_Input_Rule=Input Rule FR-Designer_Language_Default=Default FR-Designer_Layout=Layout FR-Designer_Layout-HBox=Horizontal Box Layout -FR-Designer_Layout-Index=Layout Index +FR-Designer_Layout-Index=Index FR-Designer_Layout_Constraints=Layout Constraints FR-Designer_Length=Length FR-Designer_Loading_Data=Loading Data @@ -173,12 +174,12 @@ FR-Designer_Search=Search FR-Designer_Set=Set FR-Designer_Share-Template=Share Template FR-Designer_Simple_general=Simple custom query -FR-Designer_Song_TypeFace=song typeface +FR-Designer_Song_TypeFace=Song typeface FR-Designer_Start-Date=Start Date FR-Designer_Subscript=Subscript FR-Designer_Superscript=Superscript FR-Designer_Support_QQ=Support online -FR-Designer_Swatch=Swatch +FR-Designer_Swatch=Sample FR-Designer_Tab_title=Tab title FR-Designer_TableData=Data set FR-Designer_Thank_guest=Special thanks to @@ -190,8 +191,8 @@ FR-Designer_Underline=Underline FR-Designer_Used=Recently Used FR-Designer_User-defined-MDX=Custom MDX query FR-Designer_SampleText=SampleText SampleText -FR-Designer_Vertical-LeftToRight=Vertical Text (Left to Right) -FR-Designer_Vertical-RightToLeft=Vertical Text (Right To Left) +FR-Designer_Vertical-LeftToRight=Vertical Text (left to right) +FR-Designer_Vertical-RightToLeft=Vertical Text (right to left) FR-Designer_VerticalBoxLayout=Vertical Box Layout FR-Designer_Visible=Visible FR-Designer_WLayout-Border-ToolTips=The complete border layout container\uFF0Cis composed of central, eastern, western, northern and southern parts. You can adjust the height of the northern and southern ones and the width of the eastern and western ones. @@ -358,6 +359,7 @@ FR-Designer_KeyPoint=KeyPoint FR-Designer_loadedTreeModel=loadedTreeModel FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\: FR-Designer-Plugin_Please_Update_Jar=Please Update Jar +FR-Designer-Invalid_Page_Number=Invalid Page Number FR-Designer_XMLA_Database=DB FR-Designer_XMLA_UserName=User name FR-Designer_XMLA_Password=Password @@ -413,12 +415,12 @@ FR-Designer_Unit_PT=Pound FR-Designer-Write_Auto_Stash=auto stash FR-Designer_Printer_Native_Button=Native Print FR-Designer_Event_ShowWidgets=Display widgets directly -FR-Designer_Current_Preview_Rows=Current Number of Preview Rows +FR-Designer_Current_Preview_Rows=Current Number of Preview Rows FR-Designer_Data=Data FR-Designer_Error=Error FR-Designer_formDesignerModule=Form Designer FR-Designer-Website_Url=http\://www.finereport.com/en -FR-Designer-BBSLogin_Download-Unlogin-Tip= +FR-Designer-BBSLogin_Download-Unlogin-Tip=Login to download FR-Designer-App_ReLayout=AppRelayout FR-Designer_Mobile-Attr=Mobile Attr FR-Designer_Mobile-Vertical=Vertical Screen @@ -432,42 +434,42 @@ FR-Designer_COMMUNITY_NEED=need FR-Designer_COMMUNITY_BUG=bug report FR-Designer_COMMUNITY_SIGN=sign FR-Designer_COMMUNITY_QUESTIONS=questions -FR-Designer_Mobile-Zoom=zoom +FR-Designer_Mobile-Zoom=Zoom FR-Designer_Mobile-Open=Open -FR-Designer_Mobile-Warning= +FR-Designer_Mobile-Warning=Max height cannot exceed 80% of display area FR-Designer_Button-OK=OK FR-Designer_Button-Cancel=Cancel FR-Designer_Write-Save-Formula=Preserve formula when fill FR-Designer_Export-Save-Formula=Preserve formula when export -FR-Designer_Form-Fit-Tip=Fit Plugin -FR-Designer_Form-Frozen-Tip=When Use Form Frozen, Suggest Install -FR-Designer_Form-Forzen-Speed=To Speed UP. -FR-Designer_Attention=attention -FR-Designer_Forbid_Widgets_Intersects=Forbid Widgets Intersects +FR-Designer_Form-Fit-Tip=Adaptive plug-in +FR-Designer_Form-Frozen-Tip=When use Frozen, suggest install +FR-Designer_Form-Forzen-Speed=, use bidirectional and horizontal adaption to improve the speed. +FR-Designer_Attention=Attention +FR-Designer_Forbid_Widgets_Intersects=Forbid component overlap FR-Designer_Widget_Scaling_Mode_Fit=Area-Fit FR-Designer_Widget_Scaling_Mode_Fixed=Area-Fixed -FR-Designer-Widget_Area_Scaling=Widget Area Scaling -FR-Designer-Widget_Scaling_Mode=Widget Scaling Mode +FR-Designer-Widget_Area_Scaling=Component area scaling +FR-Designer-Widget_Scaling_Mode=Scaling mode FR-Designer-QQLogin-Determine=Determine FR-Designer-QQLogin-Cancel=Cancel -FR-Designer-Reuse_Manager=Reuse Manager -FR-Designer_TableData-Default-Para=Default Para -FR-Designer_Layout_Block_Absolute=Absolute Layout Block -FR-Designer_Layout_Block_Tab=TabLayout -FR-Designer_Layout_Block_Blank=Blank Block -FR-Designer_Attr_Layout=layout -FR-Designer_Attr_Layout_Type=layout type -FR-Designer_Attr_Bidirectional_Adaptive=Bidirectional Adaptive -FR-Designer-Selected_Widget=selected widget -FR-Designer_LocalWidget=local widget -FR-Designer_AllCategories=all categories -FR-Designer_Download_Template=download template -FR-Designer_Install_Template=install template -FR-Designer_Delete_Template=delete template -FR-Designer_Mobile-Refresh=refresh -FR-Designer_Mobile-ToolBar=toolbar +FR-Designer-Reuse_Manager=Component management +FR-Designer_TableData-Default-Para=Default parameter +FR-Designer_Layout_Block_Absolute=Absolute layout block +FR-Designer_Layout_Block_Tab=Tab block +FR-Designer_Layout_Block_Blank=Blank block +FR-Designer_Attr_Layout=Layout +FR-Designer_Attr_Layout_Type=Layout type +FR-Designer_Attr_Bidirectional_Adaptive=Bidirectional adaptive +FR-Designer-Selected_Widget=Selected widget +FR-Designer_LocalWidget=Local component library +FR-Designer_AllCategories=All categories +FR-Designer_Download_Template=Download components +FR-Designer_Install_Template=Install components +FR-Designer_Delete_Template=Delete components +FR-Designer_Mobile-Refresh=Refresh +FR-Designer_Mobile-ToolBar=Toolbar FR-Designer_WLayout-Absolute-ToolTips=Freestyle layout, add control in any position of the layout -FR-Designer_Reset=reset +FR-Designer_Reset=Reset FR-Designer_Add_all=Add all FR-Designer_Language_Change_Successful=New language setting will be enabled when designer is restarted FR-Designer_Template_Web_Attributes=Web Attributes @@ -486,6 +488,10 @@ FR-Designer-DS-Database_Query=DB Query FR-Designer_Is_Share_DBTableData=Shared data set FR-Designer_Event=Event FR-Designer_Properties=Properties +FR-Designer_Permissions_Edition=Permissions Edition +FR-Designer_Export_Excel_Page=Page Break +FR-Designer_Export_Excel_Simple=Original +FR-Designer_Export_Excel_PageToSheet=One Page Per Sheet FR-Designer_Export_failed=Export failed FR-Designer_Exported_successfully=Exported successfully FR-Designer_Exporting=Exporting @@ -508,8 +514,24 @@ FR-Designer_Form_Basic_Properties=Basic Property FR-Designer_DS_Dictionary=Data Dictionary FR-Designer_Create_Tree=Build Tree FR-Designer_Set_Callback_Function=Set Callback Function -FR-Designer_ConfirmDialog_Content= -FR-Designer_ConfirmDialog_Title= +FR-Designer_ConfirmDialog_Content=Confirm to delete Tab Control +FR-Designer_ConfirmDialog_Title=FineReport 8.0 + +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 +FR-Designer_Tab_carousel=Tab carousel +FR-Designer_setCarousel=Start +FR-Designer_carouselInterval=Interval + +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 + FR-Designer_LayoutTable_Column_Width=250 FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited FR-Designer_Unload_Check=Prompt users when leave without submitting @@ -517,30 +539,17 @@ FR-Designer_ReportColumns_Columns_Optional=\u3000 FR-Designer_Row_Icon_File_Name=row_en.png FR-Designer_Center_Display=Center FR-Designer_Left_Display=Left -FR-Designer_Background_Null=No Background -FR-Designer_Background_Color=Color -FR-Designer_Background_Texture=Texture -FR-Designer_Background_Pattern=Pattern -FR-Designer_Background_Gradient_Color=Gradient Color -FR-Designer_Background_Image=Image -FR-Designer_Background_Clear=Clear -FR-Designer_Background_Image_Select=Select Picture -FR-Designer_Tab_carousel=tab carousel -FR-Designer_setCarousel=set carousel -FR-Designer_carouselInterval=interval -FR-Designer_Initial_Background_Tips=Initial background of the button -FR-Designer_Mouse_Move_Tips=Move the mouse to the button on the background, in the absence of not changing the background -FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background FR-Designer_About_Version=Version FR-Designer_About_CopyRight=Copy Right FR-Designer_Service_Phone=Service Phone -FR-Designer_Allow_Null=Allow null +FR-Designer_Allow_Blank=Allow Null FR-Designer_PageSetup_Page=Page FR-Designer_Custom_Job_Description=Description FR-Designer_Property=Property FR-Designer_ClassName=Class Name + FR-Designer_Polyblock_Edit=Aggregation block edition -FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R2} +FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Vertical=Vertical FR-Designer_Gradient_Direction=Gradient Direction @@ -554,12 +563,5 @@ FR-Designer_Show_As_Download=Display the binary content using download link FR-Designer_File_Name_For_Download=File Name For Download FR-Designer_No=No FR-Designer_Pagination=Page Break -FR-Designer-Move_Tab_First=move to first -FR-Designer-Move_Tab_End=move to end -FR-Designer-Move_Tab_Next=move to next -FR-Designer-Move_Tab_Prev=move to previous -FR-Designer_Role=Role FR-Designer_DS_TableData=Data Set -FR-Designer_Parameter-Formula=Formula -FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. -FR-Designer_WidgetOrder=Widget Order +FR-Designer_Parameter-Formula=Formula \ 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 0ef9ce10ca..d86d0a164c 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 @@ -100,6 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\u305D\u306E\u4ED6\u30C6\u30F3\u30D7\u30EC\ FR-Designer_File=\u30D5\u30A1\u30A4\u30EB FR-Designer_Filter_Conditions=\u9078\u5225\u6761\u4EF6 FR-Designer_Finish-Modify-Share=\u4FEE\u6B63\u3092\u5B8C\u4E86\u3057\u3066\u30B7\u30A7\u30A2 +FR-Designer_Fit-App=App\u81EA\u9069\u5FDC FR-Designer_Fit=\u81EA\u9069\u5FDC FR-Designer_Font-Family=\u30D5\u30A9\u30F3\u30C8\u540D\u79F0 FR-Designer_Font-Size=\u30D5\u30A9\u30F3\u30C8\u5927\u5C0F @@ -222,7 +223,7 @@ FR-Designer-StyleAlignment_Style_Indentation=\u30A4\u30F3\u30C7\u30F3\u30C8 FR-Designer-StyleAlignment_Style_Spacing=\u9593\u9694\u8DDD\u96E2 FR-Designer-StyleAlignment_Style_Alignment=\u63C3\u3048 FR-Designer-CommitTab_Submit=\u63D0\u51FA\u3059\u308B -FR-Designer-CommitTab_SureToDelete=Sure to delete +FR-Designer-CommitTab_SureToDelete=\u524A\u9664\u3057\u307E\u3059\u304B FR-Designer-CommitTab_Remove=\u524A\u9664 FR-Designer-Collect_Information_free=\u7121\u6599 FR-Designer-Collect_Information_Description=\u8A18\u8FF0 @@ -369,13 +370,13 @@ FR-Designer_LiteCondition_ConditionB-OR=\u30AA\u30A2(OR) FR-Designer_LiteCondition_Common_Condition=\u666E\u901A\u6761\u4EF6 FR-Designer_LiteCondition_Formula_Condition=\u516C\u5F0F\u6761\u4EF6 FR-Designer_LiteCondition_Define=\u5B9A\u7FA9 -FR-Designer_Select_All= +FR-Designer_Select_All=\u5168\u9078\u629E FR-Designer-Plugin_Expire_Dialog_Title=\u671F\u9650\u5207\u308C\u306E\u30D7\u30E9\u30B0\u30A4\u30F3 FR-Designer-Plugin_Expire_Dialog_Text=\u30D7\u30E9\u30B0\u30A4\u30F3\u306F\u3001\u8CFC\u5165\u3092\u3059\u308B\u305F\u3081\u306B\u5E06\u30BD\u30D5\u30C8\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30BB\u30F3\u30BF\u30FC\u3092\u884C\u304F\u3001\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u3066\u3044\u307E\u3059\u3002 FR-Designer-Plugin_Finerest_Addon=\u5E06\u8EDF\u5FDC\u7528\u30BB\u30F3\u30BF\u30FC FR-Designer_Performance_First=\u6027\u80FD\u512A\u5148 FR-Designer_Total_N_Grade=\u5168\u90E8\u3067\:${N}\u5C64 -FR-Designer_time(s)= +FR-Designer_time(s)=\u56DE FR-Designer_General=\u5E38\u7528 FR-Designer_Advanced=\u9AD8\u7D1A FR-Designer_Oracle=\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB @@ -407,10 +408,10 @@ FR-Designer_Current_Preview_Rows=\u73FE\u5728\u306E\u30D7\u30EC\u30D3\u30E5\u30F FR-Designer_Data=\u30C7\u30FC\u30BF FR-Designer_Error=\u30A8\u30E9\u30FC FR-Designer-Website_Url=http\://www.finereport.com/jp -FR-Designer_formDesignerModule= -FR-Designer-BBSLogin_Login-Title= -FR-Designer_Get-CubeGetting= -FR-Designer-BBSLogin_Download-Unlogin-Tip= +FR-Designer_formDesignerModule=\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u30C7\u30B6\u30A4\u30CA\u30FC +FR-Designer-BBSLogin_Login-Title=BBS\u30ED\u30B0\u30A4\u30F3 +FR-Designer_Get-CubeGetting=cube\u53D6\u5F97 +FR-Designer-BBSLogin_Download-Unlogin-Tip=\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9 FR-Designer-App_ReLayout=\u96FB\u8A71\u518D\u30EC\u30A4\u30A2\u30A6\u30C8 FR-Designer_Mobile-Attr=\u30E2\u30D0\u30A4\u30EB\u7AEF\u672B\u5C5E\u6027 FR-Designer_Mobile-Vertical=\u7E26 @@ -435,60 +436,76 @@ FR-Designer_Widget_Scaling_Mode_Fixed=\u56FA\u5B9A\u30B5\u30A4\u30BA FR-Designer-Widget_Area_Scaling=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30A8\u30EA\u30A2\ FR-Designer-QQLogin-Determine=\u6C7A\u5B9A\u3057\u307E\u3059 FR-Designer-QQLogin-Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB -FR-Designer-Reuse_Manager= -FR-Designer_Layout_Block_Absolute= -FR-Designer_Layout_Block_Tab= -FR-Designer_Layout_Block_Blank= -FR-Designer_Attr_Layout= -FR-Designer_Attr_Layout_Type= -FR-Designer_Attr_Bidirectional_Adaptive= -FR-Designer_Download_Template= +FR-Designer-Reuse_Manager=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8 +FR-Designer_Layout_Block_Absolute=\u7D76\u5BFE\u30EC\u30A4\u30A2\u30A6\u30C8\u30D6\u30ED\u30C3\u30AF +FR-Designer_Layout_Block_Tab=Tab\u30D6\u30ED\u30C3\u30AF +FR-Designer_Layout_Block_Blank=\u7A7A\u767D\u30D6\u30ED\u30C3\u30AF +FR-Designer_Attr_Layout=\u30EC\u30A4\u30A2\u30A6\u30C8 +FR-Designer_Attr_Layout_Type=\u30EC\u30A4\u30A2\u30A6\u30C8\u65B9\u5F0F +FR-Designer_Attr_Bidirectional_Adaptive=\u53CC\u65B9\u5411\u81EA\u5DF1\u8ABF\u6574 +FR-Designer_Download_Template=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9 FR-Designer-Widget_Scaling_Mode=\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u8AD6\u7406 -FR-Designer_Mobile-Refresh= -FR-Designer_Mobile-ToolBar= +FR-Designer_Mobile-Refresh=\u66F4\u65B0 +FR-Designer_Mobile-ToolBar=\u30C4\u30FC\u30EB\u30D0\u30FC FR-Designer_WLayout-Absolute-ToolTips=\u81EA\u7531\u5F0F\u914D\u7F6E\u3067\u3059\u3002\u914D\u7F6E\u5185\u306E\u4EFB\u610F\u306E\u4F4D\u7F6E\u306B\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8FFD\u52A0\u3059\u308B\u3053\u3068 FR-Designer_Add_all=\u3059\u3079\u3066\u8FFD\u52A0 -FR-Designer_Language_Change_Successful= -FR-Designer_Template_Web_Attributes= +FR-Designer_Language_Change_Successful=\u65B0\u3057\u3044\u8A00\u8A9E\u306F\u518D\u8D77\u52D5\u5F8C\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002 +FR-Designer_Template_Web_Attributes=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30A6\u30A7\u30D6\u30D7\u30ED\u30D1\u30C6\u30A3 FR-Designer_Basic=\u57FA\u672C FR-Designer_Printers(Server)=\u30D7\u30EA\u30F3\u30BF\u30FC(\u30B5\u30FC\u30D0) FR-Designer_Pagination_Setting=\u30DA\u30FC\u30B8\u5225\u30D7\u30EC\u30D3\u30E5\u30FC\u8A2D\u5B9A -FR-Designer_Write_Setting=\u5831\u544A\u30DA\u30FC\u30B8\u8A2D\u5B9A +FR-Designer_Write_Setting=\u66F8\u304D\u8FBC\u307F\u30DA\u30FC\u30B8\u8A2D\u5B9A FR-Designer_Data_Analysis_Settings=\u30C7\u30FC\u30BF\u5206\u6790\u8A2D\u5B9A FR-Designer_Browser_Background=\u30D6\u30E9\u30A6\u30B6\u80CC\u666F FR-Designer_Import_Css=Css\u5F15\u7528 FR-Designer_Import_JavaScript=JavaScript\u5F15\u7528 FR-Designer-Datasource-Param_DES=  "${abc}"\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3068\u3057\u3066\u5165\u529B\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3002abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u540D\u524D\u3067\u3059\u3002\u4F8B\u3048\u3070
 select * from table where id\=${abc}\u3002
 select * from table where id\='${abc}'\u3002(\u3082\u3057id\u306F\u6587\u5B57\u5217\u306A\u3089)\uFFFD FR-Designer-DS-Database_Query=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30AF\u30A8\u30EA\u30FC -FR-Designer-LayerPageReport_PageQuery=\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EA -FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EAsql +FR-Designer-LayerPageReport_PageQuery=\u6539\u30DA\u30FC\u30B8\u691C\u7D22 +FR-Designer-LayerPageReport_Define_PageQuerySQL=\u6539\u30DA\u30FC\u30B8\u691C\u7D22sql\u3092\u66F8\u304F FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8 -FR-Designer_Event=\ -FR-Designer_Properties=FR-Designer_Properties=\ -\ +FR-Designer_Event=\u30A4\u30D9\u30F3\u30C8 +FR-Designer_Properties=\u30D7\u30ED\u30D1\u30C6\u30A3 +FR-Designer_Permissions_Edition=\u6A29\u9650\u7DE8\u96C6 +FR-Designer_Export_Excel_Page=\u6539\u30DA\u30FC\u30B8\u51FA\u529B +FR-Designer_Export_Excel_Simple=\u305D\u306E\u307E\u307E\u51FA\u529B +FR-Designer_Export_Excel_PageToSheet=\u6539\u30DA\u30FC\u30B8\uFF06\u30B7\u30FC\u30C8\u5206\u3051 FR-Designer_Export_failed=\u5C0E\u51FA\u306B\u5931\u6557\u3057\u307E\u3057\u305F FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 -FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8FR-Designer_Button_OK=FR-Designer_Button_OK=\u78BA\u5B9A +FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8 +FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Button_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB -\uFFFD -FR-Designer_JavaScript= -FR-Designer_JavaScript_Form_Submit= -FR-Designer_JavaScript_Commit_to_Database= -FR-Designer_JavaScript_Custom= -FR-Designer_RWA_Submit= -FR-Designer_Event_Name= -FR-Designer_Event_Type= -FR-Designer_Event_Name_Type= -FR-Designer_JavaScript_Set= -FR-Designer_Attribute= -FR-Designer_Form_Editing_Listeners= -FR-Designer_Form_Basic_Properties= -FR-Designer_DS_Dictionary= -FR-Designer_Create_Tree= -FR-Designer_Set_Callback_Function= -FR-Designer_ConfirmDialog_Content= -FR-Designer_ConfirmDialog_Title= +FR-Designer_JavaScript=JavaScript +FR-Designer_JavaScript_Form_Submit=\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u66F8\u304D\u8FBC\u307F +FR-Designer_JavaScript_Commit_to_Database=DB\u306B\u66F8\u304D\u8FBC\u307F +FR-Designer_JavaScript_Custom=\u30AB\u30B9\u30BF\u30E0 +FR-Designer_RWA_Submit=\u66F8\u304D\u8FBC\u307F +FR-Designer_Event_Name=\u30A4\u30D9\u30F3\u30C8\u540D +FR-Designer_Event_Type=\u30A4\u30D9\u30F3\u30C8\u30BF\u30A4\u30D7 +FR-Designer_Event_Name_Type=\u30A4\u30D9\u30F3\u30C8\u540D\u3068\u30BF\u30A4\u30D7 +FR-Designer_JavaScript_Set=JS\u8A2D\u5B9A +FR-Designer_Attribute=\u30D7\u30ED\u30D1\u30C6\u30A3 +FR-Designer_Form_Editing_Listeners=\u30A4\u30D9\u30F3\u30C8\u7DE8\u96C6 +FR-Designer_Form_Basic_Properties=\u57FA\u672C\u30D7\u30ED\u30D1\u30C6\u30A3 +FR-Designer_DS_Dictionary=\u30C7\u30FC\u30BF\u8F9E\u66F8 +FR-Designer_Create_Tree=\u30C4\u30EA\u30FC\u69CB\u7BC9 +FR-Designer_Set_Callback_Function=\u30B3\u30FC\u30EB\u30D0\u30C3\u30AF\u95A2\u6570\u8A2D\u5B9A +FR-Designer_ConfirmDialog_Content=tab\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059\u304B +FR-Designer_ConfirmDialog_Title=FineReport 8.0 +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 +FR-Designer_Tab_carousel=tab\u30AB\u30EB\u30FC\u30BB\u30EB +FR-Designer_setCarousel=\u30AB\u30EB\u30FC\u30BB\u30EB\u30AA\u30F3 +FR-Designer_carouselInterval=\u30AB\u30EB\u30FC\u30BB\u30EB\u9593\u9694 +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 FR-Designer_LayoutTable_Column_Width=160 FR-Designer_Set_BG_Of_Current_Row=\u5831\u544A\u30AB\u30EC\u30F3\u30C8\u7DE8\u96C6\u884C\u80CC\u666F\u8A2D\u5B9A FR-Designer_Unload_Check=\u63D0\u51FA\u305B\u305A\u306B\u30D2\u30F3\u30C8 @@ -496,30 +513,17 @@ FR-Designer_ReportColumns_Columns_Optional=\u6BB5\u7D44\u307F FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Center_Display=\u4E2D\u592E\u63C3\u3048\u8868\u793A FR-Designer_Left_Display=\u5DE6\u8868\u793A -FR-Designer_Background_Null= -FR-Designer_Background_Color= -FR-Designer_Background_Texture= -FR-Designer_Background_Pattern= -FR-Designer_Background_Gradient_Color= -FR-Designer_Background_Image= -FR-Designer_Background_Clear= -FR-Designer_Background_Image_Select= -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -FR-Designer_carouselInterval= -FR-Designer_Initial_Background_Tips= -FR-Designer_Mouse_Move_Tips= -FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=\u30D0\u30FC\u30B8\u30E7\u30F3 FR-Designer_About_CopyRight=\u8457\u4F5C\u6A29\u6240\u6709 FR-Designer_Service_Phone=\u30B5\u30FC\u30D3\u30B9\u96FB\u8A71\uFF1A -FR-Designer_Allow_Null=\u7A7A\u6B04\u3042\u308A +FR-Designer_Allow_Blank=\u7A7A\u6B04\u3042\u308A FR-Designer_PageSetup_Page=\u30DA\u30FC\u30B8 FR-Designer_Custom_Job_Description=\u8A18\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u985E\u540D + FR-Designer_Polyblock_Edit=\u30A2\u30B0\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30D6\u30ED\u30C3\u30AF\u7DE8\u96C6 -FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R2} +FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}WEB-INF{R2}classes" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R3}classes FR-Designer_PageSetup_Horizontal=\u6A2A\u65B9\u5411 FR-Designer_PageSetup_Vertical=\u7E26\u65B9\u5411 FR-Designer_Gradient_Direction=\u65B9\u5411\u3092\u5F90\u3005\u306B\u5909\u5316 @@ -533,11 +537,5 @@ FR-Designer_Show_As_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30EA\u30F3\u3 FR-Designer_File_Name_For_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30D5\u30A1\u30A4\u30EB\u540D FR-Designer_No=\u3044\u3044\u3048 FR-Designer_Pagination=\u30DA\u30FC\u30B8\u30F3\u30B0 -FR-Designer-Move_Tab_First= -FR-Designer-Move_Tab_End= -FR-Designer-Move_Tab_Next= -FR-Designer-Move_Tab_Prev= -FR-Designer_Role= FR-Designer_DS_TableData=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9 FR-Designer_Parameter-Formula=\u6570\u5F0F -FR-Designer_Plugin_Should_Update_Please_Contact_Developer= 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 5bc3966dc3..dfb5ec78ff 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 @@ -100,6 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\uAE30\uD0C0\uD15C\uD50C\uB9BF\uB2EB\uAE30 FR-Designer_File=\uD30C\uC77C FR-Designer_Filter_Conditions=\uD544\uD130\uC870\uAC74 FR-Designer_Finish-Modify-Share=\uC218\uC815\uC644\uB8CC\uBC0F\uACF5\uC720 +FR-Designer_Fit-App=App\uC790\uAE30\uC801\uC751 FR-Designer_Fit=\uC790\uAE30\uC801\uC751 FR-Designer_Font-Family=\uAE00\uAF34\uBA85\uCE6D FR-Designer_Font-Size=\uAE00\uAF34\uD06C\uAE30 @@ -460,6 +461,10 @@ FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720 FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30 FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql FR-Designer_Event= +FR-Designer_Permissions_Edition=\uAD8C\uD55C\uD3B8\uC9D1 +FR-Designer_Export_Excel_Page=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uC5B4\uB0B4\uBCF4\uB0B4\uAE30 +FR-Designer_Export_Excel_Simple=\uC6D0\uB798\uBAA8\uC2B5\uB0B4\uBCF4\uB0B4\uAE30 +FR-Designer_Export_Excel_PageToSheet=\uD398\uC774\uC9C0\uC640 Sheet\uB098\uB204\uC5B4\uB0B4\uBCF4\uB0B4\uAE30 FR-Designer_Properties=\uFFFD FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328 FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 @@ -484,6 +489,19 @@ 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 +FR-Designer_Tab_carousel= +FR-Designer_setCarousel= +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 FR-Designer_LayoutTable_Column_Width=160 FR-Designer_Set_BG_Of_Current_Row=\uAE30\uC785\uD604\uC7AC\uD3B8\uC9D1\uD589\uBC30\uACBD\uC124\uC815 FR-Designer_Unload_Check=\uBBF8\uC81C\uCD9C\uB098\uAC14\uC74C\uC54C\uB9BC @@ -491,30 +509,18 @@ FR-Designer_ReportColumns_Columns_Optional=\uC140\uB098\uB204\uAE30 FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Center_Display=\uAC00\uC6B4\uB370\uC815\uB82C\uBCF4\uC774\uAE30 FR-Designer_Left_Display=\uC67C\uCABD\uBCF4\uC774\uAE30 -FR-Designer_Background_Null= -FR-Designer_Background_Color= -FR-Designer_Background_Texture= -FR-Designer_Background_Pattern= -FR-Designer_Background_Gradient_Color= -FR-Designer_Background_Image= -FR-Designer_Background_Clear= -FR-Designer_Background_Image_Select= -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -FR-Designer_carouselInterval= -FR-Designer_Initial_Background_Tips= -FR-Designer_Mouse_Move_Tips= -FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=\uBC84\uC804 FR-Designer_About_CopyRight=\uD310\uAD8C\uC18C\uC720 FR-Designer_Service_Phone=\uC11C\uBE44\uC2A4\uC804\uD654\uFF1A -FR-Designer_Allow_Null=\uBE48\uCE78\uD5C8\uC6A9 +FR-Designer_Allow_Blank=\uBE48\uCE78\uD5C8\uC6A9 FR-Designer_PageSetup_Page=\uC6F9\uD398\uC774\uC9C0 FR-Designer_Custom_Job_Description=\uC124\uBA85 FR-Designer_Property=\uC18D\uC131 FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 +FR-Designer_Template_Web_Attributes=\uD15C\uD50C\uB9BF \uC6F9 \uC18D\uC131 + FR-Designer_Polyblock_Edit=\uCDE8\uD569\uBE14\uB7ED\uD3B8\uC9D1 -FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R2} +FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}WEB-INF{R2}classes" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R3}classes FR-Designer_PageSetup_Horizontal=\uAC00\uB85C FR-Designer_PageSetup_Vertical=\uC138\uB85C FR-Designer_Gradient_Direction=\uADF8\uB77C\uB370\uC774\uC158 \uBC29\uD5A5 @@ -528,12 +534,5 @@ FR-Designer_Show_As_Download=\uB2E4\uC6B4\uB85C\uB4DC\uB9C1\uD06C\uB85C2\uC9C4\u FR-Designer_File_Name_For_Download=\uB2E4\uC6B4\uB85C\uB4DC\uD30C\uC77C\uBA85 FR-Designer_No=\uC544\uB2C8\uC624 FR-Designer_Pagination=\uD398\uC774\uC9C0\uB098\uB204\uAE30 -FR-Designer-Move_Tab_First= -FR-Designer-Move_Tab_End= -FR-Designer-Move_Tab_Next= -FR-Designer-Move_Tab_Prev= -FR-Designer_Role= FR-Designer_DS_TableData=\uB370\uC774\uD130\uC138\uD2B8 FR-Designer_Parameter-Formula=\uC218\uC2DD -FR-Designer_Plugin_Should_Update_Please_Contact_Developer= - 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 c8ecd5befb..367884033e 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 @@ -100,6 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\u5173\u95ED\u5176\u4ED6\u6A21\u677F FR-Designer_File=\u6587\u4EF6 FR-Designer_Filter_Conditions=\u8FC7\u6EE4\u6761\u4EF6 FR-Designer_Finish-Modify-Share=\u5B8C\u6210\u4FEE\u6539\u5E76\u5206\u4EAB +FR-Designer_Fit-App=App\u81EA\u9002\u5E94 FR-Designer_Fit=\u81EA\u9002\u5E94 FR-Designer_Font-Family=\u5B57\u4F53\u540D\u79F0 FR-Designer_Font-Size=\u5B57\u4F53\u5927\u5C0F @@ -358,6 +359,7 @@ FR-Designer_KeyPoint=\u5173\u952E\u8282\u70B9 FR-Designer_loadedTreeModel=\u52A0\u8F7D\u5931\u8D25,\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5 FR-Designer-Failed_to_load_the_plugin=\u65E0\u6CD5\u52A0\u8F7D\u63D2\u4EF6\uFF0C\u8BF7\u66F4\u65B0\u63D2\u4EF6\uFF1A FR-Designer-Plugin_Please_Update_Jar=\u8BF7\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C +FR-Designer-Invalid_Page_Number=\u65E0\u6548\u9875\u7801 FR-Designer_Get-CubeGetting=\u83B7\u53D6cube FR-Designer_XMLA_Database=\u6570\u636E\u5E93 FR-Designer_XMLA_UserName=\u7528\u6237\u540D @@ -490,6 +492,10 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u4E49\u5206\u9875\u67E5\u FR-Designer_Is_Share_DBTableData=\u5171\u4EAB\u6570\u636E\u96C6 FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Properties=\u5C5E\u6027 +FR-Designer_Permissions_Edition=\u6743\u9650\u7F16\u8F91 +FR-Designer_Export_Excel_Page=\u5206\u9875\u5BFC\u51FA +FR-Designer_Export_Excel_Simple=\u539F\u6837\u5BFC\u51FA +FR-Designer_Export_Excel_PageToSheet=\u5206\u9875\u5206Sheet\u5BFC\u51FA FR-Designer_Export_failed=\u5BFC\u51FA\u5931\u8D25 FR-Designer_Exported_successfully=\u5BFC\u51FA\u6210\u529F FR-Designer_Exporting=\u6B63\u5728\u5BFC\u51FA @@ -514,6 +520,22 @@ 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 +FR-Designer_Tab_carousel=tab\u8F6E\u64AD +FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD +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 + FR-Designer_LayoutTable_Column_Width=160 FR-Designer_Set_BG_Of_Current_Row=\u586B\u62A5\u5F53\u524D\u7F16\u8F91\u884C\u80CC\u666F\u8BBE\u7F6E FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u79BB\u5F00\u63D0\u793A @@ -521,30 +543,17 @@ FR-Designer_ReportColumns_Columns_Optional=\u5206\u680F FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Center_Display=\u5C45\u4E2D\u5C55\u793A FR-Designer_Left_Display=\u5DE6\u5C55\u793A -FR-Designer_Background_Null=\u6CA1\u6709\u80CC\u666F -FR-Designer_Background_Color=\u989C\u8272 -FR-Designer_Background_Texture=\u7EB9\u7406 -FR-Designer_Background_Pattern=\u56FE\u6848 -FR-Designer_Background_Gradient_Color=\u6E10\u53D8\u8272 -FR-Designer_Background_Image=\u56FE\u7247 -FR-Designer_Background_Clear=\u6E05\u9664 -FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 -FR-Designer_Tab_carousel=tab\u8F6E\u64AD -FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD -FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694 -FR-Designer_Initial_Background_Tips=\u6309\u94AE\u7684\u521D\u59CB\u80CC\u666F -FR-Designer_Mouse_Move_Tips=\u9F20\u6807\u79FB\u52A8\u5230\u6309\u94AE\u4E0A\u7684\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F -FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F FR-Designer_About_Version=\u7248\u672C FR-Designer_About_CopyRight=\u7248\u6743\u6240\u6709 FR-Designer_Service_Phone=\u670D\u52A1\u7535\u8BDD\uFF1A -FR-Designer_Allow_Null=\u5141\u8BB8\u4E3A\u7A7A +FR-Designer_Allow_Blank=\u5141\u8BB8\u4E3A\u7A7A FR-Designer_PageSetup_Page=\u9875\u9762 FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C5E\u6027 FR-Designer_ClassName=\u7C7B\u540D + FR-Designer_Polyblock_Edit=\u805A\u5408\u5757\u7F16\u8F91 -FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R2} +FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Vertical=\u7EB5\u5411 FR-Designer_Gradient_Direction=\u6E10\u53D8\u65B9\u5411 @@ -558,12 +567,5 @@ FR-Designer_Show_As_Download=\u7528\u4E0B\u8F7D\u94FE\u63A5\u663E\u793A\u4E8C\u8 FR-Designer_File_Name_For_Download=\u4E0B\u8F7D\u6587\u4EF6\u540D FR-Designer_No=\u5426 FR-Designer_Pagination=\u5206\u9875 -FR-Designer-Move_Tab_First=\u79FB\u52A8\u5230\u9996\u4F4D -FR-Designer-Move_Tab_End=\u79FB\u52A8\u5230\u672B\u5C3E -FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8 -FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8 -FR-Designer_Role=\u89D2\u8272 FR-Designer_DS_TableData=\u6570\u636E\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F -FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6 -FR-Designer_WidgetOrder=\u63A7\u4EF6\u987A\u5E8F 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 a31f317606..95aba53fff 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 @@ -100,6 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\u95DC\u9589\u5176\u4ED6\u7BC4\u672C FR-Designer_File=\u6A94\u6848 FR-Designer_Filter_Conditions=\u904E\u6FFE\u689D\u4EF6 FR-Designer_Finish-Modify-Share=\u5B8C\u6210\u4FEE\u6539\u4E26\u5206\u4EAB +FR-Designer_Fit-App=App\u81EA\u9069\u61C9 FR-Designer_Fit=\u81EA\u9069\u61C9 FR-Designer_Font-Family=\u5B57\u9AD4\u540D\u7A31 FR-Designer_Font-Size=\u5B57\u9AD4\u5927\u5C0F @@ -357,6 +358,7 @@ FR-Designer_KeyPoint=\u95DC\u9375\u7BC0\u9EDE FR-Designer_loadedTreeModel=\u52A0\u8F09\u5931\u6557,\u8ACB\u6AA2\u67E5\u5F8C\u91CD\u8A66 FR-Designer-Failed_to_load_the_plugin=\u7121\u6CD5\u52A0\u8F09\u63D2\u4EF6\uFF0C\u8ACB\u66F4\u65B0\u63D2\u4EF6\uFF1A FR-Designer-Plugin_Please_Update_Jar=\u8ACB\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C +FR-Designer-Invalid_Page_Number=\u7121\u6548\u9801\u78BC FR-Designer_Get-CubeGetting=\u7372\u53D6cube FR-Designer_XMLA_Database=\u8CC7\u6599\u5EAB FR-Designer_XMLA_UserName=\u5E33\u865F @@ -451,12 +453,12 @@ FR-Designer-QQLogin-Determine=\u78BA\u5B9A FR-Designer-QQLogin-Cancel=\u53D6\u6D88 FR-Designer-Reuse_Manager=\u7D44\u4EF6\u7BA1\u7406 FR-Designer_TableData-Default-Para=\u6578\u64DA\u96C6\u9ED8\u8A8D\u53C3\u6578 -FR-Designer_Layout_Block_Absolute= -FR-Designer_Layout_Block_Tab= -FR-Designer_Layout_Block_Blank= -FR-Designer_Attr_Layout= -FR-Designer_Attr_Layout_Type= -FR-Designer_Attr_Bidirectional_Adaptive= +FR-Designer_Layout_Block_Absolute=\u7D55\u5C0D\u756B\u5E03\u584A +FR-Designer_Layout_Block_Tab=Tab\u584A +FR-Designer_Layout_Block_Blank=\u7A7A\u767D\u584A +FR-Designer_Attr_Layout=\u4F48\u5C40 +FR-Designer_Attr_Layout_Type=\u4F48\u5C40\u65B9\u5F0F +FR-Designer_Attr_Bidirectional_Adaptive=\u96D9\u5411\u81EA\u9069\u61C9 FR-Designer_Mobile-Refresh=\u5237\u65B0 FR-Designer_Mobile-ToolBar=\u5DE5\u5177\u6B04 FR-Designer_WLayout-Absolute-ToolTips=\u81EA\u7531\u5F0F\u5E03\u5C40\uFF0C\u53EF\u4EE5\u5728\u5E03\u5C40\u5167\u4EFB\u610F\u4F4D\u7F6E\u65B0\u589E\u63A7\u5236\u9805 @@ -478,6 +480,10 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u5206\u9801\u67E5\u FR-Designer_Is_Share_DBTableData=\u662F\u5426\u5171\u4EAB\u8CC7\u6599\u96C6 FR-Designer_Properties=\u5C6C\u6027 FR-Designer_Event=\u4E8B\u4EF6 +FR-Designer_Permissions_Edition=\u6B0A\u9650\u7DE8\u8F2F +FR-Designer_Export_Excel_Page=\u5206\u9801\u532F\u51FA +FR-Designer_Export_Excel_Simple=\u539F\u6A23\u532F\u51FA +FR-Designer_Export_Excel_PageToSheet=\u5206\u9801\u5206Sheet\u532F\u51FA FR-Designer_Export_failed=\u532F\u51FA\u5931\u6557 FR-Designer_Exported_successfully=\u532F\u51FA\u6210\u529F FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA... @@ -485,23 +491,39 @@ FR-Designer_Export-PDF=PDF\u683C\u5F0F FR-Designer_Properties_Mobile=\u624B\u6A5F\u5C6C\u6027 FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Button_Cancel=\u53D6\u6D88 -FR-Designer_JavaScript= -FR-Designer_JavaScript_Form_Submit= -FR-Designer_JavaScript_Commit_to_Database= -FR-Designer_JavaScript_Custom= -FR-Designer_RWA_Submit= -FR-Designer_Event_Name= -FR-Designer_Event_Type= -FR-Designer_Event_Name_Type= -FR-Designer_JavaScript_Set= -FR-Designer_Attribute= -FR-Designer_Form_Editing_Listeners= -FR-Designer_Form_Basic_Properties= -FR-Designer_DS_Dictionary= -FR-Designer_Create_Tree= -FR-Designer_Set_Callback_Function= -FR-Designer_ConfirmDialog_Content= -FR-Designer_ConfirmDialog_Title= +FR-Designer_JavaScript=JavaScript\u8173\u672C +FR-Designer_JavaScript_Form_Submit=\u8868\u55AE\u63D0\u4EA4 +FR-Designer_JavaScript_Commit_to_Database=\u63D0\u4EA4\u5165\u5EAB +FR-Designer_JavaScript_Custom=\u81EA\u5B9A\u7FA9 +FR-Designer_RWA_Submit=\u63D0\u4EA4 +FR-Designer_Event_Name=\u4E8B\u4EF6\u540D +FR-Designer_Event_Type=\u4E8B\u4EF6\u985E\u578B +FR-Designer_Event_Name_Type=\u4E8B\u4EF6\u540D\u5B57\u548C\u985E\u578B +FR-Designer_JavaScript_Set=JS\u8A2D\u7F6E +FR-Designer_Attribute=\u5C6C\u6027 +FR-Designer_Form_Editing_Listeners=\u4E8B\u4EF6\u7DE8\u8F2F +FR-Designer_Form_Basic_Properties=\u57FA\u672C\u5C6C\u6027 +FR-Designer_DS_Dictionary=\u6578\u64DA\u5B57\u5178 +FR-Designer_Create_Tree=\u69CB\u5EFA\u6A39 +FR-Designer_Set_Callback_Function=\u8A2D\u7F6E\u56DE\u8ABF\u51FD\u6578 +FR-Designer_ConfirmDialog_Content=\u662F\u5426\u78BA\u5B9A\u522A\u9664TAB\u63A7\u4EF6 +FR-Designer_ConfirmDialog_Title=FineReport 8.0 + +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 +FR-Designer_Tab_carousel=Tab\u8F2A\u64AD +FR-Designer_setCarousel=\u958B\u555F\u8F2A\u64AD +FR-Designer_carouselInterval=\u8F2A\u64AD\u9593\u9694 + +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 + FR-Designer_LayoutTable_Column_Width=160 FR-Designer_Set_BG_Of_Current_Row=\u586B\u5831\u7576\u524D\u7DE8\u8F2F\u5217\u80CC\u666F\u8A2D\u5B9A FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u96E2\u958B\u63D0\u793A @@ -509,30 +531,17 @@ FR-Designer_ReportColumns_Columns_Optional=\u5831\u8868\u6B04\u4F4D FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Center_Display=\u7F6E\u4E2D\u986F\u793A FR-Designer_Left_Display=\u5DE6\u986F\u793A -FR-Designer_Background_Null= -FR-Designer_Background_Color= -FR-Designer_Background_Texture= -FR-Designer_Background_Pattern= -FR-Designer_Background_Gradient_Color= -FR-Designer_Background_Image= -FR-Designer_Background_Clear= -FR-Designer_Background_Image_Select= -FR-Designer_Tab_carousel= -FR-Designer_setCarousel= -FR-Designer_carouselInterval= -FR-Designer_Initial_Background_Tips= -FR-Designer_Mouse_Move_Tips= -FR-Designer_Mouse_Click_Tips= FR-Designer_About_Version=\u7248\u672C FR-Designer_About_CopyRight=\u7248\u6B0A\u6240\u6709 FR-Designer_Service_Phone=\u670D\u52D9\u96FB\u8A71\uFF1A -FR-Designer_Allow_Null=\u5141\u8A31\u70BA\u7A7A\u767D +FR-Designer_Allow_Blank=\u5141\u8A31\u70BA\u7A7A\u767D FR-Designer_PageSetup_Page=\u9801\u9762 FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Property=\u5C6C\u6027 FR-Designer_ClassName=\u985E\u540D + FR-Designer_Polyblock_Edit=\u805A\u5408\u584A\u7DE8\u8F2F -FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R2} +FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Vertical=\u7E31\u5411 FR-Designer_Gradient_Direction=\u6F38\u8B8A\u65B9\u5411 @@ -546,12 +555,5 @@ FR-Designer_Show_As_Download=\u7528\u4E0B\u8F09\u93C8\u63A5\u986F\u793A\u4E8C\u9 FR-Designer_File_Name_For_Download=\u4E0B\u8F09\u6A94\u6848\u540D FR-Designer_No=\u5426 FR-Designer_Pagination=\u5206\u9801 -FR-Designer-Move_Tab_First=\u79FB\u52D5\u5230\u9996\u4F4D -FR-Designer-Move_Tab_End=\u79FB\u52D5\u5230\u672B\u5C3E -FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5 -FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5 -FR-Designer_Role= FR-Designer_DS_TableData=\u8CC7\u6599\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F -FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u633F\u4EF6\u7248\u672C\u904E\u4F4E\uFF0C\u5B58\u5728API\u4E0D\u76F8\u5BB9\uFF0C\u8ACB\u806F\u7CFB\u958B\u767C\u8005\u965E\u7D1A\u633F\u4EF6 -FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 7fcea5d1ec..03612e0dae 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -10,7 +10,9 @@ import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; import com.fr.design.actions.community.*; import com.fr.design.actions.file.*; -import com.fr.design.actions.help.*; +import com.fr.design.actions.help.AboutAction; +import com.fr.design.actions.help.TutorialAction; +import com.fr.design.actions.help.WebDemoAction; import com.fr.design.actions.server.*; import com.fr.design.file.NewTemplatePane; import com.fr.design.fun.MenuHandler; @@ -28,7 +30,6 @@ import com.fr.design.menu.ShortCut; import com.fr.design.menu.ToolBarDef; import com.fr.env.RemoteEnv; import com.fr.general.ComparatorUtils; -import com.fr.general.GeneralContext; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.ProductConstants; @@ -161,6 +162,7 @@ public abstract class ToolBarMenuDock { return new Locale[]{ Locale.CHINA, Locale.TAIWAN, + Locale.US }; } From c79c47b393063ccaa07b6a609b9a578ddcb0c709 Mon Sep 17 00:00:00 2001 From: richie Date: Thu, 23 Feb 2017 10:28:24 +0800 Subject: [PATCH 104/127] =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E9=87=8D=E6=96=B0=E8=AE=BE=E8=AE=A1=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E4=BD=BF=E7=94=A8=E8=AF=B7=E6=B1=82=E6=B3=A8?= =?UTF-8?q?=E5=85=A5=E7=9A=84=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/data/datapane/TableDataTreePane.java | 2 +- designer_base/src/com/fr/design/mainframe/DesignerFrame.java | 3 +-- .../src/com/fr/design/mainframe/WestRegionContainerPane.java | 2 +- .../src/com/fr/design/ChartTypeInterfaceManager.java | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java index 5a893803c2..c8f5ba3176 100644 --- a/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java @@ -84,7 +84,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { GeneralContext.addPluginReadListener(new PluginReadListener() { @Override - public void success() { + public void success(Status status) { addMenuDef.clearShortCuts(); createAddMenuDef(); } diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java index 298e5e996c..117eb28489 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrame.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrame.java @@ -169,7 +169,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta /** * 初始menuPane的方法 方便OEM时修改该组件 - * @param ad */ protected void initMenuPane(){ menuPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); @@ -189,7 +188,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta final JPanel northEastPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); GeneralContext.addPluginReadListener(new PluginReadListener() { @Override - public void success() { + public void success(Status status) { TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING); if (processor == null) { processor = new DefaultTitlePlace(); diff --git a/designer_base/src/com/fr/design/mainframe/WestRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/WestRegionContainerPane.java index 917e4cbfc1..7fa8012fe8 100644 --- a/designer_base/src/com/fr/design/mainframe/WestRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/WestRegionContainerPane.java @@ -29,7 +29,7 @@ public class WestRegionContainerPane extends UIResizableContainer { super(DesignerFrameFileDealerPane.getInstance(), Constants.RIGHT); GeneralContext.addPluginReadListener(new PluginReadListener() { @Override - public void success() { + public void success(Status status) { setDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); } }); diff --git a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java index c091c54b99..c67a6aea57 100644 --- a/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java @@ -75,7 +75,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh static { GeneralContext.addPluginReadListener(new PluginReadListener() { @Override - public void success() { + public void success(Status status) { //重新注册designModuleFactory DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption()); } From 61ce070f0e468495d34ffbf73902af8ab87ec07e Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Thu, 23 Feb 2017 10:32:23 +0800 Subject: [PATCH 105/127] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/extra/PluginHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index 119858206c..be0244f78d 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -256,7 +256,7 @@ public class PluginHelper { if (PluginLoader.getLoader().isInstalled(plugin)) { throw new com.fr.plugin.PluginVerifyException(Inter.getLocText("FR-Designer-Plugin_Has_Been_Installed")); } - if (plugin.isJarExpired()) { + if (plugin.checkIfJarExpired()) { String jarExpiredInfo = Inter.getLocText(new String[]{"FR-Designer-Plugin_Jar_Expired", ",", "FR-Designer-Plugin_Install_Failed", ",", "FR-Designer-Plugin_Please_Update_Jar", plugin.getRequiredJarTime()}); FRLogger.getLogger().error(jarExpiredInfo); throw new com.fr.plugin.PluginVerifyException(jarExpiredInfo); From 92d9e6fddccb9522962d05a9fa5b5ffa55a029c1 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Thu, 23 Feb 2017 19:22:58 +0800 Subject: [PATCH 106/127] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E2=80=9C=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E5=B1=9E=E6=80=A7=E2=80=9D=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E4=B8=AD=E2=80=9C=E8=A7=A3=E6=9E=90=E6=96=B9=E5=BC=8F=E2=80=9D?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E6=B3=A8=E9=87=8A=E5=88=86=E5=88=AB=E5=9C=A8?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=92=8C=E8=A1=A8=E5=8D=95=E4=B8=AD=E6=9C=89?= =?UTF-8?q?=E4=BA=89=E5=8F=96=E7=9A=84=E8=A1=A8=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/report/mobile/MobileUseHtmlGroupPane.java | 4 ++++ .../com/fr/design/report/mobile/ReportMobileAttrPane.java | 2 +- .../design/dialog/mobile/MobileUseHtmlGroupBeanPane.java | 8 ++++---- .../src/com/fr/design/locale/designer.properties | 1 + .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + .../src/com/fr/design/form/mobile/FormMobileAttrPane.java | 2 +- .../com/fr/design/form/mobile/MobileUseHtmlGroupPane.java | 4 ++++ 9 files changed, 18 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java b/designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java index 0e0ec087d1..ee3c51fec7 100644 --- a/designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java +++ b/designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java @@ -7,6 +7,10 @@ import com.fr.report.mobile.ElementCaseMobileAttr; * Created by kunsnat on 2016/8/3. */ public class MobileUseHtmlGroupPane extends MobileUseHtmlGroupBeanPane { + public MobileUseHtmlGroupPane(String annotation) { + super(annotation); + } + @Override public void populateBean(ElementCaseMobileAttr mobileAttr) { if(mobileAttr != null) { diff --git a/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java b/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java index 8f8f74437f..e062b64cc3 100644 --- a/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java +++ b/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java @@ -34,7 +34,7 @@ public class ReportMobileAttrPane extends BasicBeanPane{ appFitBrowserPane.setAppFitPreviewPane(appFitPreviewPane); jPanel.add(appFitBrowserPane); - jPanel.add(htmlGroupPane = new MobileUseHtmlGroupPane()); + jPanel.add(htmlGroupPane = new MobileUseHtmlGroupPane(Inter.getLocText("FR-mobile_analysis_annotation"))); jPanel.add(mobileToolBarPane = new MobileToolBarPane()); diff --git a/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java b/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java index 5ddf61e560..06666ee579 100644 --- a/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java +++ b/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java @@ -23,11 +23,11 @@ public abstract class MobileUseHtmlGroupBeanPane extends BasicBeanPane { private List radioButtons = new ArrayList(); - public MobileUseHtmlGroupBeanPane() { - initComponents(); + public MobileUseHtmlGroupBeanPane(String annotation) { + initComponents(annotation); } - private void initComponents() { + private void initComponents(String annotation) { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(UITitledBorder.createBorderWithTitle(this.title4PopupWindow())); @@ -43,7 +43,7 @@ public abstract class MobileUseHtmlGroupBeanPane extends BasicBeanPane { Component[][] components = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_style")), useApp, useHTML5}, - new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_annotation")), null, null} + new Component[]{new UILabel(annotation), null, null} }; JPanel usePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); usePane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10)); diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 268f5d53d7..d3dc874ddc 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -563,3 +563,4 @@ FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_WidgetOrder=Widget Order +FR-mobile_form_analysis_annotation=annotation\: You can use this attribute to control the analysis of the form in the APP 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 b0bf16d5d7..8788145184 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 @@ -563,3 +563,4 @@ FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_WidgetOrder=Widget Order +FR-mobile_form_analysis_annotation=annotation\: You can use this attribute to control the analysis of the form in the APP 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 c8ecd5befb..43131c1140 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 @@ -567,3 +567,4 @@ FR-Designer_DS_TableData=\u6570\u636E\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6 FR-Designer_WidgetOrder=\u63A7\u4EF6\u987A\u5E8F +FR-mobile_form_analysis_annotation=\u6CE8\u91CA\uFF1A\u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u8868\u5355\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F 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 a31f317606..494e6fb30f 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 @@ -555,3 +555,4 @@ FR-Designer_DS_TableData=\u8CC7\u6599\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u633F\u4EF6\u7248\u672C\u904E\u4F4E\uFF0C\u5B58\u5728API\u4E0D\u76F8\u5BB9\uFF0C\u8ACB\u806F\u7CFB\u958B\u767C\u8005\u965E\u7D1A\u633F\u4EF6 FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F +FR-mobile_form_analysis_annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u8868\u55AE\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F \ No newline at end of file diff --git a/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java b/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java index eb53e8f8cc..0f45ce212c 100644 --- a/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java +++ b/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java @@ -36,7 +36,7 @@ public class FormMobileAttrPane extends BasicBeanPane{ jPanel2.setLayout(FRGUIPaneFactory.createBorderLayout()); jPanel2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); this.mobileToolBarPane = new MobileToolBarPane(); - this.mobileUseHtmlGroupPane = new MobileUseHtmlGroupPane(); + this.mobileUseHtmlGroupPane = new MobileUseHtmlGroupPane(Inter.getLocText("FR-mobile_form_analysis_annotation")); //设置一个JPanel包裹mobileToolBarPane这个Panel,让jPanel的高度等于mobileToolBarPane高度加10,再放入this中 jPanel1.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + PADDINGHEIGHT)); jPanel2.setPreferredSize(new Dimension(0, (int)this.mobileUseHtmlGroupPane.getPreferredSize().getHeight() + PADDINGHEIGHT)); diff --git a/designer_form/src/com/fr/design/form/mobile/MobileUseHtmlGroupPane.java b/designer_form/src/com/fr/design/form/mobile/MobileUseHtmlGroupPane.java index 45550a8420..ab400d4a30 100644 --- a/designer_form/src/com/fr/design/form/mobile/MobileUseHtmlGroupPane.java +++ b/designer_form/src/com/fr/design/form/mobile/MobileUseHtmlGroupPane.java @@ -8,6 +8,10 @@ import com.fr.form.main.mobile.FormMobileAttr; * Created by fanglei on 2016/12/28. */ public class MobileUseHtmlGroupPane extends MobileUseHtmlGroupBeanPane { + public MobileUseHtmlGroupPane(String annotation) { + super(annotation); + } + @Override public void populateBean(FormMobileAttr mobileAttr) { if(mobileAttr != null) { From 8abb491cb449c57da947501e3f166e22421f9942 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Thu, 23 Feb 2017 19:55:25 +0800 Subject: [PATCH 107/127] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java | 2 -- designer_base/src/com/fr/design/locale/designer.properties | 3 +++ .../src/com/fr/design/locale/designer_en_US.properties | 3 +++ .../src/com/fr/design/locale/designer_zh_CN.properties | 3 +++ .../src/com/fr/design/locale/designer_zh_TW.properties | 3 +++ .../src/com/fr/design/form/mobile/FormMobileAttrPane.java | 2 +- 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java b/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java index d70ad4c398..06666ee579 100644 --- a/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java +++ b/designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java @@ -45,8 +45,6 @@ public abstract class MobileUseHtmlGroupBeanPane extends BasicBeanPane { new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_style")), useApp, useHTML5}, new Component[]{new UILabel(annotation), null, null} }; - FR-mobile_form_analysis_annotation=annotation\: You can use this attribute to control the analysis of the form in the APP - JPanel usePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); usePane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10)); diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index fa84ee8d9e..272f3ca29e 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -564,3 +564,6 @@ FR-Designer_No=No FR-Designer_Pagination=Page Break FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. +FR-Designer_WidgetOrder=Widget Order +FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP \ 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 e409147efc..8538ec99ff 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 @@ -565,3 +565,6 @@ FR-Designer_No=No FR-Designer_Pagination=Page Break FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. +FR-Designer_WidgetOrder=Widget Order +FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP 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 367884033e..33e6a7e6e2 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 @@ -569,3 +569,6 @@ FR-Designer_No=\u5426 FR-Designer_Pagination=\u5206\u9875 FR-Designer_DS_TableData=\u6570\u636E\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6 +FR-Designer_WidgetOrder=\u63A7\u4EF6\u987A\u5E8F +FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CA\uFF1A\u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u8868\u5355\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F 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 95aba53fff..caeda5b0fc 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 @@ -557,3 +557,6 @@ FR-Designer_No=\u5426 FR-Designer_Pagination=\u5206\u9801 FR-Designer_DS_TableData=\u8CC7\u6599\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F +FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u904E\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8ACB\u806F\u7E6B\u958B\u767C\u8005\u5347\u7D1A\u63D2\u4EF6 +FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F +FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u8868\u55AE\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F diff --git a/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java b/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java index 0f45ce212c..6dc1f20efd 100644 --- a/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java +++ b/designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java @@ -36,7 +36,7 @@ public class FormMobileAttrPane extends BasicBeanPane{ jPanel2.setLayout(FRGUIPaneFactory.createBorderLayout()); jPanel2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); this.mobileToolBarPane = new MobileToolBarPane(); - this.mobileUseHtmlGroupPane = new MobileUseHtmlGroupPane(Inter.getLocText("FR-mobile_form_analysis_annotation")); + this.mobileUseHtmlGroupPane = new MobileUseHtmlGroupPane(Inter.getLocText("FR-Designer_Mobile_Form_Analysis_Annotation")); //设置一个JPanel包裹mobileToolBarPane这个Panel,让jPanel的高度等于mobileToolBarPane高度加10,再放入this中 jPanel1.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + PADDINGHEIGHT)); jPanel2.setPreferredSize(new Dimension(0, (int)this.mobileUseHtmlGroupPane.getPreferredSize().getHeight() + PADDINGHEIGHT)); From 7e7c6f9983f04d9547e7af2ab3a15aff38c2e0a7 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Fri, 24 Feb 2017 09:41:02 +0800 Subject: [PATCH 108/127] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/report/mobile/ReportMobileAttrPane.java | 2 +- designer_base/src/com/fr/design/locale/designer.properties | 3 ++- .../src/com/fr/design/locale/designer_en_US.properties | 1 + .../src/com/fr/design/locale/designer_zh_CN.properties | 1 + .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java b/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java index e062b64cc3..e91d1d3b84 100644 --- a/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java +++ b/designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java @@ -34,7 +34,7 @@ public class ReportMobileAttrPane extends BasicBeanPane{ appFitBrowserPane.setAppFitPreviewPane(appFitPreviewPane); jPanel.add(appFitBrowserPane); - jPanel.add(htmlGroupPane = new MobileUseHtmlGroupPane(Inter.getLocText("FR-mobile_analysis_annotation"))); + jPanel.add(htmlGroupPane = new MobileUseHtmlGroupPane(Inter.getLocText("FR-Designer_Mobile_Report_Analysis_Annotation"))); jPanel.add(mobileToolBarPane = new MobileToolBarPane()); diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 272f3ca29e..cd0440813d 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -566,4 +566,5 @@ FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_WidgetOrder=Widget Order -FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP \ No newline at end of file +FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP +FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid \ 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 8538ec99ff..47afa410c1 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 @@ -568,3 +568,4 @@ FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_WidgetOrder=Widget Order FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP +FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid \ 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 33e6a7e6e2..b85d0a192c 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 @@ -572,3 +572,4 @@ FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6 FR-Designer_WidgetOrder=\u63A7\u4EF6\u987A\u5E8F FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CA\uFF1A\u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u8868\u5355\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F +FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CA\: \u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u62A5\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9875\u9884\u89C8\uFF0C\u586B\u62A5\u9884\u89C8\u65F6\u5C5E\u6027\u65E0\u6548. \ 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 caeda5b0fc..48ee886d3b 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 @@ -560,3 +560,4 @@ FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u904E\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8ACB\u806F\u7E6B\u958B\u767C\u8005\u5347\u7D1A\u63D2\u4EF6 FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u8868\u55AE\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F +FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u5831\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9801\u9810\u89BD\uFF0C\u586B\u5831\u9810\u89BD\u6642\u5C6C\u6027\u7121\u6548 \ No newline at end of file From 7d077a4653ac392a379f816db3f45db158b4f4f4 Mon Sep 17 00:00:00 2001 From: zhouping Date: Fri, 24 Feb 2017 17:33:36 +0800 Subject: [PATCH 109/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20tab?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E5=AD=97=E4=BD=93=E3=80=81=E5=AD=97=E5=8F=B7?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E4=BF=AE=E6=94=B9=EF=BC=8Crelease=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=88=B0dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/cardlayout/XCardSwitchButton.java | 10 +--- .../creator/cardlayout/XWTabFitLayout.java | 51 ++----------------- 2 files changed, 6 insertions(+), 55 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index effa8856ed..04e678029c 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -48,7 +48,6 @@ public class XCardSwitchButton extends XButton { //设置的图片类型 private static final String COLOR_BACKGROUND_TYPE = "ColorBackground"; private static final String DEFAULT_TYPE = "default"; - private static final String DEFAULT_FONT_NAME = "SimSun"; //默认颜色 public static final Color NORMAL_GRAL = new Color(236,236,236); @@ -67,7 +66,6 @@ public class XCardSwitchButton extends XButton { private static final int FONT_SIZE_ADJUST = 2; private static final int SIDE_OFFSET = 57; - private static final int FONT_SIZE = 9; private XWCardLayout cardLayout; private XWCardTagLayout tagLayout; @@ -345,10 +343,7 @@ public class XCardSwitchButton extends XButton { // 标题部分 WidgetTitle title = style.getTitle(); - FRFont font = button.getFont(); - if (font == null) { - font = FRFont.getInstance(DEFAULT_FONT_NAME, 0, FONT_SIZE); - } + FRFont font = title.getFrFont(); FRFont newFont = FRFont.getInstance(font.getName(),font.getStyle(),font.getSize() + FONT_SIZE_ADJUST); UILabel label = this.getContentLabel(); label.setFont(newFont); @@ -427,9 +422,6 @@ public class XCardSwitchButton extends XButton { XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); CardSwitchButton cardSwitchButton = (CardSwitchButton) temp.toData(); FRFont frFont = cardSwitchButton.getFont(); - if (frFont == null) { - frFont = FRFont.getInstance(DEFAULT_FONT_NAME, 0, FONT_SIZE); - } UILabel label = temp.getContentLabel(); label.setSize(dimension); label.setFont(frFont.applyResolutionNP(ScreenResolution.getScreenResolution())); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index f4cac3e15c..ee74339a98 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -1,11 +1,5 @@ package com.fr.design.designer.creator.cardlayout; -import java.awt.*; -import java.beans.IntrospectionException; - -import javax.swing.border.Border; - -import com.fr.base.ScreenResolution; import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRTabFitLayoutAdapter; @@ -16,25 +10,25 @@ import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.fun.WidgetPropertyUIProvider; -import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormHierarchyTreePane; import com.fr.design.mainframe.widget.editors.ButtonTypeEditor; -import com.fr.design.mainframe.widget.editors.FontEditor; import com.fr.design.mainframe.widget.editors.ImgBackgroundEditor; -import com.fr.design.mainframe.widget.renderer.FontCellRenderer; import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; -import com.fr.general.FRFont; import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.core.PropertyChangeAdapter; +import javax.swing.border.Border; +import java.awt.*; +import java.beans.IntrospectionException; + /** * @author focus @@ -46,14 +40,10 @@ public class XWTabFitLayout extends XWFitLayout { // tab布局在拖拽导致的缩放里(含间隔时),如果拖拽宽高大于组件宽高,会导致调整的时候找不到原来的组件 // 这里先将拖拽之前的宽高先做备份 private static final Color NORMAL_GRAL = new Color(236,236,236); - private static final String DEFAULT_FONT_NAME = "SimSun"; - public final static Font DEFAULTFT = new Font("Song_TypeFace",0,12); - public final static FRFont DEFAULT_FRFT = FRFont.getInstance(DEFAULT_FONT_NAME, 0, 9); private Dimension referDim; private Background initialBackground; private Background overBackground; private Background clickBackground; - private FRFont font; private XCardSwitchButton xCardSwitchButton; public Dimension getReferDim() { @@ -88,15 +78,6 @@ public class XWTabFitLayout extends XWFitLayout { this.clickBackground = clickBackground; } - @Override - public FRFont getFont() { - return font; - } - - public void setFont(FRFont font) { - this.font = font; - } - public XCardSwitchButton getxCardSwitchButton() { return xCardSwitchButton; } @@ -164,21 +145,7 @@ public class XWTabFitLayout extends XWFitLayout { cardSwitchButton.setClickBackground(clickBackground); } } - ), - //字体 - creatNonListenerStyle(4).setPropertyChangeListener( - new PropertyChangeAdapter() { - @Override - public void propertyChange() { - font = ((WTabFitLayout) data).getFont(); - CardSwitchButton cardSwitchButton = (CardSwitchButton) xCardSwitchButton.toData(); - cardSwitchButton.setFont(font); - UILabel uiLabel = xCardSwitchButton.getLabel(); - uiLabel.setFont(font.applyResolutionNP(ScreenResolution.getScreenResolution())); - uiLabel.setForeground(font.getForeground()); - xCardSwitchButton.setLabel(uiLabel); - } - }), + ) }; } @@ -210,9 +177,6 @@ public class XWTabFitLayout extends XWFitLayout { XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), new CRPropertyDescriptor("clickBackground", this.data.getClass()).setEditorClass( ImgBackgroundEditor.class).setI18NName(Inter.getLocText("FR-Designer_Background-Click")).putKeyValue( - XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), - new CRPropertyDescriptor("font", this.data.getClass()).setI18NName(Inter.getLocText("FR-Designer_FRFont")) - .setEditorClass(FontEditor.class).setRendererClass(FontCellRenderer.class).putKeyValue( XCreatorConstants.PROPERTY_CATEGORY, "Advanced") }; return crPropertyDescriptors[i]; @@ -243,20 +207,15 @@ public class XWTabFitLayout extends XWFitLayout { if (!isStyle) { this.xCardSwitchButton.setCustomStyle(false); this.xCardSwitchButton.setSelectBackground(bg); - this.xCardSwitchButton.getLabel().setFont(DEFAULTFT); cardSwitchButton.setInitialBackground(null); cardSwitchButton.setClickBackground(null); cardSwitchButton.setOverBackground(null); - cardSwitchButton.setFont(DEFAULT_FRFT); } else { Background initialBackground = cardSwitchButton.getInitialBackground(); bg = initialBackground == null ? bg : initialBackground; this.xCardSwitchButton.setSelectBackground(bg); this.xCardSwitchButton.setCustomStyle(true); cardSwitchButton.setCustomStyle(true); - if (font != null) { - cardSwitchButton.setFont(font); - } if (this.initialBackground != null){ this.xCardSwitchButton.setSelectBackground(this.initialBackground); cardSwitchButton.setInitialBackground(this.initialBackground); From d191a6303661583e41e52ebe9cf3b53499292dc8 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Fri, 24 Feb 2017 17:52:06 +0800 Subject: [PATCH 110/127] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E5=B0=91?= =?UTF-8?q?=E4=BA=86=E5=8F=A5=E5=8F=B7?= 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 | 4 ++-- .../src/com/fr/design/locale/designer_zh_CN.properties | 4 ++-- .../src/com/fr/design/locale/designer_zh_TW.properties | 4 ++-- 4 files changed, 7 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 cd0440813d..423f8c42c1 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -567,4 +567,4 @@ FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_WidgetOrder=Widget Order FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP -FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid \ No newline at end of file +FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid. \ 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 47afa410c1..b0acea3ab4 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 @@ -567,5 +567,5 @@ FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_WidgetOrder=Widget Order -FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP -FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid \ No newline at end of file +FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP. +FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid. \ 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 b85d0a192c..bdb97b094e 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 @@ -571,5 +571,5 @@ FR-Designer_DS_TableData=\u6570\u636E\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6 FR-Designer_WidgetOrder=\u63A7\u4EF6\u987A\u5E8F -FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CA\uFF1A\u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u8868\u5355\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F -FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CA\: \u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u62A5\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9875\u9884\u89C8\uFF0C\u586B\u62A5\u9884\u89C8\u65F6\u5C5E\u6027\u65E0\u6548. \ No newline at end of file +FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CA\uFF1A\u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u8868\u5355\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\u3002 +FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CA\: \u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u62A5\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9875\u9884\u89C8\uFF0C\u586B\u62A5\u9884\u89C8\u65F6\u5C5E\u6027\u65E0\u6548\u3002 \ 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 48ee886d3b..3acd7487c2 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 @@ -559,5 +559,5 @@ FR-Designer_DS_TableData=\u8CC7\u6599\u96C6 FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u904E\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8ACB\u806F\u7E6B\u958B\u767C\u8005\u5347\u7D1A\u63D2\u4EF6 FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F -FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u8868\u55AE\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F -FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u5831\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9801\u9810\u89BD\uFF0C\u586B\u5831\u9810\u89BD\u6642\u5C6C\u6027\u7121\u6548 \ No newline at end of file +FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u8868\u55AE\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\u3002 +FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u5831\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9801\u9810\u89BD\uFF0C\u586B\u5831\u9810\u89BD\u6642\u5C6C\u6027\u7121\u6548\u3002 \ No newline at end of file From 04bba80e9f190fc6e22ad6d94abc8939aed5caa0 Mon Sep 17 00:00:00 2001 From: fanglei <294531121> Date: Fri, 24 Feb 2017 17:53:11 +0800 Subject: [PATCH 111/127] =?UTF-8?q?=E8=A1=A5=E4=B8=8A=E5=8F=A5=E5=8F=B7?= 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 423f8c42c1..0a66c326e8 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -566,5 +566,5 @@ FR-Designer_DS_TableData=Data Set FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_WidgetOrder=Widget Order -FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP +FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP. FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid. \ No newline at end of file From b388a85042d384f76b0036ddbaa55fc30c3e70ec Mon Sep 17 00:00:00 2001 From: fr_shine Date: Mon, 27 Feb 2017 09:39:29 +0800 Subject: [PATCH 112/127] editlabel not append origin label --- .../mainframe/chart/gui/UIEditLabel.java | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java index ceca4f9dce..c7c3c51c78 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/UIEditLabel.java @@ -161,35 +161,47 @@ public class UIEditLabel extends JPanel implements UIObserver{ return text; } + protected boolean appendOriginalLabel() { + return true; + } + private void stopEditing(){ isEditingStopped = true; this.removeAll(); - String text =this.showLabel.getText(); - text = StringUtils.cutStringEndWith(text,":"); - text = !ComparatorUtils.equals(text, this.originalLabel) ? - StringUtils.perfectEnd(text, "(" + this.originalLabel + ")"): this.originalLabel; - showLabel.setText(StringUtils.perfectEnd(text,":")); + if(appendOriginalLabel()) { + String text = this.showLabel.getText(); + text = StringUtils.cutStringEndWith(text, ":"); + text = !ComparatorUtils.equals(text, this.originalLabel) ? + StringUtils.perfectEnd(text, "(" + this.originalLabel + ")") : this.originalLabel; + showLabel.setText(StringUtils.perfectEnd(text, ":")); + } this.add(showLabel, BorderLayout.CENTER); this.revalidate(); this.repaint(); } public String getText(){ - String text =this.showLabel.getText(); - text = StringUtils.cutStringEndWith(text,":"); - return StringUtils.cutStringEndWith(text,"("+this.originalLabel+")"); + if(appendOriginalLabel()) { + String text = this.showLabel.getText(); + text = StringUtils.cutStringEndWith(text, ":"); + return StringUtils.cutStringEndWith(text, "(" + this.originalLabel + ")"); + } else { + return this.showLabel.getText(); + } } public void setText(String text){ - if(text == null || StringUtils.isEmpty(text)){ - this.showLabel.setText(this.originalLabel); - return; - } - if(!ComparatorUtils.equals(text,originalLabel)){ - text = StringUtils.cutStringEndWith(text, ":"); - text = StringUtils.perfectEnd(text,"("+originalLabel+")"); + if(appendOriginalLabel()) { + if (text == null || StringUtils.isEmpty(text)) { + this.showLabel.setText(this.originalLabel); + return; + } + if (!ComparatorUtils.equals(text, originalLabel)) { + text = StringUtils.cutStringEndWith(text, ":"); + text = StringUtils.perfectEnd(text, "(" + originalLabel + ")"); + } + text = StringUtils.perfectEnd(text, ":"); } - text = StringUtils.perfectEnd(text,":"); this.showLabel.setText(text); } From d2730c56f7790ce1ea070d739d13e4dfcf9aebc3 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 27 Feb 2017 10:49:39 +0800 Subject: [PATCH 113/127] =?UTF-8?q?=E6=97=A0=E4=BB=BB=E5=8A=A1=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beans/adapters/layout/FRBodyLayoutAdapter.java | 6 +++--- .../adapters/layout/FRTabFitLayoutAdapter.java | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java index 8db19d9fba..b3072667b2 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java @@ -6,6 +6,7 @@ import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.PaddingMargin; +import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; import com.fr.general.ComparatorUtils; @@ -639,9 +640,8 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter { * 又通过ComponentUtils.getRelativeBounds()方法获取到了绝对坐标, * 再次计算相对坐标,所以将y值重新变成绝对坐标。 * */ - if (currentCreator.getParent().getParent().getComponent(0) instanceof XWParameterLayout) { - int high = currentCreator.getParent().getParent().getComponent(0).getHeight(); - y = y + WCardMainBorderLayout.TAB_HEIGHT + high; + if (currentCreator.getBackupParent().getLocation().y == WBorderLayout.DEFAULT_SIZE) { + y = y + WCardMainBorderLayout.TAB_HEIGHT + WBorderLayout.DEFAULT_SIZE; } else { y = y + WCardMainBorderLayout.TAB_HEIGHT; } diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java index f0ccc3eb8f..63a70e1bb8 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java @@ -15,6 +15,7 @@ import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; import com.fr.design.designer.properties.FRTabFitLayoutPropertiesGroupModel; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.LayoutBorderStyle; +import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; import com.fr.general.ComparatorUtils; @@ -92,16 +93,16 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter { private int adjustY(int y, XWTabFitLayout tabLayout) { XWCardLayout cardLayout = (XWCardLayout) tabLayout.getBackupParent(); LayoutBorderStyle style = cardLayout.toData().getBorderStyle(); - if (container.getParent().getComponent(0) instanceof XWParameterLayout) { - y = y - container.getParent().getComponent(0).getHeight() - container.getParent().getComponent(0).getY(); + if (container.getLocation().y == WBorderLayout.DEFAULT_SIZE) { + y = y - WBorderLayout.DEFAULT_SIZE; } if (ComparatorUtils.equals(style.getType(), LayoutBorderStyle.TITLE)) { - y -= WCardMainBorderLayout.TAB_HEIGHT; + y = y - WCardMainBorderLayout.TAB_HEIGHT; } return y; } - protected Rectangle getLayoutBound(XWCardMainBorderLayout mainLayout){ - return ComponentUtils.getRelativeBounds(mainLayout); - } + protected Rectangle getLayoutBound(XWCardMainBorderLayout mainLayout) { + return ComponentUtils.getRelativeBounds(mainLayout); + } } \ No newline at end of file From 81e5c2aacf71ce0ee3b6b9349b3017a8e309952b Mon Sep 17 00:00:00 2001 From: yaohwu Date: Mon, 27 Feb 2017 20:21:52 +0800 Subject: [PATCH 114/127] =?UTF-8?q?=E2=80=9CREPORT-2030=E5=88=A0=E9=99=A4d?= =?UTF-8?q?esigner=E5=AF=B9=E8=AF=9D=E6=A1=86=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/exe/ModifyStatusExecutor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/extra/exe/ModifyStatusExecutor.java b/designer_base/src/com/fr/design/extra/exe/ModifyStatusExecutor.java index c544858dd8..a61f35e2d1 100644 --- a/designer_base/src/com/fr/design/extra/exe/ModifyStatusExecutor.java +++ b/designer_base/src/com/fr/design/extra/exe/ModifyStatusExecutor.java @@ -42,7 +42,9 @@ public class ModifyStatusExecutor implements Executor { plugin.setActive(active); try { FRContext.getCurrentEnv().writePlugin(plugin); - PluginWebBridge.getHelper().showRestartMessage(plugin.isActive() ? Inter.getLocText("FR-Designer-Plugin_Has_Been_Actived") : Inter.getLocText("FR-Designer-Plugin_Has_Been_Disabled")); + /* + * PluginWebBridge.getHelper().showRestartMessage(plugin.isActive() ? Inter.getLocText("FR-Designer-Plugin_Has_Been_Actived") : Inter.getLocText("FR-Designer-Plugin_Has_Been_Disabled")); + **/ } catch (Exception e) { FRContext.getLogger().error(e.getMessage()); } From 0bcbfe576d113b328a13bae3654e72615ecdfdd0 Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 28 Feb 2017 16:57:34 +0800 Subject: [PATCH 115/127] =?UTF-8?q?REPORT-1980=20=E6=8D=A2=E6=88=90listmap?= =?UTF-8?q?=E7=BB=B4=E6=8C=81=E5=8E=9F=E6=9C=89=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/frpane/HyperlinkGroupPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java b/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java index 112fa54dc2..99fc5948e5 100644 --- a/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java @@ -13,6 +13,7 @@ import com.fr.js.JavaScript; import com.fr.js.NameJavaScript; import com.fr.js.NameJavaScriptGroup; import com.fr.plugin.PluginManager; +import com.fr.stable.ListMap; import com.fr.stable.Nameable; import java.util.ArrayList; @@ -34,7 +35,7 @@ public class HyperlinkGroupPane extends JListControlPane { * @return 返回Nameable按钮数组. */ public NameableCreator[] createNameableCreators() { - Map nameCreators = new TreeMap(); + Map nameCreators = new ListMap<>(); NameableCreator[] creators = DesignModuleFactory.getHyperlinkGroupType().getHyperlinkCreators(); for (NameableCreator creator : creators) { nameCreators.put(creator.menuName(), creator); From 7f7841b8036b2f4d3a7e788ba0143ec33774ecf8 Mon Sep 17 00:00:00 2001 From: mengao Date: Wed, 1 Mar 2017 09:20:48 +0800 Subject: [PATCH 116/127] =?UTF-8?q?=E5=88=86=E4=B8=A4=E8=A1=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BAcheckbox=E5=92=8C=E8=BE=93=E5=85=A5=E6=A1=86=EF=BC=8C?= =?UTF-8?q?=E9=80=82=E5=BA=94=E5=9B=BD=E9=99=85=E5=8C=96=E6=83=85=E5=86=B5?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/chart/axis/MinMaxValuePane.java | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java index d717d31a8d..73235dc31f 100644 --- a/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java +++ b/designer_chart/src/com/fr/design/chart/axis/MinMaxValuePane.java @@ -42,14 +42,14 @@ public class MinMaxValuePane extends JPanel { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { p, f }; - double[] rowSize = { p, p, p, p}; + double[] rowSize = { p, p, p, p, p, p, p, p}; Component[][] components = getPanelComponents(); JPanel panel = TableLayoutHelper.createTableLayoutPane(components ,rowSize,columnSize); this.setLayout(new BorderLayout()); this.add(panel,BorderLayout.CENTER); - for(int i = 0; i < components.length; i++) { + for(int i = 0; i < components.length; i+=2) { ((UICheckBox)components[i][0]).addActionListener(new ActionListener() { @Override @@ -57,18 +57,21 @@ public class MinMaxValuePane extends JPanel { checkBoxUse(); } }); - ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i][1]); + ChartSwingUtils.addListener((UICheckBox)components[i][0], (UITextField)components[i+1][0]); } } - - protected Component[][] getPanelComponents() { - return new Component[][]{ - new Component[]{minCheckBox, minValueField}, - new Component[]{maxCheckBox, maxValueField}, - new Component[]{isCustomMainUnitBox, mainUnitField}, - new Component[]{isCustomSecUnitBox, secUnitField}, - }; - } + protected Component[][] getPanelComponents() { + return new Component[][]{ + new Component[]{minCheckBox}, + new Component[]{minValueField}, + new Component[]{maxCheckBox}, + new Component[]{maxValueField}, + new Component[]{isCustomMainUnitBox}, + new Component[]{mainUnitField}, + new Component[]{isCustomSecUnitBox}, + new Component[]{secUnitField}, + }; + } private void checkBoxUse() { minValueField.setEnabled(minCheckBox.isSelected()); From 015d53588ee29394deeae6335c8fbd4a41b85d6f Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 1 Mar 2017 11:06:02 +0800 Subject: [PATCH 117/127] =?UTF-8?q?REPORT-1858=20frm=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/designer/creator/XChartEditor.java | 7 +++++++ .../src/com/fr/design/designer/creator/XCreator.java | 8 ++++++++ .../com/fr/design/designer/creator/XElementCase.java | 7 +++++++ .../fr/design/designer/creator/XWidgetCreator.java | 11 ++++++++++- .../com/fr/design/gui/xtable/PropertyGroupModel.java | 3 +++ 5 files changed, 35 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XChartEditor.java b/designer_form/src/com/fr/design/designer/creator/XChartEditor.java index 605532ab13..2ac2c12e35 100644 --- a/designer_form/src/com/fr/design/designer/creator/XChartEditor.java +++ b/designer_form/src/com/fr/design/designer/creator/XChartEditor.java @@ -85,6 +85,13 @@ public class XChartEditor extends XBorderStyleWidgetCreator { return new CRPropertyDescriptor[] { new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter .getLocText("Form-Widget_Name")), + new CRPropertyDescriptor("visible", this.data.getClass()).setI18NName( + Inter.getLocText("FR-Designer_Widget-Visible")).setPropertyChangeListener(new PropertyChangeAdapter() { + + @Override + public void propertyChange() { + makeVisible(toData().isVisible());} + }), new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( WLayoutBorderStyleEditor.class).setI18NName( Inter.getLocText("Chart-Style_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") diff --git a/designer_form/src/com/fr/design/designer/creator/XCreator.java b/designer_form/src/com/fr/design/designer/creator/XCreator.java index ba2a56ce0e..4788bc8f3c 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreator.java @@ -379,6 +379,14 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo toData().setWidgetName(name); } + /** + * 重置组件的可见性 + * @param visible 可见性 + */ + public void resetVisible(boolean visible){ + toData().setVisible(visible); + } + /** * 返回编辑的子组件,scale为其内部组件 * @return 组件 diff --git a/designer_form/src/com/fr/design/designer/creator/XElementCase.java b/designer_form/src/com/fr/design/designer/creator/XElementCase.java index a932548cc5..7b6dac0e85 100644 --- a/designer_form/src/com/fr/design/designer/creator/XElementCase.java +++ b/designer_form/src/com/fr/design/designer/creator/XElementCase.java @@ -83,6 +83,13 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme CRPropertyDescriptor[] propertyTableEditor = new CRPropertyDescriptor[]{ new CRPropertyDescriptor("widgetName", this.data.getClass()) .setI18NName(Inter.getLocText("Form-Widget_Name")), + new CRPropertyDescriptor("visible", this.data.getClass()).setI18NName( + Inter.getLocText("FR-Designer_Widget-Visible")).setPropertyChangeListener(new PropertyChangeAdapter() { + + @Override + public void propertyChange() { + makeVisible(toData().isVisible());} + }), new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( WLayoutBorderStyleEditor.class).setI18NName( Inter.getLocText("FR-Designer-Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") diff --git a/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java b/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java index 3832f35d21..2c1be0eab4 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java @@ -145,7 +145,16 @@ public abstract class XWidgetCreator extends XCreator { this.draw(); } } - + + /** + * 渲染Painter + */ + public void paint(Graphics g) { + //不可见时,按钮.4f透明 + AlphaComposite composite = this.data.isVisible() ? (AlphaComposite)((Graphics2D)g).getComposite() : AlphaComposite.getInstance(AlphaComposite.SRC_OVER,HALF_OPACITY); + ((Graphics2D)g).setComposite(composite); + super.paint(g); + } /** * 重命名 * diff --git a/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java b/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java index 8e8cadad14..bb0f0cd3a4 100644 --- a/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java +++ b/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java @@ -53,6 +53,9 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel { if(ComparatorUtils.equals(FormConstants.NAME, properties[row].getName())){ creator.resetCreatorName(value.toString()); } + if(ComparatorUtils.equals("visible", properties[row].getName())){ + creator.resetVisible((boolean) value); + } properties[row].firePropertyChanged(); return true; } catch (Exception e) { From 505dd7e910bbce249e9886b229d278bc20c58cb9 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 1 Mar 2017 17:03:59 +0800 Subject: [PATCH 118/127] =?UTF-8?q?REPORT-1957=EF=BC=8C=E5=B9=B6=E4=B8=94?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0=E8=AF=B4=E6=98=8E=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=96=87=E4=BB=B6=E7=9A=84=E7=BC=96=E7=A0=81=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E4=B8=BAutf-8,=E5=8A=A0=E8=BD=BD=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=97=B6=E4=BD=BF=E7=94=A8utf-8=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/FormulaPane.java | 221 +++++++++--------- .../design/insert/formula/variable/cn/$$$.txt | 2 +- .../formula/variable/cn/$$page_number.txt | 2 +- .../variable/cn/$$totalPage_number.txt | 2 +- .../formula/variable/cn/$fr_authority.txt | 2 +- .../formula/variable/cn/$fr_username.txt | 2 +- .../formula/variable/cn/$fr_userposition.txt | 4 +- .../insert/formula/variable/cn/NOFILTER.txt | 2 +- .../insert/formula/variable/cn/NULL.txt | 2 +- .../formula/variable/cn/contextPath.txt | 4 +- .../insert/formula/variable/cn/curReport.txt | 2 +- .../formula/variable/cn/formletName.txt | 4 +- .../formula/variable/cn/fr_submitinfo.txt | 2 +- .../insert/formula/variable/cn/reportName.txt | 4 +- .../insert/formula/variable/cn/serverName.txt | 4 +- .../insert/formula/variable/cn/serverPort.txt | 2 +- .../formula/variable/cn/serverSchema.txt | 4 +- .../insert/formula/variable/cn/serverURL.txt | 4 +- .../insert/formula/variable/cn/servletURL.txt | 3 +- .../insert/formula/variable/cn/sessionID.txt | 5 +- .../design/insert/formula/variable/en/$$$.txt | 2 +- .../formula/variable/en/$fr_authority.txt | 2 +- .../formula/variable/en/$fr_username.txt | 2 +- .../formula/variable/en/$fr_userposition.txt | 2 +- .../insert/formula/variable/en/NOFILTER.txt | 2 +- .../formula/variable/en/contextPath.txt | 2 +- .../formula/variable/en/formletName.txt | 4 +- .../formula/variable/en/fr_submitinfo.txt | 2 +- .../insert/formula/variable/en/reportName.txt | 4 +- .../insert/formula/variable/en/serverName.txt | 4 +- .../formula/variable/en/serverSchema.txt | 4 +- .../insert/formula/variable/en/serverURL.txt | 4 +- .../insert/formula/variable/en/servletURL.txt | 3 +- 33 files changed, 146 insertions(+), 168 deletions(-) diff --git a/designer_base/src/com/fr/design/formula/FormulaPane.java b/designer_base/src/com/fr/design/formula/FormulaPane.java index 9aec1972a0..9ef2e4b2be 100644 --- a/designer_base/src/com/fr/design/formula/FormulaPane.java +++ b/designer_base/src/com/fr/design/formula/FormulaPane.java @@ -22,6 +22,7 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import com.fr.parser.FRLexer; import com.fr.parser.FRParser; +import com.fr.stable.EncodeConstants; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.stable.script.Expression; @@ -38,12 +39,14 @@ import java.awt.event.*; import java.io.*; import java.util.Locale; import java.util.Set; + /** * 公式编辑面板 + * * @editor zhou * @since 2012-3-29下午1:50:53 */ -public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ +public class FormulaPane extends BasicPane implements KeyListener, UIFormula { protected VariableTreeAndDescriptionArea variableTreeAndDescriptionArea; protected RSyntaxTextArea formulaTextArea; @@ -62,17 +65,17 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ public FormulaPane() { initComponents(); } - - private void initFormulaTextAreaKeyListener(){ - formulaTextArea.addKeyListener(this); - formulaTextArea.addKeyListener(new KeyAdapter() { + + private void initFormulaTextAreaKeyListener() { + formulaTextArea.addKeyListener(this); + formulaTextArea.addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent e) { formulaTextArea.setForeground(Color.black); 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-Designer_FormulaPane_Tips"); - if(text.contains(tip)) { + if (text.contains(tip)) { text = text.substring(0, text.indexOf(tip)); insertPosition = 0; formulaTextArea.setText(text); @@ -80,9 +83,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } }); } - - private void initFormulaTextAreaMouseListener(){ - formulaTextArea.addMouseListener(new MouseAdapter() { + + private void initFormulaTextAreaMouseListener() { + formulaTextArea.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { insertPosition = formulaTextArea.getCaretPosition(); @@ -106,22 +109,24 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } }); } - - private void initFormulaTextArea(){ - formulaTextArea = new RSyntaxTextArea(); + + private void initFormulaTextArea() { + formulaTextArea = new RSyntaxTextArea(); configFormulaArea(); initFormulaTextAreaKeyListener(); initFormulaTextAreaMouseListener(); } - - private void initKeyWordTextFieldKeyListener(){ - keyWordTextField.addKeyListener(new KeyListener() { + + private void initKeyWordTextFieldKeyListener() { + keyWordTextField.addKeyListener(new KeyListener() { @Override public void keyTyped(KeyEvent e) { } + @Override public void keyReleased(KeyEvent e) { } + @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { @@ -133,9 +138,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } }); } - - private void initTipsPane(){ - // tipsPane + + private void initTipsPane() { + // tipsPane JPanel tipsPane = new JPanel(new BorderLayout(4, 4)); this.add(tipsPane, BorderLayout.EAST); @@ -161,7 +166,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } }); } - + protected void initComponents() { this.setLayout(new BorderLayout(4, 4)); // text @@ -172,7 +177,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ + " "); formulaLabel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); initFormulaTextArea(); - + UIScrollPane formulaTextAreaScrollPane = new UIScrollPane(formulaTextArea); formulaTextAreaScrollPane.setBorder(null); textPane.add(formulaLabel, BorderLayout.NORTH); @@ -259,6 +264,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ this.formulaTextArea.setText(StringUtils.EMPTY); } } + //hugh:为啥会是10呢?搞不懂~~~ private static final int KEY_10 = 10; //上下左右 @@ -266,6 +272,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ private static final int KEY_38 = 38; private static final int KEY_39 = 39; private static final int KEY_40 = 40; + @Override public void keyReleased(KeyEvent e) { int key = e.getKeyCode(); @@ -452,10 +459,10 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ formulaTextArea.requestFocus(); insertPosition = formulaTextArea.getCaretPosition(); } - + @Override protected String title4PopupWindow() { - return Inter.getLocText("FormulaD-Formula_Definition"); + return Inter.getLocText("FormulaD-Formula_Definition"); } /** @@ -561,9 +568,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ public VariableTreeAndDescriptionArea() { this.initComponents(); } - - private void initFunctionTypeList(JPanel functionPane){ - functionTypeList = new QuickList(functionTypeListModel); + + private void initFunctionTypeList(JPanel functionPane) { + functionTypeList = new QuickList(functionTypeListModel); UIScrollPane functionTypeScrollPane = new UIScrollPane(functionTypeList); functionTypeScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); functionTypeScrollPane.setPreferredSize(new Dimension(140, 200)); @@ -572,23 +579,23 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ initGroupTypeModel(); initTypeListSelectionListener(); } - - private void initTypeListCellRenderer(){ - functionTypeList.setCellRenderer( - new DefaultListCellRenderer() { - @Override - public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { - super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); - if (value instanceof FunctionGroup) { - this.setText(((FunctionGroup) value).getGroupName()); - } - return this; - } - }); + + private void initTypeListCellRenderer() { + functionTypeList.setCellRenderer( + new DefaultListCellRenderer() { + @Override + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + if (value instanceof FunctionGroup) { + this.setText(((FunctionGroup) value).getGroupName()); + } + return this; + } + }); } - - private void initTypeListSelectionListener(){ - functionTypeList.addListSelectionListener(new ListSelectionListener() { + + private void initTypeListSelectionListener() { + functionTypeList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent evt) { Object selectedValue = ((JList) evt.getSource()).getSelectedValue(); if (!(selectedValue instanceof FunctionGroup)) { @@ -607,22 +614,22 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } }); } - - private void initGroupTypeModel(){ - functionTypeListModel.addElement(FunctionConstants.COMMON); - for (int i = 0; i < FunctionConstants.EMBFUNCTIONS.length; i++) { - functionTypeListModel.addElement(FunctionConstants.EMBFUNCTIONS[i]); - } - functionTypeListModel.addElement(FunctionConstants.ALL); - functionTypeListModel.addElement(FunctionConstants.CUSTOM); - functionTypeListModel.addElement(FunctionConstants.PLUGIN); - - //hugh: 从函数分组插件中添加分组 - FunctionConstants.addFunctionGroupFromPlugins(functionTypeListModel); - } - - private void initFunctionNameListCellRenderer(){ - functionNameList.setCellRenderer(new DefaultListCellRenderer() { + + private void initGroupTypeModel() { + functionTypeListModel.addElement(FunctionConstants.COMMON); + for (int i = 0; i < FunctionConstants.EMBFUNCTIONS.length; i++) { + functionTypeListModel.addElement(FunctionConstants.EMBFUNCTIONS[i]); + } + functionTypeListModel.addElement(FunctionConstants.ALL); + functionTypeListModel.addElement(FunctionConstants.CUSTOM); + functionTypeListModel.addElement(FunctionConstants.PLUGIN); + + //hugh: 从函数分组插件中添加分组 + FunctionConstants.addFunctionGroupFromPlugins(functionTypeListModel); + } + + private void initFunctionNameListCellRenderer() { + functionNameList.setCellRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { @@ -633,10 +640,10 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ return this; } }); - } - - private void initFunctionNameListSelectionListener(){ - functionNameList.addListSelectionListener(new ListSelectionListener() { + } + + private void initFunctionNameListSelectionListener() { + functionNameList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent evt) { Object selectedValue = functionNameList.getSelectedValue(); @@ -651,9 +658,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } }); } - - private void initFunctionNameListMouseListener(){ - functionNameList.addMouseListener(new MouseAdapter() { + + private void initFunctionNameListMouseListener() { + functionNameList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { if (evt.getClickCount() >= 2) { Object selectedValue = functionNameList.getSelectedValue(); @@ -675,9 +682,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } }); } - - private void initFunctionNameList(JPanel functionPane){ - functionNameList = new JList(new DefaultListModel()); + + private void initFunctionNameList(JPanel functionPane) { + functionNameList = new JList(new DefaultListModel()); UIScrollPane functionNameScrollPane = new UIScrollPane(functionNameList); functionNameScrollPane.setPreferredSize(new Dimension(140, 200)); functionPane.add( @@ -688,9 +695,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ initFunctionNameListSelectionListener(); initFunctionNameListMouseListener(); } - - private void initDescriptionTextArea(){ - // Description + + private void initDescriptionTextArea() { + // Description descriptionTextArea = new UITextArea(16, 27); UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea); @@ -710,16 +717,16 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ }); } - - private StringBuilder getText(TextUserObject selectedValue,String path) throws IOException{ - Reader desReader; - StringBuilder desBuf = new StringBuilder(); - InputStream desInputStream = BaseUtils.readResource(path+ ((TextUserObject) selectedValue).displayText+".txt"); + + private StringBuilder getText(TextUserObject selectedValue, String path) throws IOException { + Reader desReader; + StringBuilder desBuf = new StringBuilder(); + InputStream desInputStream = BaseUtils.readResource(path + ((TextUserObject) selectedValue).displayText + ".txt"); if (desInputStream == null) { String description = ""; desReader = new StringReader(description); } else { - desReader = new InputStreamReader(desInputStream); + desReader = new InputStreamReader(desInputStream, EncodeConstants.ENCODING_UTF_8); } BufferedReader reader = new BufferedReader(desReader); String lineText; @@ -732,12 +739,12 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ reader.close(); desReader.close(); return desBuf; - } - - private void initVariablesTreeSelectionListener(){ - variablesTree.addTreeSelectionListener(new TreeSelectionListener() { - public void valueChanged(TreeSelectionEvent e) { - Object selectedValue = ((DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent()).getUserObject(); + } + + private void initVariablesTreeSelectionListener() { + variablesTree.addTreeSelectionListener(new TreeSelectionListener() { + public void valueChanged(TreeSelectionEvent e) { + Object selectedValue = ((DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent()).getUserObject(); if (selectedValue == null) { return; } @@ -751,7 +758,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ path = "/com/fr/design/insert/formula/variable/en/"; } if (selectedValue instanceof TextUserObject) { - desBuf = getText((TextUserObject)selectedValue,path); + desBuf = getText((TextUserObject) selectedValue, path); } } catch (IOException exp) { FRContext.getLogger().error(exp.getMessage(), exp); @@ -761,9 +768,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ } }); } - - private void initVariablesTree(){ - // vairable. + + private void initVariablesTree() { + // vairable. variablesTree = new JTree(); UIScrollPane variablesTreePane = new UIScrollPane(variablesTree); variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); @@ -773,12 +780,12 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ variablesTree.setShowsRootHandles(true); variablesTree.addMouseListener(applyTextMouseListener); variablesTree.setCellRenderer(applyTreeCellRenderer); - + initDescriptionTextArea(); - + initVariablesTreeSelectionListener(); } - + private void initComponents() { this.setLayout(new BorderLayout(4, 4)); // Function @@ -810,10 +817,10 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ private void showPopupPane() { BasicPane basicPane = new BasicPane() { - @Override - protected String title4PopupWindow() { - return Inter.getLocText("FR-Designer_FormulaPane_Function_Detail"); - } + @Override + protected String title4PopupWindow() { + return Inter.getLocText("FR-Designer_FormulaPane_Function_Detail"); + } }; basicPane.setLayout(FRGUIPaneFactory.createBorderLayout()); UITextArea desArea = new UITextArea(); @@ -889,7 +896,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ return this; } }; - + public void populate(VariableResolver variableResolver) { // varibale tree. DefaultTreeModel variableModel = (DefaultTreeModel) variablesTree.getModel(); @@ -902,28 +909,28 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{ DefaultMutableTreeNode bindCellNode = new DefaultMutableTreeNode(new TextUserObject("$$$")); rootNode.add(bindCellNode); } - + rootNode.add(new TextFolderUserObject(Inter.getLocText("FormulaD-Data_Fields"), - BaseUtils.readIcon("/com/fr/design/images/dialog/table.png"), + BaseUtils.readIcon("/com/fr/design/images/dialog/table.png"), variableResolver.resolveColumnNames()).createMutableTreeNode()); - + // Set cutReport Variable rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Designer_FormulaPane_Variables"), - BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"), - variableResolver.resolveCurReportVariables()).createMutableTreeNode()); - + BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"), + variableResolver.resolveCurReportVariables()).createMutableTreeNode()); + rootNode.add(new TextFolderUserObject(Inter.getLocText(new String[]{"Datasource-Datasource", "Parameter"}), - BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), - variableResolver.resolveTableDataParameterVariables()).createMutableTreeNode()); - + BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), + variableResolver.resolveTableDataParameterVariables()).createMutableTreeNode()); + rootNode.add(new TextFolderUserObject(Inter.getLocText("ParameterD-Report_Parameter"), - BaseUtils.readIcon("/com/fr/design/images/m_report/p.gif"), - variableResolver.resolveReportParameterVariables()).createMutableTreeNode()); - + BaseUtils.readIcon("/com/fr/design/images/m_report/p.gif"), + variableResolver.resolveReportParameterVariables()).createMutableTreeNode()); + rootNode.add(new TextFolderUserObject(Inter.getLocText("M_Server-Global_Parameters"), BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"), variableResolver.resolveGlobalParameterVariables()).createMutableTreeNode()); - + variableModel.reload(); // Expand for (int row = 0; row < this.variablesTree.getRowCount(); row++) { diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/$$$.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/$$$.txt index ea95070daf..48d884dc40 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/$$$.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/$$$.txt @@ -1 +1 @@ -ǰֵ \ No newline at end of file +当前值 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/$$page_number.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/$$page_number.txt index 322c867f48..0e45e0871a 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/$$page_number.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/$$page_number.txt @@ -1 +1 @@ -ǰҳ +当前的页数。 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/$$totalPage_number.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/$$totalPage_number.txt index a6a8244be1..11c6fb59bd 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/$$totalPage_number.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/$$totalPage_number.txt @@ -1 +1 @@ -ҳ \ No newline at end of file +总页数。 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_authority.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_authority.txt index eadf192eb1..abafe8eff2 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_authority.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_authority.txt @@ -1 +1 @@ -ʹȨʱɫIJ \ No newline at end of file +使用权限时保存角色的参数 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_username.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_username.txt index 586198ed0d..9dadd38832 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_username.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_username.txt @@ -1 +1 @@ -ʹȨʱûIJ \ No newline at end of file +使用权限时保存用户名的参数 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_userposition.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_userposition.txt index 07b3122abf..73cb5a6d29 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_userposition.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/$fr_userposition.txt @@ -1,3 +1 @@ -ʹȨʱ,$fr_userpositionDzŽɫ -ʽ磺{"departments":"","jobTitle":"۾"} -ŽɫԲźְɵ顣 \ No newline at end of file +使用权限时,$fr_userposition就是部门角色,格式如:{"jobTitle":"销售经理","departments":"销售"},部门角色是以部门和职务组成的数组。 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/NOFILTER.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/NOFILTER.txt index ccda7162b3..13caca6bc0 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/NOFILTER.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/NOFILTER.txt @@ -1 +1 @@ -NOFILTERһֵȽ϶ΪtrueIJ +NOFILTER是一个与任意值比较都为true的参数。 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/NULL.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/NULL.txt index 90e31a9b21..40ea67ca4a 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/NULL.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/NULL.txt @@ -1 +1 @@ -ֵIJ \ No newline at end of file +空值的参数。 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/contextPath.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/contextPath.txt index 0257c7e842..2faf5629e5 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/contextPath.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/contextPath.txt @@ -1,3 +1 @@ -contextPathָ·ķĿ¼. -ʣhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -contextPath/WebReport \ No newline at end of file +contextPath是指绝对路径的服务器别名,即虚拟目录.假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,contextPath是/WebReport \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/curReport.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/curReport.txt index cc01b67263..4a0b82a923 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/curReport.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/curReport.txt @@ -1 +1 @@ -ǰ \ No newline at end of file +当前报表。 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt index 95c5feec3a..c9921354ad 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/formletName.txt @@ -1,3 +1 @@ - -ʣhttp://localhost:8080/WebReport/ReportServer?formlet=Form1.frm -formNameForm1.frm \ No newline at end of file +表单名字假如访问:http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm,formName就是Form1.frm \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/fr_submitinfo.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/fr_submitinfo.txt index 4a1e38b99d..41212da237 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/fr_submitinfo.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/fr_submitinfo.txt @@ -1 +1 @@ -ύ¼ķϢ fr_submitinfo.success¼ɹ fr_submitinfo.failinfo򵥼¼Ϣ \ No newline at end of file +提交入库事件的返回信息。fr_submitinfo.success记录成功与否fr_submitinfo.failinfo简单记录出错信息 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/reportName.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/reportName.txt index 982b43b722..d2bb66ad34 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/reportName.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/reportName.txt @@ -1,3 +1 @@ - -ʣhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -reportNameWorkBook1.cpt \ No newline at end of file +报表名字假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,reportName就是WorkBook1.cpt \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/serverName.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/serverName.txt index 89eb2f98df..d6fca71888 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/serverName.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/serverName.txt @@ -1,3 +1 @@ -serverNameַָ. -ʣhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -serverNameָǣlocalhostʻӵIP \ No newline at end of file +serverName,是指服务器地址或名称.假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverName指的是:localhost,即访问机子的IP \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/serverPort.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/serverPort.txt index 8a0dd40cf7..24552e730e 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/serverPort.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/serverPort.txt @@ -1 +1 @@ -serverPortָǷʵĶ˿ \ No newline at end of file +serverPort指的是访问的端口 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/serverSchema.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/serverSchema.txt index 02cecc67e8..15bcc7e9fb 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/serverSchema.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/serverSchema.txt @@ -1,3 +1 @@ -serverSchemaָЭ. -ʣhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -serverSchemaָǣhttp \ No newline at end of file +serverSchema,是指协议名称.假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverSchema指的是:http \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/serverURL.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/serverURL.txt index 5fd3852e92..02c7db49f2 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/serverURL.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/serverURL.txt @@ -1,3 +1 @@ -serverURLָʷURL -ʣhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -serverURLhttp://localhost:8080 +serverURL是指访问服务的URL假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverURL就是http://localhost:8080 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/servletURL.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/servletURL.txt index 73a1c0fffe..2a1e5dfd49 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/servletURL.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/servletURL.txt @@ -1,2 +1 @@ -ʣhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -servletURLָǣ/WebReport/ReportServer \ No newline at end of file +假如访问:http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,servletURL指的是:/WebReport/ReportServer \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/cn/sessionID.txt b/designer_base/src/com/fr/design/insert/formula/variable/cn/sessionID.txt index a27a6b408a..eb0b42cf66 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/cn/sessionID.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/cn/sessionID.txt @@ -1,4 +1 @@ -SessionIDǷûỰıʶ -ڴỰʱΪÿһỰһıʶ -ỰʶԳͷءSessionIDڱλỰIDļ¼ -SessionID WEBҳͳơ \ No newline at end of file +SessionID属性是返回用户会话的标识。在创建会话时,服务器会为每一个会话生成一个单独的标识,会话标识以长整形数据类型返回。SessionID等于本次会话ID的记录,SessionID 多数情况是用于WEB页面的统计。 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/$$$.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/$$$.txt index 4148f61d3a..7f4e9bf6a0 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/$$$.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/$$$.txt @@ -1 +1 @@ -The current value \ No newline at end of file +The current value \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_authority.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_authority.txt index c7c8074a07..4cd04a675a 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_authority.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_authority.txt @@ -1 +1 @@ -Parameter of user authority \ No newline at end of file +Parameter of user authority \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_username.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_username.txt index 8b8e172deb..4acc4b6a8f 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_username.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_username.txt @@ -1 +1 @@ -Parameter of username \ No newline at end of file +Parameter of username \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_userposition.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_userposition.txt index 1071578ed5..065c000817 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_userposition.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/$fr_userposition.txt @@ -1 +1 @@ -department role of user \ No newline at end of file +department role of user \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/NOFILTER.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/NOFILTER.txt index 8902cd963c..e2fdaa0c63 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/NOFILTER.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/NOFILTER.txt @@ -1 +1 @@ -The result is aways true when NOFILTER is compared with any other values. +The result is aways true when NOFILTER is compared with any other values. \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/contextPath.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/contextPath.txt index 8b37a4d9eb..7c62560355 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/contextPath.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/contextPath.txt @@ -1 +1 @@ -absolute path of the server http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt contextPath is /WebReport \ No newline at end of file +absolute path of the serverhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,contextPath is /WebReport \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt index 320a270d6f..48e90583c7 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/formletName.txt @@ -1,3 +1 @@ -form name -http://localhost:8080/WebReport/ReportServer?formlet=Form1.frm -formName is Form1.frm \ No newline at end of file +form namehttp://localhost:8080/WebReport/ReportServer?formlet=Form1.frm,formName is Form1.frm \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/fr_submitinfo.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/fr_submitinfo.txt index a4dc1dc072..ce8c81728e 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/fr_submitinfo.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/fr_submitinfo.txt @@ -1 +1 @@ -callback status of form submit contains fr_submitinfo.success and fr_submitinfo.failinfo \ No newline at end of file +callback status of form submitcontains fr_submitinfo.success and fr_submitinfo.failinfo \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/reportName.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/reportName.txt index bd15a40250..88afaad378 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/reportName.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/reportName.txt @@ -1,3 +1 @@ -report name -http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -reportName is WorkBook1.cpt \ No newline at end of file +report namehttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,reportName is WorkBook1.cpt \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/serverName.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/serverName.txt index 666c13b645..265bd4ad02 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/serverName.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/serverName.txt @@ -1,3 +1 @@ -address or name of the server -http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -serverName means localhost \ No newline at end of file +address or name of the serverhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverName means localhost \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/serverSchema.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/serverSchema.txt index 2b06eaa23c..85072e652c 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/serverSchema.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/serverSchema.txt @@ -1,3 +1 @@ -serverSchema -http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -serverSchema is http \ No newline at end of file +serverSchemahttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverSchema is http \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/serverURL.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/serverURL.txt index 347114b08b..f14f925834 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/serverURL.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/serverURL.txt @@ -1,3 +1 @@ -URL of the server -http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -serverURL is http://localhost:8080 +URL of the serverhttp://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,serverURL is http://localhost:8080 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/insert/formula/variable/en/servletURL.txt b/designer_base/src/com/fr/design/insert/formula/variable/en/servletURL.txt index b5ed4ec750..b9149deff3 100644 --- a/designer_base/src/com/fr/design/insert/formula/variable/en/servletURL.txt +++ b/designer_base/src/com/fr/design/insert/formula/variable/en/servletURL.txt @@ -1,2 +1 @@ -http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt -servletURL is /WebReport/ReportServer \ No newline at end of file +http://localhost:8080/WebReport/ReportServer?reportlet=WorkBook1.cpt,servletURL is /WebReport/ReportServer \ No newline at end of file From 98dc9f981f4fa7da7e16091c971468e4e746a84b Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Wed, 1 Mar 2017 17:07:48 +0800 Subject: [PATCH 119/127] =?UTF-8?q?8.0=E6=8F=92=E4=BB=B6=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E9=87=8D=E5=90=AF=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?confirm=E5=AF=B9=E8=AF=9D=E6=A1=86=E4=BF=9D=E7=95=99=EF=BC=8C?= =?UTF-8?q?=E5=9C=A89.0=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/exe/ModifyStatusExecutor.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/exe/ModifyStatusExecutor.java b/designer_base/src/com/fr/design/extra/exe/ModifyStatusExecutor.java index a61f35e2d1..c544858dd8 100644 --- a/designer_base/src/com/fr/design/extra/exe/ModifyStatusExecutor.java +++ b/designer_base/src/com/fr/design/extra/exe/ModifyStatusExecutor.java @@ -42,9 +42,7 @@ public class ModifyStatusExecutor implements Executor { plugin.setActive(active); try { FRContext.getCurrentEnv().writePlugin(plugin); - /* - * PluginWebBridge.getHelper().showRestartMessage(plugin.isActive() ? Inter.getLocText("FR-Designer-Plugin_Has_Been_Actived") : Inter.getLocText("FR-Designer-Plugin_Has_Been_Disabled")); - **/ + PluginWebBridge.getHelper().showRestartMessage(plugin.isActive() ? Inter.getLocText("FR-Designer-Plugin_Has_Been_Actived") : Inter.getLocText("FR-Designer-Plugin_Has_Been_Disabled")); } catch (Exception e) { FRContext.getLogger().error(e.getMessage()); } From 5993e65d4a602adef07c7218f2cb8ea06404a0b1 Mon Sep 17 00:00:00 2001 From: mengao Date: Fri, 3 Mar 2017 10:31:55 +0800 Subject: [PATCH 120/127] =?UTF-8?q?=E5=88=86=E4=B8=A4=E8=A1=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BAcheckbox=E5=92=8C=E8=BE=93=E5=85=A5=E6=A1=86=EF=BC=8C?= =?UTF-8?q?=E9=80=82=E5=BA=94=E5=9B=BD=E9=99=85=E5=8C=96=E6=83=85=E5=86=B5?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/style/axis/ChartValuePane.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java index b100518c1a..986f67f2dc 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java @@ -151,10 +151,11 @@ public class ChartValuePane extends ChartAxisUsePane{ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { LayoutConstants.CHART_ATTR_TOMARGIN,p,f}; - double[] rowSize = { p, p,}; + double[] rowSize = { p, p, p}; Component[][] component = new Component[][]{ new Component[]{null,initMinMaxValue(),null}, - new Component[]{null, addLogarithmicPane2ValuePane(), addLogText()}, + new Component[]{null, addLogarithmicPane2ValuePane(), null}, + new Component[]{null, null, addLogText()}, }; return TableLayoutHelper.createTableLayoutPane(component, rowSize, columnSize); } @@ -173,10 +174,10 @@ public class ChartValuePane extends ChartAxisUsePane{ JPanel labelLogPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); labelLogPane.add(logBox = new UICheckBox(Inter.getLocText("Logarithmic")+":")); labelLogPane.add(new UILabel(Inter.getLocText("Chart_Log_Base"))); - + logBaseField = new UITextField(4); logBaseField.setText("10"); - logBaseField.setPreferredSize(new Dimension(20, 20)); + logBaseField.setPreferredSize(new Dimension(50, 20)); logBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -185,7 +186,7 @@ public class ChartValuePane extends ChartAxisUsePane{ }); ChartSwingUtils.addListener(logBox, logBaseField); - + return labelLogPane; } From 9536b70257d75451f5b0d031b47c87d8636c5044 Mon Sep 17 00:00:00 2001 From: mengao Date: Fri, 3 Mar 2017 10:39:00 +0800 Subject: [PATCH 121/127] =?UTF-8?q?=E5=88=86=E4=B8=A4=E8=A1=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BAcheckbox=E5=92=8C=E8=BE=93=E5=85=A5=E6=A1=86=EF=BC=8C?= =?UTF-8?q?=E9=80=82=E5=BA=94=E5=9B=BD=E9=99=85=E5=8C=96=E6=83=85=E5=86=B5?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/chart/gui/style/axis/ChartValuePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java index 986f67f2dc..f798a0a07d 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/axis/ChartValuePane.java @@ -177,7 +177,7 @@ public class ChartValuePane extends ChartAxisUsePane{ logBaseField = new UITextField(4); logBaseField.setText("10"); - logBaseField.setPreferredSize(new Dimension(50, 20)); + logBaseField.setPreferredSize(new Dimension(55, 20)); logBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { From d7dfacd2f630cf4cd927b21ce97ae06b4a577ec2 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 6 Mar 2017 16:48:40 +0800 Subject: [PATCH 122/127] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E6=8F=90=E4=BA=A4=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/locale/designer.properties | 13 ++++++++++++- .../com/fr/design/locale/designer_en_US.properties | 13 ++++++++++++- .../com/fr/design/locale/designer_ja_JP.properties | 11 +++++++++++ .../com/fr/design/locale/designer_ko_KR.properties | 11 +++++++++++ .../com/fr/design/locale/designer_zh_CN.properties | 13 ++++++++++++- .../com/fr/design/locale/designer_zh_TW.properties | 13 ++++++++++++- 6 files changed, 70 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 0a66c326e8..87a3471e95 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -567,4 +567,15 @@ FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_WidgetOrder=Widget Order FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP. -FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid. \ No newline at end of file +FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid. +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= \ 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 b0acea3ab4..aedaabbc68 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 @@ -568,4 +568,15 @@ FR-Designer_Parameter-Formula=Formula FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_WidgetOrder=Widget Order FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP. -FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid. \ No newline at end of file +FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid. +FR-Designer_Background_Null=No Background +FR-Designer_Background_Color=Color +FR-Designer_Background_Texture=Texture +FR-Designer_Background_Pattern=Pattern +FR-Designer_Background_Gradient_Color=Gradient Color +FR-Designer_Background_Image=Image +FR-Designer_Background_Clear=Clear +FR-Designer_Background_Image_Select=Select Picture +FR-Designer_Initial_Background_Tips=Initial background of the button +FR-Designer_Mouse_Move_Tips=Move the mouse to the button on the background, in the absence of not changing the background +FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background \ 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 d86d0a164c..f966aaef05 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 @@ -539,3 +539,14 @@ FR-Designer_No=\u3044\u3044\u3048 FR-Designer_Pagination=\u30DA\u30FC\u30B8\u30F3\u30B0 FR-Designer_DS_TableData=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9 FR-Designer_Parameter-Formula=\u6570\u5F0F +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= 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 dfb5ec78ff..611d8128c9 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 @@ -536,3 +536,14 @@ FR-Designer_No=\uC544\uB2C8\uC624 FR-Designer_Pagination=\uD398\uC774\uC9C0\uB098\uB204\uAE30 FR-Designer_DS_TableData=\uB370\uC774\uD130\uC138\uD2B8 FR-Designer_Parameter-Formula=\uC218\uC2DD +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= \ 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 bdb97b094e..0bf1d423c4 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 @@ -572,4 +572,15 @@ FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6 FR-Designer_WidgetOrder=\u63A7\u4EF6\u987A\u5E8F FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CA\uFF1A\u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u8868\u5355\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\u3002 -FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CA\: \u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u62A5\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9875\u9884\u89C8\uFF0C\u586B\u62A5\u9884\u89C8\u65F6\u5C5E\u6027\u65E0\u6548\u3002 \ No newline at end of file +FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CA\: \u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u62A5\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9875\u9884\u89C8\uFF0C\u586B\u62A5\u9884\u89C8\u65F6\u5C5E\u6027\u65E0\u6548\u3002 +FR-Designer_Background_Null=\u6CA1\u6709\u80CC\u666F +FR-Designer_Background_Color=\u989C\u8272 +FR-Designer_Background_Texture=\u7EB9\u7406 +FR-Designer_Background_Pattern=\u56FE\u6848 +FR-Designer_Background_Gradient_Color=\u6E10\u53D8\u8272 +FR-Designer_Background_Image=\u56FE\u7247 +FR-Designer_Background_Clear=\u6E05\u9664 +FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 +FR-Designer_Initial_Background_Tips=\u6309\u94AE\u7684\u521D\u59CB\u80CC\u666F +FR-Designer_Mouse_Move_Tips=\u9F20\u6807\u79FB\u52A8\u5230\u6309\u94AE\u4E0A\u7684\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F +FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F \ 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 3acd7487c2..47836061f4 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 @@ -560,4 +560,15 @@ FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u904E\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8ACB\u806F\u7E6B\u958B\u767C\u8005\u5347\u7D1A\u63D2\u4EF6 FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u8868\u55AE\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\u3002 -FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u5831\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9801\u9810\u89BD\uFF0C\u586B\u5831\u9810\u89BD\u6642\u5C6C\u6027\u7121\u6548\u3002 \ No newline at end of file +FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u5831\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9801\u9810\u89BD\uFF0C\u586B\u5831\u9810\u89BD\u6642\u5C6C\u6027\u7121\u6548\u3002 +FR-Designer_Background_Null= +FR-Designer_Background_Color= +FR-Designer_Background_Texture= +FR-Designer_Background_Pattern= +FR-Designer_Background_Gradient_Color= +FR-Designer_Background_Image= +FR-Designer_Background_Clear= +FR-Designer_Background_Image_Select= +FR-Designer_Initial_Background_Tips= +FR-Designer_Mouse_Move_Tips= +FR-Designer_Mouse_Click_Tips= \ No newline at end of file From a5c34f032c77e0f128fdc53a6c42e09f05a94cd0 Mon Sep 17 00:00:00 2001 From: zhouping Date: Fri, 10 Mar 2017 11:01:08 +0800 Subject: [PATCH 123/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 6 +++++- .../src/com/fr/design/locale/designer_en_US.properties | 6 +++++- .../src/com/fr/design/locale/designer_ja_JP.properties | 4 ++++ .../src/com/fr/design/locale/designer_ko_KR.properties | 6 +++++- .../src/com/fr/design/locale/designer_zh_CN.properties | 6 +++++- .../src/com/fr/design/locale/designer_zh_TW.properties | 6 +++++- 6 files changed, 29 insertions(+), 5 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 87a3471e95..05c7aa6a6b 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -578,4 +578,8 @@ FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= -FR-Designer_Mouse_Click_Tips= \ No newline at end of file +FR-Designer_Mouse_Click_Tips= +FR-Designer-Move_Tab_First=move to first +FR-Designer-Move_Tab_End=move to end +FR-Designer-Move_Tab_Next=move to next +FR-Designer-Move_Tab_Prev=move to previous \ 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 aedaabbc68..fcece57565 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 @@ -579,4 +579,8 @@ FR-Designer_Background_Clear=Clear FR-Designer_Background_Image_Select=Select Picture FR-Designer_Initial_Background_Tips=Initial background of the button FR-Designer_Mouse_Move_Tips=Move the mouse to the button on the background, in the absence of not changing the background -FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background \ No newline at end of file +FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background +FR-Designer-Move_Tab_First=move to first +FR-Designer-Move_Tab_End=move to end +FR-Designer-Move_Tab_Next=move to next +FR-Designer-Move_Tab_Prev=move to previous \ 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 f966aaef05..233078394f 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 @@ -550,3 +550,7 @@ FR-Designer_Background_Image_Select= FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= FR-Designer_Mouse_Click_Tips= +FR-Designer-Move_Tab_First= +FR-Designer-Move_Tab_End= +FR-Designer-Move_Tab_Next= +FR-Designer-Move_Tab_Prev= \ 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 611d8128c9..a54595e0c3 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 @@ -546,4 +546,8 @@ FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= -FR-Designer_Mouse_Click_Tips= \ No newline at end of file +FR-Designer_Mouse_Click_Tips= +FR-Designer-Move_Tab_First= +FR-Designer-Move_Tab_End= +FR-Designer-Move_Tab_Next= +FR-Designer-Move_Tab_Prev= \ 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 0bf1d423c4..53aab70e5d 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 @@ -583,4 +583,8 @@ FR-Designer_Background_Clear=\u6E05\u9664 FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247 FR-Designer_Initial_Background_Tips=\u6309\u94AE\u7684\u521D\u59CB\u80CC\u666F FR-Designer_Mouse_Move_Tips=\u9F20\u6807\u79FB\u52A8\u5230\u6309\u94AE\u4E0A\u7684\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F -FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F \ No newline at end of file +FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F +FR-Designer-Move_Tab_First=\u79FB\u52A8\u5230\u9996\u4F4D +FR-Designer-Move_Tab_End=\u79FB\u52A8\u5230\u672B\u5C3E +FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8 +FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8 \ 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 47836061f4..68622ad34a 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 @@ -571,4 +571,8 @@ FR-Designer_Background_Clear= FR-Designer_Background_Image_Select= FR-Designer_Initial_Background_Tips= FR-Designer_Mouse_Move_Tips= -FR-Designer_Mouse_Click_Tips= \ No newline at end of file +FR-Designer_Mouse_Click_Tips= +FR-Designer-Move_Tab_First=\u79FB\u52D5\u5230\u9996\u4F4D +FR-Designer-Move_Tab_End=\u79FB\u52D5\u5230\u672B\u5C3E +FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5 +FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5 \ No newline at end of file From 1717e7ef30fd33808c6d585a39b7f5e69ca795f5 Mon Sep 17 00:00:00 2001 From: mengao Date: Fri, 10 Mar 2017 14:47:40 +0800 Subject: [PATCH 124/127] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=9B=BE=E8=A1=A8=E9=93=BE=E6=8E=A5=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E6=98=BE=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java index 4a18611fa4..f57328e149 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -79,7 +79,7 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen eastPane.setLayout(new BorderLayout()); - eastPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 15)); + eastPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 10)); JPanel button = new JPanel(); button.setPreferredSize(new Dimension(45, 20)); button.setLayout(new GridLayout(1, 2, 5, 0)); From 688237c397bcb1530097b1786fbd7ae128af2c67 Mon Sep 17 00:00:00 2001 From: zack Date: Mon, 13 Mar 2017 18:34:39 +0800 Subject: [PATCH 125/127] =?UTF-8?q?REPORT-2052=20=E6=BC=8F=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/env/RemoteEnv.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 4284b2155e..ac5732e73d 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -55,7 +55,7 @@ import java.util.Timer; import java.util.logging.Level; import java.util.regex.Pattern; -public class RemoteEnv implements Env { +public class RemoteEnv extends AbstractEnv { private static final int TIME_OUT = 30 * 1000; private static final int PLAIN_SOCKET_PORT = 80; private static final int SSL_PORT = 443; From e422507fa15afb161e2d343ce0c655ae8f889b42 Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 14 Mar 2017 19:16:28 +0800 Subject: [PATCH 126/127] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=20release=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=94=AF?= =?UTF-8?q?=E6=8C=811.7jdk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_form/build.release.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_form/build.release.gradle b/designer_form/build.release.gradle index 90abcb81ee..23ee80322a 100644 --- a/designer_form/build.release.gradle +++ b/designer_form/build.release.gradle @@ -4,7 +4,7 @@ tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } //指定构建的jdk版本 -sourceCompatibility=1.8 +sourceCompatibility=1.7 //指定生成的jar包版本 version='8.0' From 708cd6e9c541a102cf5ec37a2de7b7c0bccdc344 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 15 Mar 2017 10:11:57 +0800 Subject: [PATCH 127/127] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=8C=E5=B1=8F=E8=94=BD=E7=BB=84=E4=BB=B6=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/designer/creator/XChartEditor.java | 7 ------- .../src/com/fr/design/designer/creator/XElementCase.java | 7 ------- .../com/fr/design/designer/creator/XWidgetCreator.java | 9 --------- .../src/com/fr/design/gui/xtable/PropertyGroupModel.java | 3 --- 4 files changed, 26 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XChartEditor.java b/designer_form/src/com/fr/design/designer/creator/XChartEditor.java index 2ac2c12e35..605532ab13 100644 --- a/designer_form/src/com/fr/design/designer/creator/XChartEditor.java +++ b/designer_form/src/com/fr/design/designer/creator/XChartEditor.java @@ -85,13 +85,6 @@ public class XChartEditor extends XBorderStyleWidgetCreator { return new CRPropertyDescriptor[] { new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter .getLocText("Form-Widget_Name")), - new CRPropertyDescriptor("visible", this.data.getClass()).setI18NName( - Inter.getLocText("FR-Designer_Widget-Visible")).setPropertyChangeListener(new PropertyChangeAdapter() { - - @Override - public void propertyChange() { - makeVisible(toData().isVisible());} - }), new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( WLayoutBorderStyleEditor.class).setI18NName( Inter.getLocText("Chart-Style_Name")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") diff --git a/designer_form/src/com/fr/design/designer/creator/XElementCase.java b/designer_form/src/com/fr/design/designer/creator/XElementCase.java index 7b6dac0e85..a932548cc5 100644 --- a/designer_form/src/com/fr/design/designer/creator/XElementCase.java +++ b/designer_form/src/com/fr/design/designer/creator/XElementCase.java @@ -83,13 +83,6 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme CRPropertyDescriptor[] propertyTableEditor = new CRPropertyDescriptor[]{ new CRPropertyDescriptor("widgetName", this.data.getClass()) .setI18NName(Inter.getLocText("Form-Widget_Name")), - new CRPropertyDescriptor("visible", this.data.getClass()).setI18NName( - Inter.getLocText("FR-Designer_Widget-Visible")).setPropertyChangeListener(new PropertyChangeAdapter() { - - @Override - public void propertyChange() { - makeVisible(toData().isVisible());} - }), new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( WLayoutBorderStyleEditor.class).setI18NName( Inter.getLocText("FR-Designer-Widget_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") diff --git a/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java b/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java index 2c1be0eab4..9de56622df 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XWidgetCreator.java @@ -146,15 +146,6 @@ public abstract class XWidgetCreator extends XCreator { } } - /** - * 渲染Painter - */ - public void paint(Graphics g) { - //不可见时,按钮.4f透明 - AlphaComposite composite = this.data.isVisible() ? (AlphaComposite)((Graphics2D)g).getComposite() : AlphaComposite.getInstance(AlphaComposite.SRC_OVER,HALF_OPACITY); - ((Graphics2D)g).setComposite(composite); - super.paint(g); - } /** * 重命名 * diff --git a/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java b/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java index bb0f0cd3a4..8e8cadad14 100644 --- a/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java +++ b/designer_form/src/com/fr/design/gui/xtable/PropertyGroupModel.java @@ -53,9 +53,6 @@ public class PropertyGroupModel extends AbstractPropertyGroupModel { if(ComparatorUtils.equals(FormConstants.NAME, properties[row].getName())){ creator.resetCreatorName(value.toString()); } - if(ComparatorUtils.equals("visible", properties[row].getName())){ - creator.resetVisible((boolean) value); - } properties[row].firePropertyChanged(); return true; } catch (Exception e) {