@ -0,0 +1,74 @@
|
||||
package com.fr.design.actions.community; |
||||
|
||||
import java.awt.Desktop; |
||||
import java.awt.event.ActionEvent; |
||||
import java.io.IOException; |
||||
import java.net.URI; |
||||
import java.net.URISyntaxException; |
||||
|
||||
import javax.swing.JOptionPane; |
||||
import javax.swing.KeyStroke; |
||||
|
||||
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.Inter; |
||||
import com.fr.general.SiteCenter; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
public class BBSAction extends UpdateAction |
||||
{ |
||||
|
||||
|
||||
public BBSAction() |
||||
{ |
||||
this.setMenuKeySet(BBS); |
||||
this.setName(getMenuKeySet().getMenuName()); |
||||
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs.png")); |
||||
// TODO Auto-generated constructor stub
|
||||
} |
||||
|
||||
/** |
||||
* 动作 |
||||
* @param e 事件 |
||||
*/ |
||||
@Override |
||||
public void actionPerformed(ActionEvent arg0) |
||||
{ |
||||
String url = SiteCenter.getInstance().acquireUrlByKind("bbs"); |
||||
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, Inter.getLocText("Set_default_browser")); |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (URISyntaxException exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (Exception exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
FRContext.getLogger().error("Can not open the browser for URL: " + url); |
||||
} |
||||
} |
||||
public static final MenuKeySet BBS = new MenuKeySet() { |
||||
@Override |
||||
public char getMnemonic() { |
||||
return 'B'; |
||||
} |
||||
|
||||
@Override |
||||
public String getMenuName() { |
||||
return Inter.getLocText("FR-Designer_COMMUNITY_BBS"); |
||||
} |
||||
|
||||
@Override |
||||
public KeyStroke getKeyStroke() { |
||||
return null; |
||||
} |
||||
}; |
||||
|
||||
} |
@ -0,0 +1,72 @@
|
||||
package com.fr.design.actions.community; |
||||
|
||||
import java.awt.Desktop; |
||||
import java.awt.event.ActionEvent; |
||||
import java.io.IOException; |
||||
import java.net.URI; |
||||
import java.net.URISyntaxException; |
||||
|
||||
import javax.swing.JOptionPane; |
||||
import javax.swing.KeyStroke; |
||||
|
||||
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.Inter; |
||||
import com.fr.general.SiteCenter; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
public class BugAction extends UpdateAction |
||||
{ |
||||
|
||||
public BugAction() |
||||
{ this.setMenuKeySet(BUG); |
||||
this.setName(getMenuKeySet().getMenuName()); |
||||
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bug.png")); |
||||
// TODO Auto-generated constructor stub
|
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent arg0) |
||||
{ |
||||
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.bugs"); |
||||
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, Inter.getLocText("Set_default_browser")); |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (URISyntaxException exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (Exception exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
FRContext.getLogger().error("Can not open the browser for URL: " + url); |
||||
} |
||||
|
||||
} |
||||
public static final MenuKeySet BUG = new MenuKeySet() { |
||||
|
||||
@Override |
||||
public String getMenuName() { |
||||
return Inter.getLocText("FR-Designer_COMMUNITY_BUG"); |
||||
} |
||||
|
||||
@Override |
||||
public KeyStroke getKeyStroke() { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public char getMnemonic() |
||||
{ |
||||
// TODO Auto-generated method stub
|
||||
return 'U'; |
||||
} |
||||
}; |
||||
|
||||
} |
@ -0,0 +1,70 @@
|
||||
package com.fr.design.actions.community; |
||||
|
||||
import java.awt.Desktop; |
||||
import java.awt.event.ActionEvent; |
||||
import java.io.IOException; |
||||
import java.net.URI; |
||||
import java.net.URISyntaxException; |
||||
|
||||
import javax.swing.JOptionPane; |
||||
import javax.swing.KeyStroke; |
||||
|
||||
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.Inter; |
||||
import com.fr.general.SiteCenter; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
public class NeedAction extends UpdateAction |
||||
{ |
||||
|
||||
public NeedAction() |
||||
{ |
||||
this.setMenuKeySet(NEED); |
||||
this.setName(getMenuKeySet().getMenuName()); |
||||
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/need.png")); |
||||
// TODO Auto-generated constructor stub
|
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent arg0) |
||||
{ |
||||
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.needs"); |
||||
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, Inter.getLocText("Set_default_browser")); |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (URISyntaxException exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (Exception exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
FRContext.getLogger().error("Can not open the browser for URL: " + url); |
||||
} |
||||
|
||||
} |
||||
public static final MenuKeySet NEED = new MenuKeySet() { |
||||
@Override |
||||
public char getMnemonic() { |
||||
return 'N'; |
||||
} |
||||
|
||||
@Override |
||||
public String getMenuName() { |
||||
return Inter.getLocText("FR-Designer_COMMUNITY_NEED"); |
||||
} |
||||
|
||||
@Override |
||||
public KeyStroke getKeyStroke() { |
||||
return null; |
||||
} |
||||
}; |
||||
|
||||
} |
@ -0,0 +1,69 @@
|
||||
package com.fr.design.actions.community; |
||||
|
||||
import java.awt.Desktop; |
||||
import java.awt.event.ActionEvent; |
||||
import java.io.IOException; |
||||
import java.net.URI; |
||||
import java.net.URISyntaxException; |
||||
|
||||
import javax.swing.JOptionPane; |
||||
import javax.swing.KeyStroke; |
||||
|
||||
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.Inter; |
||||
import com.fr.general.SiteCenter; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
public class QuestionAction extends UpdateAction |
||||
{ |
||||
|
||||
public QuestionAction() |
||||
{ this.setMenuKeySet(QUESTIONS); |
||||
this.setName(getMenuKeySet().getMenuName()); |
||||
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/questions.png")); |
||||
// TODO Auto-generated constructor stub
|
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent arg0) |
||||
{ |
||||
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.questions"); |
||||
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, Inter.getLocText("Set_default_browser")); |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (URISyntaxException exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (Exception exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
FRContext.getLogger().error("Can not open the browser for URL: " + url); |
||||
} |
||||
|
||||
} |
||||
public static final MenuKeySet QUESTIONS = new MenuKeySet() { |
||||
@Override |
||||
public char getMnemonic() { |
||||
return 'Q'; |
||||
} |
||||
|
||||
@Override |
||||
public String getMenuName() { |
||||
return Inter.getLocText("FR-Designer_COMMUNITY_QUESTIONS"); |
||||
} |
||||
|
||||
@Override |
||||
public KeyStroke getKeyStroke() { |
||||
return null; |
||||
} |
||||
}; |
||||
|
||||
} |
@ -0,0 +1,70 @@
|
||||
package com.fr.design.actions.community; |
||||
|
||||
import java.awt.Desktop; |
||||
import java.awt.event.ActionEvent; |
||||
import java.io.IOException; |
||||
import java.net.URI; |
||||
import java.net.URISyntaxException; |
||||
|
||||
import javax.swing.JOptionPane; |
||||
import javax.swing.KeyStroke; |
||||
|
||||
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.Inter; |
||||
import com.fr.general.SiteCenter; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
public class SignAction extends UpdateAction |
||||
{ |
||||
|
||||
public SignAction() |
||||
{ |
||||
this.setMenuKeySet(SIGN); |
||||
this.setName(getMenuKeySet().getMenuName()); |
||||
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/signature.png")); |
||||
// TODO Auto-generated constructor stub
|
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent arg0) |
||||
{ |
||||
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.aut"); |
||||
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, Inter.getLocText("Set_default_browser")); |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (URISyntaxException exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (Exception exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
FRContext.getLogger().error("Can not open the browser for URL: " + url); |
||||
} |
||||
|
||||
} |
||||
public static final MenuKeySet SIGN = new MenuKeySet() { |
||||
@Override |
||||
public char getMnemonic() { |
||||
return 'S'; |
||||
} |
||||
|
||||
@Override |
||||
public String getMenuName() { |
||||
return Inter.getLocText("FR-Designer_COMMUNITY_SIGN"); |
||||
} |
||||
|
||||
@Override |
||||
public KeyStroke getKeyStroke() { |
||||
return null; |
||||
} |
||||
}; |
||||
|
||||
} |
@ -0,0 +1,70 @@
|
||||
package com.fr.design.actions.community; |
||||
|
||||
import java.awt.Desktop; |
||||
import java.awt.event.ActionEvent; |
||||
import java.io.IOException; |
||||
import java.net.URI; |
||||
import java.net.URISyntaxException; |
||||
|
||||
import javax.swing.JOptionPane; |
||||
import javax.swing.KeyStroke; |
||||
|
||||
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.Inter; |
||||
import com.fr.general.SiteCenter; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
public class UpAction extends UpdateAction |
||||
{ |
||||
|
||||
public UpAction() |
||||
{ |
||||
this.setMenuKeySet(UPDATE); |
||||
this.setName(getMenuKeySet().getMenuName()); |
||||
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/update.png")); |
||||
// TODO Auto-generated constructor stub
|
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent arg0) |
||||
{ |
||||
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.update"); |
||||
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, Inter.getLocText("Set_default_browser")); |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (URISyntaxException exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (Exception exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
FRContext.getLogger().error("Can not open the browser for URL: " + url); |
||||
} |
||||
|
||||
} |
||||
public static final MenuKeySet UPDATE = new MenuKeySet() { |
||||
@Override |
||||
public char getMnemonic() { |
||||
return 'U'; |
||||
} |
||||
|
||||
@Override |
||||
public String getMenuName() { |
||||
return Inter.getLocText("FR-Designer_COMMUNITY_UPDATE"); |
||||
} |
||||
|
||||
@Override |
||||
public KeyStroke getKeyStroke() { |
||||
return null; |
||||
} |
||||
}; |
||||
|
||||
} |
@ -0,0 +1,70 @@
|
||||
package com.fr.design.actions.community; |
||||
|
||||
import java.awt.Desktop; |
||||
import java.awt.event.ActionEvent; |
||||
import java.io.IOException; |
||||
import java.net.URI; |
||||
import java.net.URISyntaxException; |
||||
|
||||
import javax.swing.JOptionPane; |
||||
import javax.swing.KeyStroke; |
||||
|
||||
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.Inter; |
||||
import com.fr.general.SiteCenter; |
||||
import com.fr.stable.StringUtils; |
||||
|
||||
public class VideoAction extends UpdateAction |
||||
{ |
||||
|
||||
public VideoAction() |
||||
{ |
||||
this.setMenuKeySet(VIDEO); |
||||
this.setName(getMenuKeySet().getMenuName()); |
||||
this.setMnemonic(getMenuKeySet().getMnemonic()); |
||||
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/video.png")); |
||||
// TODO Auto-generated constructor stub
|
||||
} |
||||
|
||||
@Override |
||||
public void actionPerformed(ActionEvent arg0) |
||||
{ |
||||
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.video"); |
||||
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, Inter.getLocText("Set_default_browser")); |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (URISyntaxException exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
} catch (Exception exp) { |
||||
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); |
||||
FRContext.getLogger().error("Can not open the browser for URL: " + url); |
||||
} |
||||
|
||||
} |
||||
public static final MenuKeySet VIDEO = new MenuKeySet() { |
||||
@Override |
||||
public char getMnemonic() { |
||||
return 'V'; |
||||
} |
||||
|
||||
@Override |
||||
public String getMenuName() { |
||||
return Inter.getLocText("FR-Designer_COMMUNITY_VIDEO"); |
||||
} |
||||
|
||||
@Override |
||||
public KeyStroke getKeyStroke() { |
||||
return null; |
||||
} |
||||
}; |
||||
|
||||
} |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 522 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 403 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.1 KiB |