From a38e0de241a801b33f84298c5ad157c52062f247 Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 20 Sep 2010 08:57:28 +0000 Subject: [PATCH] layout the menu with a minimum number of host labels --- src/jalview/ws/jws2/Jws2Discoverer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jalview/ws/jws2/Jws2Discoverer.java b/src/jalview/ws/jws2/Jws2Discoverer.java index 1f3eee9..d9b72ff 100644 --- a/src/jalview/ws/jws2/Jws2Discoverer.java +++ b/src/jalview/ws/jws2/Jws2Discoverer.java @@ -405,6 +405,7 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI } } if (!byhost && !hostLabels.contains(host + service.serviceType+service.getActionText())) + //!hostLabels.contains(host + (bytype ? service.serviceType+service.getActionText() : ""))) { // add a marker indicating where this service is hosted // relies on services from the same host being listed in a contiguous @@ -415,8 +416,10 @@ public class Jws2Discoverer implements Runnable, WSMenuEntryProviderI { atpoint.add(hitm = new JMenuItem(host)); hitm.setForeground(Color.blue); + lasthost = host; } - hostLabels.addElement(host + service.serviceType+service.getActionText()); + hostLabels.addElement(host + service.serviceType+service.getActionText() ); + // hostLabels.addElement(host + (bytype ? service.serviceType+service.getActionText() : "")); } msacl.attachWSMenuEntry(atpoint, service, alignFrame); /* -- 1.7.10.2