}
});
}
private void registerDoubleClickListener(ClusterMapMediator mediator) {
final GraphPanel panel = mediator.getGraphPanel();
// a hack to disable the default double-click listener
// that comes with the clustermap API, which is impl
// for a Java Application not an Applet
MouseListener[] listeners = panel.getMouseListeners();
//for (int i = 0; i < listeners.length; i++) {
if(listeners != null && listeners.length == 2)
panel.removeMouseListener(listeners[1]);
//}
// adds our own MouseListener for opening
// URL in applet context.
panel.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 1) {
// the coord where the user has double-clicked
int x = e.getX();
int y = e.getY();
// resolve the object if the user double-clicked on
// a cluster object.
Object obj = panel.resolveObject(x, y);
if (obj != null && (obj instanceof DefaultObject)) {
DefaultObject defObj = (DefaultObject) obj;
if (defObj.getLocation() != null) {
URL url;
try {