// PENDING JW: formulate with HyperlinkAction
public static class LinkBrowser implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof LinkModel) {
final LinkModel link = (LinkModel) e.getSource();
try {
Desktop desktop = Desktop.getDesktop();
desktop.browse(link.getURL().toURI());
link.setVisited(true);
} catch (Exception e1) {
// TODO: error handling
}
}