neil 8 years ago
parent
commit
52653d5bc7
  1. 1488
      designer_base/src/com/fr/design/locale/designer.properties
  2. 1555
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  3. 1573
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  4. 1491
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  5. 1479
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  6. 1524
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  7. 45
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

1488
designer_base/src/com/fr/design/locale/designer.properties

File diff suppressed because it is too large Load Diff

1555
designer_base/src/com/fr/design/locale/designer_en_US.properties

File diff suppressed because it is too large Load Diff

1573
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

File diff suppressed because it is too large Load Diff

1491
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

File diff suppressed because it is too large Load Diff

1479
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

File diff suppressed because it is too large Load Diff

1524
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

File diff suppressed because it is too large Load Diff

45
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -11,6 +11,7 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.community.*;
import com.fr.design.actions.file.*;
import com.fr.design.actions.help.AboutAction;
import com.fr.design.actions.help.AlphaFine.AlphafineAction;
import com.fr.design.actions.help.TutorialAction;
import com.fr.design.actions.help.WebDemoAction;
import com.fr.design.actions.server.*;
@ -36,10 +37,8 @@ import com.fr.stable.ProductConstants;
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;
import java.util.Set;
import java.util.*;
import java.util.List;
/**
* @author richer
@ -56,6 +55,7 @@ public abstract class ToolBarMenuDock {
public static final int PANLE_HEIGNT = 26;
private MenuDef[] menus;
private ToolBarDef toolBarDef;
private ArrayList<UpdateAction> shortCuts;
/**
* 更新菜单
@ -144,10 +144,35 @@ public abstract class ToolBarMenuDock {
// 添加社区菜单
addCommunityMenuDef(menuList);
// 添加全部UpdateAction到actionmanager中
getAllUpdateActions(menuList);
UpdateActionManager.getUpdateActionManager().setUpdateActions(shortCuts);
return menuList.toArray(new MenuDef[menuList.size()]);
}
public void addCommunityMenuDef(java.util.List<MenuDef> menuList){
private List<UpdateAction> getAllUpdateActions(List<MenuDef> menuList) {
shortCuts = new ArrayList<>();
for (MenuDef menuDef : menuList) {
addUpdateActionToList(menuDef);
}
return shortCuts;
}
private void addUpdateActionToList(MenuDef menuDef) {
if (menuDef instanceof OpenRecentReportMenuDef) {
return;
}
for (ShortCut shortCut : menuDef.getShortcutList()) {
if (shortCut instanceof UpdateAction) {
shortCuts.add((UpdateAction) shortCut);
} else if (shortCut instanceof MenuDef) {
addUpdateActionToList((MenuDef) shortCut);
}
}
}
public void addCommunityMenuDef(java.util.List<MenuDef> menuList){
Locale locale = FRContext.getLocale();
Locale [] locales =supportCommunityLocales();
for(int i = 0; i < locales.length; i++) {
@ -158,7 +183,7 @@ public abstract class ToolBarMenuDock {
}
}
public Locale[] supportCommunityLocales() {
public Locale[] supportCommunityLocales() {
return new Locale[]{
Locale.CHINA,
Locale.TAIWAN,
@ -266,6 +291,10 @@ public abstract class ToolBarMenuDock {
return new UILabel();
}
public Component createAlphafinePane(){
return new UILabel();
}
protected MenuDef createServerMenuDef(ToolBarMenuDockPlus plus) {
MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_M-Server"), 'S');
@ -332,6 +361,8 @@ public abstract class ToolBarMenuDock {
}
shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new AboutAction());
shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(new AlphafineAction());
return shortCuts.toArray(new ShortCut[shortCuts.size()]);
}
@ -544,7 +575,7 @@ public abstract class ToolBarMenuDock {
for (MenuHandler handler : target) {
int insertPosition = handler.insertPosition(menuDef.getShortCutCount());
if (insertPosition == MenuHandler.HIDE) {
if (insertPosition == MenuHandler.HIDE) {
return;
}
ShortCut shortCut = action.methodAction(handler);

Loading…
Cancel
Save