Browse Source

REPORT-10171

final/10.0
Mata.Li 6 years ago
parent
commit
18ef9e55f5
  1. 4
      designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java
  2. 2
      designer-base/src/main/java/com/fr/design/actions/community/BugAction.java
  3. 68
      designer-base/src/main/java/com/fr/design/actions/community/CenterAction.java
  4. 68
      designer-base/src/main/java/com/fr/design/actions/community/CusDemandAction.java
  5. 4
      designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java
  6. 2
      designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java
  7. 2
      designer-base/src/main/java/com/fr/design/actions/community/SignAction.java
  8. 70
      designer-base/src/main/java/com/fr/design/actions/community/TechSolutionAction.java
  9. 2
      designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java
  10. 2
      designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
  11. 9
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  12. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/bbs.png
  13. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/bug.png
  14. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/center.png
  15. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/demand.png
  16. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/help.png
  17. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/need.png
  18. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/question.png
  19. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/sign.png
  20. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/solotion.png
  21. BIN
      designer-base/src/main/resources/com/fr/design/images/bbs/video.png

4
designer-base/src/main/java/com/fr/design/actions/community/BBSAction.java

@ -25,13 +25,13 @@ public class BBSAction extends UpdateAction
this.setMenuKeySet(BBS);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/bbs.png"));
}
/**
* 动作
* @param e 事件
* @param arg0 事件
*/
@Override
public void actionPerformed(ActionEvent arg0)

2
designer-base/src/main/java/com/fr/design/actions/community/BugAction.java

@ -23,7 +23,7 @@ public class BugAction extends UpdateAction
{ this.setMenuKeySet(BUG);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bug.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/bug.png"));
}

68
designer-base/src/main/java/com/fr/design/actions/community/CenterAction.java

@ -0,0 +1,68 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
/**
* Created by XINZAI on 2018/8/23.
*/
public class CenterAction extends UpAction{
public CenterAction()
{
this.setMenuKeySet(CENTER);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/center.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.center");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
}
public static final MenuKeySet CENTER = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'C';
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Commuinity_Center");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

68
designer-base/src/main/java/com/fr/design/actions/community/CusDemandAction.java

@ -0,0 +1,68 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
/**
* Created by XINZAI on 2018/8/23.
*/
public class CusDemandAction extends UpAction{
public CusDemandAction()
{
this.setMenuKeySet(DEMAND);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/demand.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.demand");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
}
public static final MenuKeySet DEMAND = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'D';
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Commuinity_Demand");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

4
designer-base/src/main/java/com/fr/design/actions/community/NeedAction.java

@ -24,8 +24,8 @@ public class NeedAction extends UpdateAction
this.setMenuKeySet(NEED);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/need.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/need.png"));
}
@Override

2
designer-base/src/main/java/com/fr/design/actions/community/QuestionAction.java

@ -23,7 +23,7 @@ public class QuestionAction extends UpdateAction
{ this.setMenuKeySet(QUESTIONS);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/questions.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/question.png"));
}

2
designer-base/src/main/java/com/fr/design/actions/community/SignAction.java

@ -24,7 +24,7 @@ public class SignAction extends UpdateAction
this.setMenuKeySet(SIGN);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/signature.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/sign.png"));
}

70
designer-base/src/main/java/com/fr/design/actions/community/TechSolutionAction.java

@ -0,0 +1,70 @@
package com.fr.design.actions.community;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
/**
* Created by XINZAI on 2018/8/23.
*/
public class TechSolutionAction extends UpdateAction{
public TechSolutionAction()
{
this.setMenuKeySet(TSO);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images//bbs/solotion.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.solution");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Default_Browser"));
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
} catch (Exception exp) {
FineLoggerFactory.getLogger().error(exp.getMessage(), exp);
FineLoggerFactory.getLogger().error("Can not open the browser for URL: " + url);
}
}
public static final MenuKeySet TSO = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'T';
}
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Commuinity_Solution");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

2
designer-base/src/main/java/com/fr/design/actions/community/VideoAction.java

@ -25,7 +25,7 @@ public class VideoAction extends UpdateAction
this.setMenuKeySet(VIDEO);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/video.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/video.png"));
}

2
designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java

@ -31,7 +31,7 @@ public class TutorialAction extends UpdateAction {
this.setMenuKeySet(HELP_TUTORIAL);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/help.png"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs/help.png"));
this.setAccelerator(getMenuKeySet().getKeyStroke());
}

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

@ -10,9 +10,12 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.community.BBSAction;
import com.fr.design.actions.community.BugAction;
import com.fr.design.actions.community.CenterAction;
import com.fr.design.actions.community.CusDemandAction;
import com.fr.design.actions.community.NeedAction;
import com.fr.design.actions.community.QuestionAction;
import com.fr.design.actions.community.SignAction;
import com.fr.design.actions.community.TechSolutionAction;
import com.fr.design.actions.community.UpAction;
import com.fr.design.actions.community.VideoAction;
import com.fr.design.actions.file.CloseCurrentTemplateAction;
@ -493,9 +496,11 @@ public abstract class ToolBarMenuDock {
shortCuts.add(new VideoAction());
shortCuts.add(new TutorialAction());
shortCuts.add(new QuestionAction());
shortCuts.add(new UpAction());
shortCuts.add(new NeedAction());
shortCuts.add(new TechSolutionAction());
shortCuts.add(new BugAction());
shortCuts.add(new NeedAction());
shortCuts.add(new CusDemandAction());
shortCuts.add(new CenterAction());
shortCuts.add(new SignAction());
return shortCuts.toArray(new ShortCut[shortCuts.size()]);
}

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Loading…
Cancel
Save