/** * Invoked when a mouse button was clicked. * * @param e The MouseEvent that holds all the information. */ @Override public void mouseClicked(MouseEvent e) { try { if (e.getClickCount() > 1) { Tile tile = canvas.convertToMapTile(e.getX(), e.getY()); Colony colony = tile.getColony(); if (colony != null) { if (FreeColDebugger.isInDebugMode(FreeColDebugger.DebugMode.MENUS)) { canvas.showForeignColony(colony); } else { canvas.showColonyPanel(colony, null); } } } else { canvas.requestFocus(); } } catch (Exception ex) { logger.log(Level.WARNING, "Error in mouseClicked!", ex); } }