source: domaineditor/src/main/java/geniusweb/actions/HelpAction.java

Last change on this file was 52, checked in by ruud, 21 months ago

Fixed small issues in domaineditor.

File size: 935 bytes
Line 
1package geniusweb.actions;
2
3import java.awt.event.ActionEvent;
4import java.io.IOException;
5import java.net.URI;
6import java.net.URISyntaxException;
7import java.util.logging.Level;
8
9import tudelft.utilities.logging.Reporter;
10
11public class HelpAction extends GuiAction {
12
13 private String helpuri = "https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWeb/wiki/ProfileEditor";
14
15 public HelpAction(Reporter log) {
16 super("Help", log);
17 putValue(SHORT_DESCRIPTION, "Open Help webpage");
18 // no accelerator key. Apple uses shift-command-questionmark
19 // however ? is not supported as shortcut key in java because
20 // "it's not on the primary layer"
21 }
22
23 @Override
24 public void actionPerformed(ActionEvent evt) {
25 try {
26 java.awt.Desktop.getDesktop().browse(new URI(helpuri));
27 } catch (IOException | URISyntaxException e) {
28 e.printStackTrace();
29 log.log(Level.SEVERE,
30 "Failed to open help webpage:" + e.getMessage());
31 }
32 }
33
34}
Note: See TracBrowser for help on using the repository browser.