From 1910d60fc951dd0b1a69c84d04f4f084812c0b44 Mon Sep 17 00:00:00 2001 From: zack Date: Wed, 15 Jul 2020 13:54:27 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-34994=20=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=8A=98=E5=8F=A0=E6=A0=91=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?(=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E=E6=80=A7=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=8E=A5=E5=8F=A3)-=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E9=83=A8=E5=88=86=20=20,=E8=A1=A8=E5=8D=95=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=9D=97=E4=B9=9F=E9=9C=80=E8=A6=81=E8=BF=99=E4=B8=AA=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/CellElementPropertyPane.java | 30 +++++++++++++++++++ .../mainframe/ElementCasePaneDelegate.java | 30 ------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java index 7324300eb..1716fb476 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java @@ -4,9 +4,13 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; +import com.fr.design.ExtraDesignClassManager; +import com.fr.design.cell.CellElementPropertyComponent; import com.fr.design.fun.BackgroundQuickUIProvider; import com.fr.design.fun.CellAttributeProvider; +import com.fr.design.fun.CellPropertyPaneProvider; import com.fr.design.fun.PresentKindProvider; +import com.fr.design.fun.PropertyItemPaneProvider; import com.fr.design.gui.frpane.UITitlePanel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itabpane.TitleChangeListener; @@ -31,6 +35,7 @@ import javax.swing.JPanel; import javax.swing.SwingConstants; import java.awt.BorderLayout; import java.awt.Dimension; +import java.util.Set; /** @@ -156,6 +161,7 @@ public class CellElementPropertyPane extends DockingView { return; } ePane.getSelection().populatePropertyPane(ePane); + populateExtraCellProperties(ePane); } @Override @@ -188,5 +194,29 @@ public class CellElementPropertyPane extends DockingView { EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CELL_ATTR); EastRegionContainerPane.getInstance().setWindow2PreferWidth(); } + private void populateExtraCellProperties(ElementCasePane ePane) { + if (ePane == null) { + return; + } + Selection selection = ePane.getSelection(); + if (selection instanceof CellSelection) { + //单元格属性,限定下是选中单个单元格 + TemplateElementCase elementCase = ePane.getEditingElementCase(); + if (elementCase != null) { + Set itemPaneProviders = ExtraDesignClassManager.getInstance().getArray(PropertyItemPaneProvider.XML_TAG); + if (itemPaneProviders != null) { + for (PropertyItemPaneProvider itemPaneProvider : itemPaneProviders) { + if(itemPaneProvider instanceof CellPropertyPaneProvider){ + CellPropertyPaneProvider cellPropertyPaneProvider = (CellPropertyPaneProvider) itemPaneProvider; + CellElementPropertyComponent cellElementPropertyPane = cellPropertyPaneProvider.getSingletonCelPropertyPane(); + if (cellElementPropertyPane != null && cellElementPropertyPane.accept(ePane)) { + cellElementPropertyPane.populate(ePane); + } + } + } + } + } + } + } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java index 3f46dded8..83a1c0850 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java @@ -2,7 +2,6 @@ package com.fr.design.mainframe; import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignState; -import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; import com.fr.design.actions.cell.CellAttributeAction; import com.fr.design.actions.cell.CellExpandAttrAction; @@ -19,10 +18,7 @@ import com.fr.design.actions.utils.DeprecatedActionManager; import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; import com.fr.design.file.HistoryTemplateListPane; -import com.fr.design.cell.CellElementPropertyComponent; -import com.fr.design.fun.CellPropertyPaneProvider; import com.fr.design.fun.MenuHandler; -import com.fr.design.fun.PropertyItemPaneProvider; import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.mainframe.cell.QuickEditorRegion; import com.fr.design.menu.KeySetUtils; @@ -32,17 +28,14 @@ import com.fr.design.present.ConditionAttributesGroupPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.selection.SelectionEvent; import com.fr.design.selection.SelectionListener; -import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.Selection; import com.fr.page.ReportSettingsProvider; -import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.worksheet.WorkSheet; import com.fr.stable.ArrayUtils; import javax.swing.JPanel; import java.awt.BorderLayout; -import java.util.Set; /** @@ -88,8 +81,6 @@ public class ElementCasePaneDelegate extends ElementCasePane { } CellWidgetPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); - //加载插件中的单元格属性 - populateExtraCellProperties(); QuickEditorRegion.getInstance().populate(getCurrentEditor()); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); @@ -227,25 +218,4 @@ public class ElementCasePaneDelegate extends ElementCasePane { return this.getTarget().getReportSettings(); } - private void populateExtraCellProperties() { - Selection selection = getSelection(); - if (selection instanceof CellSelection) { - //单元格属性,限定下是选中单个单元格 - TemplateElementCase elementCase = getEditingElementCase(); - if (elementCase != null) { - Set itemPaneProviders = ExtraDesignClassManager.getInstance().getArray(PropertyItemPaneProvider.XML_TAG); - if (itemPaneProviders != null) { - for (PropertyItemPaneProvider itemPaneProvider : itemPaneProviders) { - if(itemPaneProvider instanceof CellPropertyPaneProvider){ - CellPropertyPaneProvider cellPropertyPaneProvider = (CellPropertyPaneProvider) itemPaneProvider; - CellElementPropertyComponent cellElementPropertyPane = cellPropertyPaneProvider.getSingletonCelPropertyPane(); - if (cellElementPropertyPane != null && cellElementPropertyPane.accept(ElementCasePaneDelegate.this)) { - cellElementPropertyPane.populate(ElementCasePaneDelegate.this); - } - } - } - } - } - } - } }