package geniusweb.actions; import java.awt.event.ActionEvent; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.util.logging.Level; import tudelft.utilities.logging.Reporter; public class HelpAction extends GuiAction { private String helpuri = "https://tracinsy.ewi.tudelft.nl/pubtrac/GeniusWeb/wiki/ProfileEditor"; public HelpAction(Reporter log) { super("Help", log); putValue(SHORT_DESCRIPTION, "Open Help webpage"); // no accelerator key. Apple uses shift-command-questionmark // however ? is not supported as shortcut key in java because // "it's not on the primary layer" } @Override public void actionPerformed(ActionEvent evt) { try { java.awt.Desktop.getDesktop().browse(new URI(helpuri)); } catch (IOException | URISyntaxException e) { e.printStackTrace(); log.log(Level.SEVERE, "Failed to open help webpage:" + e.getMessage()); } } }