From 13274e77ab1a06c3ee0ba1e7a9a6e1e350f7ba5d Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 29 Aug 2017 10:06:33 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-3914=20[9.0=E4=B8=80=E8=BD=AE=E5=9B=9E?= =?UTF-8?q?=E5=BD=92]=E9=80=89=E4=B8=AD=E4=B8=80=E7=89=87=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E5=90=8E=E5=8F=B3=E4=BE=A7=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=A0=8F=E4=B8=AD=E6=8F=92=E5=85=A5=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=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 071d92cc15..89b3f681ab 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 5fb20154b0..387ed8154b 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 cfc34633fa..9df6d601f2 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();