Browse Source
* commit 'fb02413bf73e6342113b49da3b2af052a5126bca': rt 跟ju讨论,OEM这个还是StableFactory比较合适二开.另外增加接口异常捕获,规避开放接口存在的一些风险 REPORT-16249 10OEM的启动页替换接口bugfix/10.0
zack
6 years ago
6 changed files with 122 additions and 3 deletions
@ -0,0 +1,38 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.design.menu.MenuDef; |
||||
import com.fr.start.SplashStrategy; |
||||
|
||||
import java.awt.image.BufferedImage; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 设计器Oem接口 |
||||
*/ |
||||
public interface OemProcessor { |
||||
public static final String MARK_STRING = "OemProcessor"; |
||||
|
||||
/** |
||||
* 启动动画,如果不替换则返回null |
||||
* |
||||
* @return |
||||
*/ |
||||
SplashStrategy createSplashStrategy(); |
||||
|
||||
/** |
||||
* 替换标题图标--DesignerFrame.initTitleIcon |
||||
* 如果不替换则返回null |
||||
* |
||||
* @return |
||||
*/ |
||||
List<BufferedImage> createTitleIcon(); |
||||
|
||||
/** |
||||
* 处理设计器菜单(增删改) |
||||
* |
||||
* @param menuDefs 已加载的菜单 |
||||
* @return 新的菜单数组 |
||||
*/ |
||||
MenuDef[] dealWithMenuDef(MenuDef[] menuDefs); |
||||
|
||||
} |
@ -0,0 +1,25 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.fun.OemProcessor; |
||||
import com.fr.design.menu.MenuDef; |
||||
import com.fr.start.SplashStrategy; |
||||
|
||||
import java.awt.image.BufferedImage; |
||||
import java.util.List; |
||||
|
||||
public abstract class AbstractOemProcessor implements OemProcessor{ |
||||
@Override |
||||
public MenuDef[] dealWithMenuDef(MenuDef[] menuDefs) { |
||||
return menuDefs; |
||||
} |
||||
|
||||
@Override |
||||
public List<BufferedImage> createTitleIcon() { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public SplashStrategy createSplashStrategy() { |
||||
return null; |
||||
} |
||||
} |
@ -0,0 +1,14 @@
|
||||
package com.fr.start; |
||||
|
||||
import com.fr.design.fun.OemProcessor; |
||||
import com.fr.stable.bridge.StableFactory; |
||||
|
||||
/** |
||||
* OEM处理中心 |
||||
*/ |
||||
public class OemHandler { |
||||
|
||||
public static OemProcessor findOem() { |
||||
return StableFactory.getMarkedInstanceObjectFromClass(OemProcessor.MARK_STRING, OemProcessor.class); |
||||
} |
||||
} |
Loading…
Reference in new issue