Browse Source

Pull request #1689: REPORT-32073【冒烟测试】模板web属性-工具栏编辑之后,点确定,弹窗无法缩回 && REPORT-32105 表单关闭后 JForm对象未释放 导致设计器最终发生oom

Merge in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '6a6469cb357c61865ae0df11e0e5c2d97bfbb6b1':
  REPORT-32105 表单关闭后 JForm对象未释放 导致设计器最终发生oom
  REPORT-32073 fix 换个好名字
  REPORT-32073【冒烟测试】模板web属性-工具栏编辑之后,点确定,弹窗无法缩回
feature/big-screen
Hades 5 years ago
parent
commit
ad3741146f
  1. 32
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  2. 9
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

32
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -128,6 +128,8 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
//FORM_TAB代表是否点击编辑,用于点击编辑前后菜单的显示
protected int index = FORM_TAB;
private PluginEventListener pluginListener;
public JForm() {
super(new Form(new WBorderLayout("form")), "Form");
@ -151,18 +153,18 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
return context.contain(PropertyItemPaneProvider.XML_TAG);
}
};
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterRun,
new PluginEventListener(PropertyItemPaneProvider.LAST) {
@Override
public void on(PluginEvent event) {
PluginContext context = event.getContext();
PluginRuntime runtime = context.getRuntime();
Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG);
for (PropertyItemPaneProvider provider : providers) {
addPane(provider);
}
}
}, filter);
this.pluginListener = new PluginEventListener(PropertyItemPaneProvider.LAST) {
@Override
public void on(PluginEvent event) {
PluginContext context = event.getContext();
PluginRuntime runtime = context.getRuntime();
Set<PropertyItemPaneProvider> providers = runtime.get(PropertyItemPaneProvider.XML_TAG);
for (PropertyItemPaneProvider provider : providers) {
addPane(provider);
}
}
};
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterRun, this.pluginListener, filter);
}
private void initPluginPane() {
@ -1038,4 +1040,10 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
// richer:form文件 daniel 改成三个字
fileChooser.addChooseFILEFilter(new ChooseFileFilter(FileExtension.FRM, appName + Toolkit.i18nText("Fine-Design_Report_Template_File")));
}
@Override
public void whenClose() {
// stop的时候 pluginListener 和 PluginFilter 都会移除
PluginListenerRegistration.getInstance().stopListen(this.pluginListener);
}
}

9
designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

@ -31,6 +31,7 @@ import com.fr.form.ui.Widget;
import com.fr.form.ui.WidgetInfoConfig;
import com.fr.general.Background;
import com.fr.log.FineLoggerFactory;
import com.fr.report.web.button.Email;
import com.fr.report.web.button.Export;
import com.fr.report.web.button.write.AppendColumnRow;
@ -223,8 +224,12 @@ public class EditToolBar extends BasicPane {
if (widget instanceof Button) {
String iconname = ((Button) widget).getIconName();
if (StringUtils.isNotBlank(iconname)) {
Image iimage = WidgetInfoConfig.getInstance().getIconManager().getIconImage(iconname);
toolBarButton.setIcon(new ImageIcon(iimage));
Image iconImage = WidgetInfoConfig.getInstance().getIconManager().getIconImage(iconname);
if (iconImage != null) {
toolBarButton.setIcon(new ImageIcon(iconImage));
} else {
FineLoggerFactory.getLogger().warn(iconname + " can not find in finedb!");
}
}
}
}

Loading…
Cancel
Save