From 53053c3612efcedbacdc4fe688e931ceec9c9ae9 Mon Sep 17 00:00:00 2001 From: Harrison Date: Wed, 10 Jun 2020 20:08:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-32149=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E3=80=91@harrison=E4=B8=A4=E4=B8=AA=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E8=BF=9B=E8=A1=8C=E6=8B=96=E5=85=A5=EF=BC=8C=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E9=A2=84=E8=A7=88=E5=BE=88=E5=A5=87=E6=80=AA=20?= =?UTF-8?q?=E5=90=8D=E5=AD=97=E9=9C=80=E8=A6=81=E9=A6=96=E5=85=88=E5=8A=A0?= =?UTF-8?q?=E4=B8=8A=E9=BB=98=E8=AE=A4=E5=80=BC=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/beans/models/ModelUtil.java | 5 ++- .../beans/models/AddingModelTest.java | 36 ++++++++++--------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java index b6f073f10..32d217adc 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/ModelUtil.java @@ -41,11 +41,14 @@ abstract class ModelUtil { if (StringUtils.isEmpty(widgetName)) { widgetName = xCreator.createDefaultName(); } + //先保存默认名字 String raw = widgetName; int i = 0; + //先初始化加上索引。 + widgetName = widgetName + i; while (form.isNameExist(widgetName) || duplicated.contains(widgetName)) { - widgetName = raw + i; i++; + widgetName = raw + i; } //将名字加入重复集合中 duplicated.add(widgetName); diff --git a/designer-form/src/test/java/com/fr/design/designer/beans/models/AddingModelTest.java b/designer-form/src/test/java/com/fr/design/designer/beans/models/AddingModelTest.java index 7f17ef3a2..f7a75b029 100644 --- a/designer-form/src/test/java/com/fr/design/designer/beans/models/AddingModelTest.java +++ b/designer-form/src/test/java/com/fr/design/designer/beans/models/AddingModelTest.java @@ -56,6 +56,9 @@ public class AddingModelTest { DaoContext.setEntityDao(null); } + /** + * 默认名字 + i + */ @Test public void testInstantiateCreator() throws Exception { @@ -82,7 +85,7 @@ public class AddingModelTest { AddingModel addingModel = new AddingModel(xCreator1, 20, 20); Form form = EasyMock.mock(Form.class); - EasyMock.expect(form.isNameExist("test")).andReturn(true).once(); + EasyMock.expect(form.isNameExist("test0")).andReturn(true).once(); EasyMock.expect(form.isNameExist("test03")).andReturn(true).once(); EasyMock.expect(form.isNameExist(EasyMock.anyString())).andReturn(false).anyTimes(); EasyMock.replay(form); @@ -93,9 +96,9 @@ public class AddingModelTest { addingModel.instantiateCreator(mock); //没有默认参数, 但已经存在 test - Assert.assertEquals("test0", xCreator1.toData().getWidgetName()); + Assert.assertEquals("test1", xCreator1.toData().getWidgetName()); //直接返回 - Assert.assertEquals("test02", xCreator2.toData().getWidgetName()); + Assert.assertEquals("test020", xCreator2.toData().getWidgetName()); //已经存在,后接0 Assert.assertEquals("test030", xCreator3.toData().getWidgetName()); } @@ -104,34 +107,35 @@ public class AddingModelTest { public void testInstantiateCreator_cardLayout() throws Exception { Form form = EasyMock.mock(Form.class); - EasyMock.expect(form.isNameExist("cardlayout")).andReturn(true).once(); EasyMock.expect(form.isNameExist("cardlayout0")).andReturn(true).once(); + EasyMock.expect(form.isNameExist("cardlayout1")).andReturn(true).once(); EasyMock.expect(form.isNameExist(EasyMock.anyString())).andReturn(false).anyTimes(); EasyMock.replay(form); FormDesigner mock = EasyMock.mock(FormDesigner.class); EasyMock.expect(mock.getTarget()).andReturn(form).anyTimes(); EasyMock.replay(mock); - + WCardLayout wCardLayout = new WCardLayout(20, 20); XWCardLayout xwCardLayout = new XWCardLayout(wCardLayout, new Dimension(40, 40)); AddingModel addingModel = new AddingModel(mock, xwCardLayout); - Assert.assertEquals("cardlayout1", xwCardLayout.toData().getWidgetName()); - + Assert.assertEquals("cardlayout2", xwCardLayout.toData().getWidgetName()); + //依赖于 cardlayout 创建 container XLayoutContainer parentLayOut = xwCardLayout.initCreatorWrapper(80); + //组件默认名 tablelayout2 AddingModel parentModel = new AddingModel(mock, parentLayOut); - Assert.assertEquals("tablayout1", parentLayOut.toData().getWidgetName()); - Assert.assertEquals("tabpane1", ((XCreator) (parentLayOut.getComponent(0))).getXCreator().toData().getWidgetName()); - + //经过处理 tablayout20 + Assert.assertEquals("tablayout20", parentLayOut.toData().getWidgetName()); + Assert.assertEquals("tabpane20", ((XCreator) (parentLayOut.getComponent(0))).getXCreator().toData().getWidgetName()); + Assert.assertEquals("cardlayout20", xwCardLayout.toData().getWidgetName()); + } @Test public void testInstantiateCreator_containsNotXCreator() throws Exception { Form form = EasyMock.mock(Form.class); - EasyMock.expect(form.isNameExist("cardlayout")).andReturn(true).once(); - EasyMock.expect(form.isNameExist("cardlayout0")).andReturn(true).once(); EasyMock.expect(form.isNameExist(EasyMock.anyString())).andReturn(false).anyTimes(); EasyMock.replay(form); @@ -170,16 +174,16 @@ public class AddingModelTest { AddingModel chartModel = new AddingModel(mock, xCreator1); - Assert.assertEquals("chart", xCreator1.toData().getWidgetName()); + Assert.assertEquals("chart0", xCreator1.toData().getWidgetName()); } private static class DemoCreator extends XCreator { private String widgetName; - - public DemoCreator(Widget ob, Dimension initSize, String widgetName) { + + public DemoCreator(Widget ob, Dimension initSize, String defaultName) { super(ob, initSize); - this.widgetName = widgetName; + this.widgetName = defaultName; } @Override From bf8da8edde00c67a174761e4d44d4a5dab42abfe Mon Sep 17 00:00:00 2001 From: lucian Date: Thu, 11 Jun 2020 11:44:17 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-33369=20=E5=9C=A8A=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=9A=84=E4=BF=AE=E6=94=B9=E6=B2=A1=E6=9C=89=E7=82=B9=E7=A1=AE?= =?UTF-8?q?=E5=AE=9A=E3=80=82=E5=9C=A8B=E7=9B=AE=E5=BD=95=E7=A1=AE?= =?UTF-8?q?=E5=AE=9A=EF=BC=8CA=E7=9A=84=E4=BF=AE=E6=94=B9=E4=B9=9F?= =?UTF-8?q?=E4=BC=9A=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/EnvChangeEntrance.java | 29 +++++++++++++------ .../com/fr/design/EnvChangeEntranceTest.java | 25 +++++++++++++--- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index cfe0840af..ce32e2323 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -53,6 +53,7 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.HashSet; @@ -385,7 +386,7 @@ public class EnvChangeEntrance { public void doOk() { envListOkAction(envListPane, PopTipStrategy.LATER); // 切换完成后清理密码 - updateSelectEnv(DesignerEnvManager.getEnvManager().getCurEnvName()); + updateNotRememberPwdEnv(); } @Override @@ -416,7 +417,7 @@ public class EnvChangeEntrance { if (!envListOkAction(envListPane, PopTipStrategy.NOW)) { DesignerExiter.getInstance().execute(); } else { - updateSelectEnv(DesignerEnvManager.getEnvManager().getCurEnvName()); + updateNotRememberPwdEnv(); } } @@ -428,17 +429,19 @@ public class EnvChangeEntrance { envListDialog.setVisible(true); } - /** + /** * 切换环境后 刷新远程目录需要忘记密码的情况 - * @param envName 环境名 */ - private void updateSelectEnv(String envName) { + private void updateNotRememberPwdEnv() { DesignerEnvManager mgr = DesignerEnvManager.getEnvManager(); - DesignerWorkspaceInfo info = mgr.getWorkspaceInfo(envName); - if (info != null) { - WorkspaceConnectionInfo connection = info.getConnection(); - if (connection != null && !connection.isRememberPwd()) { + Iterator iterator = mgr.getEnvNameIterator(); + while (iterator.hasNext()) { + String envName = iterator.next(); + DesignerWorkspaceInfo info = mgr.getWorkspaceInfo(envName); + + if (isNotRememberPwd(info)) { + WorkspaceConnectionInfo connection = info.getConnection(); DesignerWorkspaceInfo workspaceInfo = RemoteDesignerWorkspaceInfo.create(new WorkspaceConnectionInfo( connection.getUrl(), connection.getUserName(), StringUtils.EMPTY, connection.getCertPath(), connection.getCertSecretKey(), false)); mgr.putEnv(envName, workspaceInfo); @@ -446,6 +449,14 @@ public class EnvChangeEntrance { } } + private boolean isNotRememberPwd(DesignerWorkspaceInfo info) { + if (info != null && info.getType() == DesignerWorkspaceType.Remote) { + WorkspaceConnectionInfo connection = info.getConnection(); + return connection != null && !connection.isRememberPwd(); + } + return false; + } + /** * 提示显示策略 diff --git a/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java b/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java index 672f17e37..d9d6e4484 100644 --- a/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java +++ b/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java @@ -2,6 +2,7 @@ package com.fr.design; import com.fr.design.env.DesignerWorkspaceInfo; import com.fr.design.env.DesignerWorkspaceType; +import com.fr.design.env.LocalDesignerWorkspaceInfo; import com.fr.design.env.RemoteDesignerWorkspaceInfo; import com.fr.env.CheckServiceDialog; import com.fr.invoke.Reflect; @@ -58,7 +59,7 @@ public class EnvChangeEntranceTest { } @Test - public void testUpdateSelectEnv() { + public void testUpdateNotRememberPwdEnv() { DesignerEnvManager manager = new DesignerEnvManager(); @@ -71,16 +72,32 @@ public class EnvChangeEntranceTest { manager.putEnv("test1", RemoteDesignerWorkspaceInfo.create(new WorkspaceConnectionInfo("url", "userName", "password", "", "", true))); manager.putEnv("test2", RemoteDesignerWorkspaceInfo.create(new WorkspaceConnectionInfo("url", "userName", "password", "", "", false))); + manager.putEnv("test3", LocalDesignerWorkspaceInfo.create("name", "path")); - Reflect.on(entrance).call("updateSelectEnv", "test1"); - Reflect.on(entrance).call("updateSelectEnv", "test2"); - + Reflect.on(entrance).call("updateNotRememberPwdEnv"); Assert.assertEquals(manager.getWorkspaceInfo("test1").getConnection(), RemoteDesignerWorkspaceInfo.create(new WorkspaceConnectionInfo("url", "userName", "password", "", "", true)).getConnection()); Assert.assertEquals(manager.getWorkspaceInfo("test2").getConnection(), RemoteDesignerWorkspaceInfo.create(new WorkspaceConnectionInfo("url", "userName", "", "", "", false)).getConnection()); + Assert.assertEquals(manager.getWorkspaceInfo("test3").getName(), "name"); + Assert.assertEquals(manager.getWorkspaceInfo("test3").getPath(), "path"); PowerMock.verifyAll(); } + @Test + public void testIsNotRememberPwd() { + EnvChangeEntrance entrance = EnvChangeEntrance.getInstance(); + + DesignerWorkspaceInfo info1 = RemoteDesignerWorkspaceInfo.create(new WorkspaceConnectionInfo("url", "userName", "password", "", "", true)); + DesignerWorkspaceInfo info2 = RemoteDesignerWorkspaceInfo.create(new WorkspaceConnectionInfo("url", "userName", "111", "", "", false)); + DesignerWorkspaceInfo info3 = LocalDesignerWorkspaceInfo.create("name", "path"); + DesignerWorkspaceInfo info4 = null; + + Assert.assertFalse((boolean) Reflect.on(entrance).call("isNotRememberPwd", info1).get()); + Assert.assertTrue((boolean) Reflect.on(entrance).call("isNotRememberPwd", info2).get()); + Assert.assertFalse((boolean) Reflect.on(entrance).call("isNotRememberPwd", info3).get()); + Assert.assertFalse((boolean) Reflect.on(entrance).call("isNotRememberPwd", info4).get()); + } + } \ No newline at end of file From 8ee77e701f4dd0406493de6dbbcee49c18d9b5e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Thu, 11 Jun 2020 11:45:53 +0800 Subject: [PATCH 3/4] =?UTF-8?q?CHART-14191=20=E5=88=86=E7=B1=BB=E5=90=8D?= =?UTF-8?q?=E5=92=8C=E6=8C=87=E9=92=88=E5=80=BC=E5=90=8D=E7=A7=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/data/report/MeterPlotReportDataContentPane.java | 2 +- .../chart/gui/data/table/MeterPlotTableDataContentPane.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java index 43084ef23..a73ea2a16 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java @@ -27,7 +27,7 @@ import java.awt.Component; public class MeterPlotReportDataContentPane extends AbstractReportDataContentPane { private static final String CATENAME = Toolkit.i18nText("Fine-Design_Chart_Category_Name"); - private static final String NVALUE = Toolkit.i18nText("Fine-Design_Chart_Pointer_Value"); + private static final String NVALUE = Toolkit.i18nText("Fine-Design_Chart_Value_Pointer"); private static final String TARGET_VALUE = Toolkit.i18nText("Fine-Design_Chart_Target_Value"); private TinyFormulaPane singCatePane; diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java index 3566ab263..c7830f246 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java @@ -35,8 +35,8 @@ import java.awt.event.ItemListener; * @version 创建时间:2012-12-21 下午04:51:50 */ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane { - private static final String METER_NAME = Toolkit.i18nText("Fine-Design_Chart_Style_Format_Category_Name"); - private static final String METER_VALUE = Toolkit.i18nText("Fine-Design_Chart_Pointer_Value"); + private static final String METER_NAME = Toolkit.i18nText("Fine-Design_Chart_Category_Name"); + private static final String METER_VALUE = Toolkit.i18nText("Fine-Design_Chart_Value_Pointer"); private static final String TARGET_VALUE = Toolkit.i18nText("Fine-Design_Chart_Target_Value"); private static final int COMBOBOX_WIDTH = 115; From c78baf759fcbe29362cefebf1e815679243def4f Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 11 Jun 2020 21:03:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-31990=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E9=9D=A2=E6=9D=BF=E6=96=B0=E5=A2=9Etab?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/JTemplate.java | 57 ++++++++++++++++++- .../fr/design/mainframe/JVirtualTemplate.java | 2 + .../java/com/fr/design/mainframe/JForm.java | 54 +----------------- .../com/fr/design/mainframe/JWorkBook.java | 11 ++++ 4 files changed, 71 insertions(+), 53 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 66d7216c9..f29e22698 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -28,6 +28,7 @@ import com.fr.design.file.TemplateTreePane; import com.fr.design.fun.DesignerFrameUpButtonProvider; import com.fr.design.fun.MenuHandler; import com.fr.design.fun.PreviewProvider; +import com.fr.design.fun.PropertyItemPaneProvider; import com.fr.design.fun.ReportSupportedFileUIProvider; import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; @@ -55,6 +56,14 @@ import com.fr.form.ui.NoneWidget; import com.fr.form.ui.Widget; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; +import com.fr.plugin.context.PluginContext; +import com.fr.plugin.context.PluginRuntime; +import com.fr.plugin.injectable.PluginModule; +import com.fr.plugin.manage.PluginFilter; +import com.fr.plugin.observer.PluginEvent; +import com.fr.plugin.observer.PluginEventListener; +import com.fr.plugin.observer.PluginEventType; +import com.fr.plugin.observer.PluginListenerRegistration; import com.fr.report.cell.Elem; import com.fr.report.cell.cellattr.CellImage; import com.fr.stable.ArrayUtils; @@ -100,7 +109,10 @@ public abstract class JTemplate> protected TimeConsumeTimer consumeTimer = new TimeConsumeTimer(); public int resolution = ScreenResolution.getScreenResolution(); + private PluginEventListener pluginListener; + public JTemplate() { + initAndStartPlugin(); } public JTemplate(T t, String defaultFileName) { @@ -129,8 +141,50 @@ public abstract class JTemplate> designModel = createDesignModel(); consumeTimer.setEnabled(shouldInitForCollectInfo(isNewFile)); + initAndStartPlugin(); + } + + private void initAndStartPlugin() { + initPluginPane(); + startListenPlugin(); + } + + private void startListenPlugin() { + + PluginFilter filter = new PluginFilter() { + @Override + public boolean accept(PluginContext context) { + return context.contain(PropertyItemPaneProvider.XML_TAG); + } + }; + this.pluginListener = new PluginEventListener(PropertyItemPaneProvider.LAST) { + @Override + public void on(PluginEvent event) { + PluginContext context = event.getContext(); + PluginRuntime runtime = context.getRuntime(); + Set providers = runtime.get(PropertyItemPaneProvider.XML_TAG); + for (PropertyItemPaneProvider provider : providers) { + addPane(provider); + } + } + }; + PluginListenerRegistration.getInstance().listen(PluginEventType.AfterRun, this.pluginListener, filter); + } + + private void initPluginPane() { + + ExtraDesignClassManager classManager = PluginModule.getAgent(PluginModule.ExtraDesign); + Set providers = classManager.getArray(PropertyItemPaneProvider.XML_TAG); + for (PropertyItemPaneProvider provider : providers) { + addPane(provider); + } } + protected void addPane(PropertyItemPaneProvider provider) { + // do nothing + } + + void onGetFocus() { consumeTimer.start(); } @@ -251,7 +305,8 @@ public abstract class JTemplate> * 模板关闭时 */ public void whenClose() { - // do nothing + // stop的时候 pluginListener 和 PluginFilter 都会移除 + PluginListenerRegistration.getInstance().stopListen(this.pluginListener); } /** diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JVirtualTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JVirtualTemplate.java index 2c1818614..64a10c88f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JVirtualTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JVirtualTemplate.java @@ -211,6 +211,8 @@ public class JVirtualTemplate extends JTemplate { List> historyList = HistoryTemplateListPane.getInstance().getHistoryList(); historyList.set(index, jt); DesignerContext.getDesignerFrame().addAndActivateJTemplate(jt); + // 虚拟模板JVirtualTemplate被激活后 由真实的JTemplate替换 此时调用whenClose 防止JVirtualTemplate无法释放 + this.whenClose(); } @Override diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index e2112f4f3..041705fb6 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -70,14 +70,7 @@ import com.fr.form.ui.container.WLayout; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.page.PaperSettingProvider; -import com.fr.plugin.context.PluginContext; -import com.fr.plugin.context.PluginRuntime; -import com.fr.plugin.injectable.PluginModule; -import com.fr.plugin.manage.PluginFilter; -import com.fr.plugin.observer.PluginEvent; import com.fr.plugin.observer.PluginEventListener; -import com.fr.plugin.observer.PluginEventType; -import com.fr.plugin.observer.PluginListenerRegistration; import com.fr.report.cell.Elem; import com.fr.report.cell.cellattr.CellImage; import com.fr.report.worksheet.FormElementCase; @@ -104,7 +97,6 @@ import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import java.util.Set; public class JForm extends JTemplate implements BaseJForm
{ private static final String FORM_CARD = "FORM"; @@ -132,51 +124,15 @@ public class JForm extends JTemplate implements BaseJForm providers = runtime.get(PropertyItemPaneProvider.XML_TAG); - for (PropertyItemPaneProvider provider : providers) { - addPane(provider); - } - } - }; - PluginListenerRegistration.getInstance().listen(PluginEventType.AfterRun, this.pluginListener, filter); - } - - private void initPluginPane() { - - ExtraDesignClassManager classManager = PluginModule.getAgent(PluginModule.ExtraDesign); - Set providers = classManager.getArray(PropertyItemPaneProvider.XML_TAG); - for (PropertyItemPaneProvider provider : providers) { - addPane(provider); - } } - private void addPane(PropertyItemPaneProvider provider) { + @Override + protected void addPane(PropertyItemPaneProvider provider) { PaneHolder holder = provider.getPaneHolder(FormDesigner.class); if (holder != null) { @@ -1040,10 +996,4 @@ public class JForm extends JTemplate implements BaseJForm { populateReportParameterAttr(); } + @Override + protected void addPane(PropertyItemPaneProvider provider) { + PaneHolder holder = provider.getPaneHolder(JWorkBook.class); + if (holder != null) { + JPanel panel = holder.getInstance(this); + EastRegionContainerPane.getInstance().replaceKeyPane(provider.key(), panel); + } + } + @Override public void refreshEastPropertiesPane() { if (isEditingPolySheet()) { @@ -1191,6 +1201,7 @@ public class JWorkBook extends JTemplate { @Override public void whenClose() { + super.whenClose(); reportComposite.doRemoveAction(); } }