|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|