Browse Source

module to activator

master
zheng 7 years ago
parent
commit
e3ac9513f3
  1. 16
      designer-chart/src/com/fr/design/module/ChartDesignerModule.java
  2. 3
      designer-realize/src/com/fr/start/module/DesignerModuleActivator.java

16
designer-chart/src/com/fr/design/module/ChartDesignerModule.java

@ -33,19 +33,11 @@ import javax.swing.Icon;
* Time: 上午9:13
*/
public class ChartDesignerModule extends DesignModule {
public void start() {
super.start();
dealBeforeRegister();
register();
registerFloatEditor();
}
protected void dealBeforeRegister(){
public static void register(){
StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class);
StableFactory.getStaticMarkedInstanceObjectFromClass(ExtraChartDesignClassManagerProvider.XML_TAG, ExtraChartDesignClassManagerProvider.class);
}
private void register(){
DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup());
DesignModuleFactory.registerChartEditorClass(ChartEditor.class);
@ -58,16 +50,14 @@ public class ChartDesignerModule extends DesignModule {
ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction());
ActionFactory.registerChartMapEditorAction(new ChartMapEditorAction());
ActionFactory.registerChartCollection(ChartCollection.class);
DesignModuleFactory.registerExtraWidgetOptions(ChartTypeInterfaceManager.initWidgetOption());
DesignImageEvent.registerDefaultCallbackEvent(HistoryTemplateListPane.getInstance());
DesignImageEvent.registerDownloadSourcesEvent(new DownloadOnlineSourcesHelper());
}
protected void registerFloatEditor() {
ActionFactory.registerChartCollection(ChartCollection.class);
}
/**
* 返回设计器能打开的模板类型的一个数组列表
*

3
designer-realize/src/com/fr/start/module/DesignerModuleActivator.java

@ -1,6 +1,7 @@
package com.fr.start.module;
import com.fr.design.mainframe.loghandler.socketio.DesignerSocketIO;
import com.fr.design.module.ChartDesignerModule;
import com.fr.design.module.DesignerModule;
import com.fr.general.ModuleContext;
import com.fr.locale.InterMutableKey;
@ -19,6 +20,8 @@ public class DesignerModuleActivator extends Activator implements Prepare {
ModuleContext.startModule(DesignerModule.class.getName());
DesignerSocketIO.init();
ChartDesignerModule.register();
}
@Override

Loading…
Cancel
Save