From 13274e77ab1a06c3ee0ba1e7a9a6e1e350f7ba5d Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 29 Aug 2017 10:06:33 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-3914=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E9=80=89=E4=B8=AD=E4=B8=80=E7=89=87?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E5=90=8E=E5=8F=B3=E4=BE=A7=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E4=B8=AD=E6=8F=92=E5=85=A5=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=A0=BC=E5=85=83=E7=B4=A0=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/ElementCasePaneDelegate.java | 8 ++++++++ .../form/FormElementCasePaneDelegate.java | 7 ++++++- .../src/com/fr/poly/creator/ECBlockEditor.java | 16 ++++++++++++++++ .../mainframe/EastRegionContainerPane.java | 9 +++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index 071d92cc1..89b3f681a 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -62,6 +62,7 @@ public class ElementCasePaneDelegate extends ElementCasePane { } private void doOnSelectionChanged(SelectionEvent e) { + System.out.println(); //在编辑权限,所以要更新权限编辑面板 if (BaseUtils.isAuthorityEditing()) { AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this); @@ -97,6 +98,13 @@ public class ElementCasePaneDelegate extends ElementCasePane { EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); EastRegionContainerPane.getInstance().replaceConditionAttrPane(conditionAttributesGroupPane); EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance()); + + if (isSelectedOneCell()) { + EastRegionContainerPane.getInstance().enableCellElementPane(); + } else { // 如果选中多个单元格,禁用单元格元素 tab + EastRegionContainerPane.getInstance().disableCellElementPane(); + EastRegionContainerPane.getInstance().refreshRightPane(); + } } EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane); EastRegionContainerPane.getInstance().removeParameterPane(); diff --git a/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java index 5fb20154b..387ed8154 100644 --- a/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java @@ -46,7 +46,12 @@ public class FormElementCasePaneDelegate extends ElementCasePane { EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance()); + + if (isSelectedOneCell()) { + EastRegionContainerPane.getInstance().enableCellElementPane(); + } else { // 如果选中多个单元格,禁用单元格元素 tab + EastRegionContainerPane.getInstance().disableCellElementPane(); + EastRegionContainerPane.getInstance().refreshRightPane(); + } } EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); @@ -169,4 +176,13 @@ public class ECBlockEditor extends BlockEditor { ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance(); conditionAttributesGroupPane.populate(editComponent); } + + private boolean isSelectedOneCell() { + JTemplate jTemplate = DesignerContext.getDesignerFrame().getSelectedJTemplate(); + if (jTemplate == null) { + return false; + } + ElementCasePane ePane = (ElementCasePane)jTemplate.getCurrentElementCasePane(); + return ePane != null && ePane.isSelectedOneCell(); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index cfc34633f..9df6d601f 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -153,6 +153,15 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return defaultPane; } + // 禁用单元格元素tab + public void disableCellElementPane() { + propertyItemMap.get(KEY_CELL_ELEMENT).setEnabled(false); + } + // 禁用单元格元素tab + public void enableCellElementPane() { + propertyItemMap.get(KEY_CELL_ELEMENT).setEnabled(true); + } + private void initContentPane() { initRightPane(); initLeftPane(); From 9abea324ebfd60d3e5f490f58ca934286ca5ce1d Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 29 Aug 2017 10:33:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-3914=20=E8=B0=83=E6=95=B4=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/ElementCasePaneDelegate.java | 7 +------ .../mainframe/form/FormElementCasePaneDelegate.java | 7 +------ designer/src/com/fr/poly/creator/ECBlockEditor.java | 7 +------ .../design/mainframe/EastRegionContainerPane.java | 13 +++++++++++-- 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index 89b3f681a..dc8d5e185 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -99,12 +99,7 @@ public class ElementCasePaneDelegate extends ElementCasePane { EastRegionContainerPane.getInstance().replaceConditionAttrPane(conditionAttributesGroupPane); EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance()); - if (isSelectedOneCell()) { - EastRegionContainerPane.getInstance().enableCellElementPane(); - } else { // 如果选中多个单元格,禁用单元格元素 tab - EastRegionContainerPane.getInstance().disableCellElementPane(); - EastRegionContainerPane.getInstance().refreshRightPane(); - } + EastRegionContainerPane.getInstance().updateCellElementState(isSelectedOneCell()); } EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane); EastRegionContainerPane.getInstance().removeParameterPane(); diff --git a/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java index 387ed8154..68ee0d79b 100644 --- a/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java @@ -46,12 +46,7 @@ public class FormElementCasePaneDelegate extends ElementCasePane { EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance()); EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(CellWidgetPropertyPane.getInstance()); - if (isSelectedOneCell()) { - EastRegionContainerPane.getInstance().enableCellElementPane(); - } else { // 如果选中多个单元格,禁用单元格元素 tab - EastRegionContainerPane.getInstance().disableCellElementPane(); - EastRegionContainerPane.getInstance().refreshRightPane(); - } + EastRegionContainerPane.getInstance().updateCellElementState(isSelectedOneCell()); } EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 9df6d601f..ed2d245b6 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -153,12 +153,21 @@ public class EastRegionContainerPane extends UIEastResizableContainer { return defaultPane; } + public void updateCellElementState(boolean isSelectedOneCell) { + if (isSelectedOneCell) { + enableCellElementPane(); + } else { // 如果选中多个单元格,禁用单元格元素 tab + disableCellElementPane(); + refreshRightPane(); + } + } + // 禁用单元格元素tab - public void disableCellElementPane() { + private void disableCellElementPane() { propertyItemMap.get(KEY_CELL_ELEMENT).setEnabled(false); } // 禁用单元格元素tab - public void enableCellElementPane() { + private void enableCellElementPane() { propertyItemMap.get(KEY_CELL_ELEMENT).setEnabled(true); } From 14a439529dc2781f09dabfdd4ba567d1100b0bdc Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 29 Aug 2017 10:54:58 +0800 Subject: [PATCH 3/3] =?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/mainframe/ElementCasePaneDelegate.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java index dc8d5e185..ed0d48146 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -62,7 +62,6 @@ public class ElementCasePaneDelegate extends ElementCasePane { } private void doOnSelectionChanged(SelectionEvent e) { - System.out.println(); //在编辑权限,所以要更新权限编辑面板 if (BaseUtils.isAuthorityEditing()) { AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this);