MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getList

Method getList

ij/src/main/java/ij/macro/Functions.java:5083–5122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5081 }
5082
5083 Variable[] getList() {
5084 String key = getStringArg().toLowerCase();
5085 if (key.equals("java.properties")) {
5086 Properties props = System.getProperties();
5087 Vector v = new Vector();
5088 for (Enumeration en=props.keys(); en.hasMoreElements();)
5089 v.addElement((String)en.nextElement());
5090 Variable[] array = new Variable[v.size()];
5091 for (int i=0; i<array.length; i++)
5092 array[i] = new Variable(0, 0.0, (String)v.elementAt(i));
5093 return array;
5094 } else if (key.equals("image.titles")) {
5095 String[] titles = WindowManager.getImageTitles();
5096 Variable[] array = new Variable[titles.length];
5097 for (int i=0; i<titles.length; i++)
5098 array[i] = new Variable(0, 0.0, titles[i]);
5099 return array;
5100 } else if (key.equals("window.titles")) {
5101 String[] titles = WindowManager.getNonImageTitles();
5102 Variable[] array = new Variable[titles.length];
5103 for (int i=0; i<titles.length; i++)
5104 array[i] = new Variable(0, 0.0, titles[i]);
5105 return array;
5106 } else if (key.equals("threshold.methods")) {
5107 String[] list = AutoThresholder.getMethods();
5108 Variable[] array = new Variable[list.length];
5109 for (int i=0; i<list.length; i++)
5110 array[i] = new Variable(0, 0.0, list[i]);
5111 return array;
5112 } else if (key.equals("luts")) {
5113 String[] list = IJ.getLuts();
5114 Variable[] array = new Variable[list.length];
5115 for (int i=0; i<list.length; i++)
5116 array[i] = new Variable(0, 0.0, list[i]);
5117 return array;
5118 } else {
5119 interp.error("Unvalid key");
5120 return null;
5121 }
5122 }
5123
5124 String doString() {
5125 interp.getToken();

Callers 1

getArrayFunctionMethod · 0.95

Calls 10

getStringArgMethod · 0.95
getImageTitlesMethod · 0.95
getNonImageTitlesMethod · 0.95
getMethodsMethod · 0.95
getLutsMethod · 0.95
equalsMethod · 0.45
getPropertiesMethod · 0.45
addElementMethod · 0.45
sizeMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected