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

Method sort

ij/src/main/java/ij/text/TextPanel.java:1262–1284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1260 }
1261
1262 private void sort() {
1263 ResultsTable rt2 = getOrCreateResultsTable();
1264 if (rt2==null)
1265 return;
1266 String[] headers = rt2.getHeadings();
1267 String[] headers2 = headers;
1268 if (headers[0].equals("Label")) {
1269 headers = new String[headers.length-1];
1270 for (int i=0; i<headers.length; i++)
1271 headers[i] = headers2[i+1];
1272 }
1273 GenericDialog gd = new GenericDialog("Sort Table");
1274 gd.addChoice ("Column: ", headers, headers[0]);
1275 gd.showDialog();
1276 if (gd.wasCanceled())
1277 return;
1278 String column = gd.getNextChoice();
1279 rt2.sort(column);
1280 rt2.show(title);
1281 scrollToTop();
1282 if (IJ.recording())
1283 Recorder.record("Table.sort", column);
1284 }
1285
1286}

Callers 1

doCommandMethod · 0.95

Calls 12

getHeadingsMethod · 0.95
addChoiceMethod · 0.95
showDialogMethod · 0.95
wasCanceledMethod · 0.95
getNextChoiceMethod · 0.95
sortMethod · 0.95
showMethod · 0.95
scrollToTopMethod · 0.95
recordingMethod · 0.95
recordMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected