package org.positrium.ui.action;

import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.dokukino.genkidama.DHTConfig;

public class DashboardAwtAction implements ActionListener {
	public static Log logger = LogFactory.getLog(DashboardAwtAction.class);

	/**
	 * <code>http://genkidama.dokukino.com/</code>を開くリンクアクション
	 * @return
	 */
	@Override
	public void actionPerformed(ActionEvent e) {

		Desktop desktop = Desktop.getDesktop();
		try {
			desktop.browse(new URI(DHTConfig.DHT_DASHBOARD_URL));
		} catch (IOException e1) {
			logger.error("Error Occurs:", e1);
		} catch (URISyntaxException e1) {
			logger.error("Error Occurs:", e1);
		}
	}

}
