|
|
@ -120,7 +120,7 @@ public abstract class ToolBarMenuDock { |
|
|
|
///////////////////////////////menu below/////////////////////////////////////////////////
|
|
|
|
///////////////////////////////menu below/////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
private MenuDef[] menus(final ToolBarMenuDockPlus plus) { |
|
|
|
public MenuDef[] menus(final ToolBarMenuDockPlus plus) { |
|
|
|
java.util.List<MenuDef> menuList = new java.util.ArrayList<MenuDef>(); |
|
|
|
java.util.List<MenuDef> menuList = new java.util.ArrayList<MenuDef>(); |
|
|
|
// 添加文件菜单
|
|
|
|
// 添加文件菜单
|
|
|
|
menuList.add(createFileMenuDef(plus)); |
|
|
|
menuList.add(createFileMenuDef(plus)); |
|
|
@ -142,7 +142,7 @@ public abstract class ToolBarMenuDock { |
|
|
|
return menuList.toArray(new MenuDef[menuList.size()]); |
|
|
|
return menuList.toArray(new MenuDef[menuList.size()]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void insertTemplateExtendMenu(ToolBarMenuDockPlus plus, MenuDef[] menuDefs) { |
|
|
|
public void insertTemplateExtendMenu(ToolBarMenuDockPlus plus, MenuDef[] menuDefs) { |
|
|
|
// 给菜单加插件入口
|
|
|
|
// 给菜单加插件入口
|
|
|
|
for (MenuDef m : menuDefs) { |
|
|
|
for (MenuDef m : menuDefs) { |
|
|
|
switch (m.getAnchor()) { |
|
|
|
switch (m.getAnchor()) { |
|
|
@ -171,7 +171,7 @@ public abstract class ToolBarMenuDock { |
|
|
|
return plus.menus4Target(); |
|
|
|
return plus.menus4Target(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private MenuDef createFileMenuDef(ToolBarMenuDockPlus plus) { |
|
|
|
public MenuDef createFileMenuDef(ToolBarMenuDockPlus plus) { |
|
|
|
MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_File"), 'F'); |
|
|
|
MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_File"), 'F'); |
|
|
|
|
|
|
|
|
|
|
|
ShortCut[] scs = new ShortCut[0]; |
|
|
|
ShortCut[] scs = new ShortCut[0]; |
|
|
@ -231,15 +231,15 @@ public abstract class ToolBarMenuDock { |
|
|
|
* @return 菜单 |
|
|
|
* @return 菜单 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public abstract ShortCut[] createNewFileShortCuts(); |
|
|
|
public abstract ShortCut[] createNewFileShortCuts(); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 创建论坛登录面板, chart那边不需要 |
|
|
|
* 创建论坛登录面板, chart那边不需要 |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 面板组件 |
|
|
|
* @return 面板组件 |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public Component createBBSLoginPane(){ |
|
|
|
public Component createBBSLoginPane(){ |
|
|
|
return new UILabel(); |
|
|
|
return new UILabel(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -284,7 +284,7 @@ public abstract class ToolBarMenuDock { |
|
|
|
return processor == null ? new GlobalTableDataAction() : processor.createServerTDAction(); |
|
|
|
return processor == null ? new GlobalTableDataAction() : processor.createServerTDAction(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected boolean shouldShowPlugin() { |
|
|
|
private boolean shouldShowPlugin() { |
|
|
|
return FRContext.isChineseEnv() || ComparatorUtils.equals(GeneralContext.getLocale(), Locale.TAIWAN); |
|
|
|
return FRContext.isChineseEnv() || ComparatorUtils.equals(GeneralContext.getLocale(), Locale.TAIWAN); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -302,7 +302,7 @@ public abstract class ToolBarMenuDock { |
|
|
|
shortCuts.add(new FeedBackAction()); |
|
|
|
shortCuts.add(new FeedBackAction()); |
|
|
|
shortCuts.add(SeparatorDef.DEFAULT); |
|
|
|
shortCuts.add(SeparatorDef.DEFAULT); |
|
|
|
shortCuts.add(SeparatorDef.DEFAULT); |
|
|
|
shortCuts.add(SeparatorDef.DEFAULT); |
|
|
|
// shortCuts.add(new ForumAction());
|
|
|
|
// shortCuts.add(new ForumAction());
|
|
|
|
} |
|
|
|
} |
|
|
|
shortCuts.add(SeparatorDef.DEFAULT); |
|
|
|
shortCuts.add(SeparatorDef.DEFAULT); |
|
|
|
shortCuts.add(new AboutAction()); |
|
|
|
shortCuts.add(new AboutAction()); |
|
|
@ -326,7 +326,6 @@ public abstract class ToolBarMenuDock { |
|
|
|
shortCuts.add(new SignAction()); |
|
|
|
shortCuts.add(new SignAction()); |
|
|
|
return shortCuts.toArray(new ShortCut[shortCuts.size()]); |
|
|
|
return shortCuts.toArray(new ShortCut[shortCuts.size()]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public MenuDef createHelpMenuDef() { |
|
|
|
public MenuDef createHelpMenuDef() { |
|
|
|
MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_Help"), 'H'); |
|
|
|
MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_Help"), 'H'); |
|
|
|
ShortCut[] otherHelpShortCuts = createHelpShortCuts(); |
|
|
|
ShortCut[] otherHelpShortCuts = createHelpShortCuts(); |
|
|
@ -336,7 +335,6 @@ public abstract class ToolBarMenuDock { |
|
|
|
insertMenu(menuDef, MenuHandler.HELP); |
|
|
|
insertMenu(menuDef, MenuHandler.HELP); |
|
|
|
return menuDef; |
|
|
|
return menuDef; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public MenuDef createCommunityMenuDef() { |
|
|
|
public MenuDef createCommunityMenuDef() { |
|
|
|
MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_COMMUNITY"), 'C'); |
|
|
|
MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_COMMUNITY"), 'C'); |
|
|
|
ShortCut[] otherCommunityShortCuts = createCommunityShortCuts(); |
|
|
|
ShortCut[] otherCommunityShortCuts = createCommunityShortCuts(); |
|
|
@ -479,29 +477,29 @@ public abstract class ToolBarMenuDock { |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 子菜单 |
|
|
|
* @return 子菜单 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public ShortCut[] shortcut4ExportMenu(){ |
|
|
|
public ShortCut[] shortcut4ExportMenu(){ |
|
|
|
return new ShortCut[0]; |
|
|
|
return new ShortCut[0]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
public NewTemplatePane getNewTemplatePane(){ |
|
|
|
public NewTemplatePane getNewTemplatePane(){ |
|
|
|
return new NewTemplatePane() { |
|
|
|
return new NewTemplatePane() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Icon getNew() { |
|
|
|
public Icon getNew() { |
|
|
|
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/addicon.png"); |
|
|
|
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/addicon.png"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Icon getMouseOverNew() { |
|
|
|
public Icon getMouseOverNew() { |
|
|
|
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/add_press.png"); |
|
|
|
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/add_press.png"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Icon getMousePressNew() { |
|
|
|
public Icon getMousePressNew() { |
|
|
|
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/add_press.png"); |
|
|
|
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/add_press.png"); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void insertMenu(MenuDef menuDef, String anchor) { |
|
|
|
protected void insertMenu(MenuDef menuDef, String anchor) { |
|
|
@ -543,13 +541,13 @@ public abstract class ToolBarMenuDock { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 设计器退出时, 做的一些操作. |
|
|
|
* 设计器退出时, 做的一些操作. |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void shutDown(){ |
|
|
|
public void shutDown(){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private interface ShortCutMethodAction{ |
|
|
|
private interface ShortCutMethodAction{ |
|
|
@ -560,7 +558,7 @@ public abstract class ToolBarMenuDock { |
|
|
|
private abstract class AbstractShortCutMethodAction implements ShortCutMethodAction{ |
|
|
|
private abstract class AbstractShortCutMethodAction implements ShortCutMethodAction{ |
|
|
|
|
|
|
|
|
|
|
|
public ShortCut methodAction(MenuHandler handler){ |
|
|
|
public ShortCut methodAction(MenuHandler handler){ |
|
|
|
return handler.shortcut(); |
|
|
|
return handler.shortcut(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|