Browse Source

Merge pull request #1679 in BA/design from ~RICHIE/design:feature/10.0 to feature/10.0

* commit '4a7b9b54b77340931ace1d07b106675f26352348':
  无JIRA任务 修改一下命名
  无JIRA任务 修改一下命名
  无JIRA任务 修改一下命名
master
superman 7 years ago
parent
commit
2e7e418ad6
  1. 52
      designer_base/src/com/fr/design/actions/ToolbarActionManager.java
  2. 3
      designer_chart/src/com/fr/plugin/chart/map/server/ChartMapEditorAction.java

52
designer_base/src/com/fr/design/actions/ToolbarActionManager.java

@ -1,52 +0,0 @@
/*
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved.
*/
package com.fr.design.actions;
import java.util.ArrayList;
import java.util.List;
import com.fr.design.menu.MenuDef;
public class ToolbarActionManager {
private static ToolbarActionManager toolbarActionManager = null; //key map
//所有的Action Map.
private List<UpdateAction> actionList = new ArrayList<UpdateAction>();
private List<MenuDef> menuList=new ArrayList<MenuDef>();
private ToolbarActionManager() {
}
public static ToolbarActionManager createToolbarActionManager() {
if (toolbarActionManager == null) {
toolbarActionManager = new ToolbarActionManager();
}
return toolbarActionManager;
}
public void registerAction(UpdateAction updateAction) {
actionList.add(updateAction);
}
public void registerAction(MenuDef menuDef) {
menuList.add(menuDef);
}
public void update() {
int actionCount = actionList.size();
for (int i = 0; i < actionCount; i++) {
UpdateAction action = actionList.get(i);
if (action != null) {
action.update();
}
}
actionCount=menuList.size();
for(int i=0;i<actionCount;i++){
MenuDef menuDef=menuList.get(i);
if(menuDef!=null){
menuDef.updateMenu();
}
}
}
}

3
designer_chart/src/com/fr/plugin/chart/map/server/ChartMapEditorAction.java

@ -1,6 +1,5 @@
package com.fr.plugin.chart.map.server; package com.fr.plugin.chart.map.server;
import com.fr.base.ConfigManager;
import com.fr.base.Env; import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -25,7 +24,7 @@ public class ChartMapEditorAction extends UpdateAction {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
int port = DesignerEnvManager.getEnvManager().getJettyServerPort(); int port = DesignerEnvManager.getEnvManager().getJettyServerPort();
String web = GeneralContext.getCurrentAppNameOfEnv(); String web = GeneralContext.getCurrentAppNameOfEnv();
String serverlet = ConfigManager.getProviderInstance().getServletMapping(); String serverlet = com.fr.base.ConfigManager.getProviderInstance().getServletMapping();
Env env = FRContext.getCurrentEnv(); Env env = FRContext.getCurrentEnv();
StartServer.browserURLWithLocalEnv(env.isLocalEnv() ? String.format("http://localhost:%d/%s/%s?op=map", port, web, serverlet) : env.getPath() + "?op=map"); StartServer.browserURLWithLocalEnv(env.isLocalEnv() ? String.format("http://localhost:%d/%s/%s?op=map", port, web, serverlet) : env.getPath() + "?op=map");
} }

Loading…
Cancel
Save