Browse Source

Merge pull request #894 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '9054a7f6fc12f575860577ee82f397f864b6d233':
  REPORT-16567 设计器社区菜单修改 添加新子菜单
bugfix/10.0
Hades 6 years ago
parent
commit
eb58909b47
  1. 41
      designer-base/src/main/java/com/fr/design/actions/community/FacebookFansAction.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  3. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/facebook.png

41
designer-base/src/main/java/com/fr/design/actions/community/FacebookFansAction.java

@ -0,0 +1,41 @@
package com.fr.design.actions.community;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.general.IOUtils;
import javax.swing.KeyStroke;
import java.awt.event.ActionEvent;
public class FacebookFansAction extends UpAction {
public FacebookFansAction() {
this.setMenuKeySet(FACEBOOKFANS);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/bbs/facebook.png"));
}
@Override
public void actionPerformed(ActionEvent arg0) {
BrowseUtils.browser(CloudCenter.getInstance().acquireUrlByKind("facebook.fans.tw"));
}
public static final MenuKeySet FACEBOOKFANS = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'F';
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Community_FaceBook_Fans");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

5
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -13,6 +13,7 @@ import com.fr.design.actions.community.BBSAction;
import com.fr.design.actions.community.BugAction; import com.fr.design.actions.community.BugAction;
import com.fr.design.actions.community.CenterAction; import com.fr.design.actions.community.CenterAction;
import com.fr.design.actions.community.CusDemandAction; import com.fr.design.actions.community.CusDemandAction;
import com.fr.design.actions.community.FacebookFansAction;
import com.fr.design.actions.community.NeedAction; import com.fr.design.actions.community.NeedAction;
import com.fr.design.actions.community.QuestionAction; import com.fr.design.actions.community.QuestionAction;
import com.fr.design.actions.community.SignAction; import com.fr.design.actions.community.SignAction;
@ -151,7 +152,6 @@ public abstract class ToolBarMenuDock {
} }
}; };
private static final String FINEREPORT = "FineReport";
private static final int MENUBAR_HEIGHT = 22; private static final int MENUBAR_HEIGHT = 22;
private static final List<PluginEventListener> PLUGIN_LISTENERS = new ArrayList<>(); private static final List<PluginEventListener> PLUGIN_LISTENERS = new ArrayList<>();
@ -543,6 +543,9 @@ public abstract class ToolBarMenuDock {
shortCuts.add(new CusDemandAction()); shortCuts.add(new CusDemandAction());
shortCuts.add(new CenterAction()); shortCuts.add(new CenterAction());
shortCuts.add(new SignAction()); shortCuts.add(new SignAction());
if (Locale.TAIWAN.equals(GeneralContext.getLocale())) {
shortCuts.add(new FacebookFansAction());
}
return shortCuts.toArray(new ShortCut[shortCuts.size()]); return shortCuts.toArray(new ShortCut[shortCuts.size()]);
} }

BIN
designer-base/src/main/resources/com/fr/design/images/bbs/facebook.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Loading…
Cancel
Save