Skip to content
Snippets Groups Projects
Commit 12e065c5 authored by pompert's avatar pompert
Browse files

BugID: 725

Additions:
-None
Mods:
-Altered the getPanels and isKey methods to check if a given key is present in the front of the treenode name being passed to it.
parent 3f70bc17
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
package nl.astron.lofar.sas.otb.util; package nl.astron.lofar.sas.otb.util;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.Vector; import java.util.Vector;
/** /**
...@@ -39,9 +40,9 @@ public class ResultPanelHelper { ...@@ -39,9 +40,9 @@ public class ResultPanelHelper {
//BBS //BBS
itsVector = new Vector<String>(); itsVector = new Vector<String>();
addBasePanels(); //addBasePanels();
itsVector.add("nl.astron.lofar.sas.otbcomponents.parmDBPlotPanel"); itsVector.add("nl.astron.lofar.sas.otbcomponents.ParmDBPlotPanel");
itsPanelMap.put("BBS",itsVector); itsPanelMap.put("ParmDB",itsVector);
} }
...@@ -63,7 +64,15 @@ public class ResultPanelHelper { ...@@ -63,7 +64,15 @@ public class ResultPanelHelper {
* @return the Vector that contains all panels for this key * @return the Vector that contains all panels for this key
*/ */
public Vector getPanels(String aKey) { public Vector getPanels(String aKey) {
return itsPanelMap.get(aKey); Vector returnVector = null;
Iterator i = itsPanelMap.keySet().iterator();
while(i.hasNext()){
String key = (String)i.next();
if(aKey.indexOf(key) == 0){
returnVector = itsPanelMap.get(key);
}
}
return returnVector;
} }
/** /**
...@@ -73,7 +82,15 @@ public class ResultPanelHelper { ...@@ -73,7 +82,15 @@ public class ResultPanelHelper {
*@return true if key was available, false if not *@return true if key was available, false if not
*/ */
public boolean isKey(String aKey) { public boolean isKey(String aKey) {
return itsPanelMap.containsKey(aKey); boolean returnBool = false;
Iterator i = itsPanelMap.keySet().iterator();
while(i.hasNext()){
String key = (String)i.next();
if(aKey.indexOf(key) == 0){
returnBool = true;
}
}
return returnBool;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment