public static void browseDotlan( final Program program, Set<String> stations, Set<String> systems, Set<String> regions) { if (stations == null) { stations = new HashSet<String>(); } if (systems == null) { systems = new HashSet<String>(); } if (regions == null) { regions = new HashSet<String>(); } if (!confirmOpenLinks(program, stations.size() + systems.size() + regions.size())) { return; } for (String station : stations) { DesktopUtil.browse("http://evemaps.dotlan.net/outpost/" + station.replace(" ", "_"), program); } for (String system : systems) { DesktopUtil.browse("http://evemaps.dotlan.net/system/" + system.replace(" ", "_"), program); } for (String region : regions) { DesktopUtil.browse("http://evemaps.dotlan.net/map/" + region.replace(" ", "_"), program); } }
@Override public void actionPerformed(final ActionEvent e) { if (MenuLookupAction.EVEMAPS_DOTLAN_STATION.name().equals(e.getActionCommand())) { browseDotlan(program, menuData.getStations(), null, null); } if (MenuLookupAction.EVEMAPS_DOTLAN_SYSTEM.name().equals(e.getActionCommand())) { browseDotlan(program, null, menuData.getSystems(), null); } if (MenuLookupAction.EVEMAPS_DOTLAN_REGION.name().equals(e.getActionCommand())) { browseDotlan(program, null, null, menuData.getRegions()); } if (MenuLookupAction.EVE_CENTRAL.name().equals(e.getActionCommand())) { if (!confirmOpenLinks(program, menuData.getMarketTypeIDs().size())) { return; } for (int marketTypeID : menuData.getMarketTypeIDs()) { DesktopUtil.browse( "http://www.eve-central.com/home/quicklook.html?typeid=" + marketTypeID, program); } } if (MenuLookupAction.EVE_MARKETDATA.name().equals(e.getActionCommand())) { if (!confirmOpenLinks(program, menuData.getMarketTypeIDs().size())) { return; } for (int marketTypeID : menuData.getMarketTypeIDs()) { DesktopUtil.browse( "http://eve-marketdata.com/price_check.php?type_id=" + marketTypeID, program); } } // Dead /* if (MenuLookupAction.EVEMARKETEER.name().equals(e.getActionCommand())) { if (!confirmOpenLinks(program, menuData.getMarketTypeIDs().size())) { return; } for (int marketTypeID : menuData.getMarketTypeIDs()) { DesktopUtil.browse("http://www.evemarketeer.com/item/info/" + marketTypeID, program); } } */ if (MenuLookupAction.EVE_MARKETS.name().equals(e.getActionCommand())) { if (!confirmOpenLinks(program, menuData.getMarketTypeIDs().size())) { return; } for (int marketTypeID : menuData.getMarketTypeIDs()) { DesktopUtil.browse( "http://www.eve-markets.net/detail.php?typeid=" + marketTypeID, program); } } // Dead /* if (MenuLookupAction.EVE_ADDICTS.name().equals(e.getActionCommand())) { if (!confirmOpenLinks(program, menuData.getMarketTypeIDs().size())) { return; } for (int marketTypeID : menuData.getMarketTypeIDs()) { DesktopUtil.browse("http://eve.addicts.nl/?typeID=" + marketTypeID, program); } } */ if (MenuLookupAction.GAMES_CHRUKER.name().equals(e.getActionCommand())) { if (!confirmOpenLinks(program, menuData.getTypeIDs().size())) { return; } for (int typeID : menuData.getTypeIDs()) { DesktopUtil.browse( "http://games.chruker.dk/eve_online/item.php?type_id=" + typeID, program); } } if (MenuLookupAction.EVE_ITEM_DATABASE.name().equals(e.getActionCommand())) { if (!confirmOpenLinks(program, menuData.getTypeNames().size())) { return; } for (String typeName : menuData.getTypeNames()) { DesktopUtil.browse( "http://wiki.eveonline.com/wiki/" + typeName.replace(" ", "_"), program); } } }