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

Method setSelection

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

Source from the content-addressed store, hash-verified

7527 }
7528
7529 private Variable setSelection() {
7530 interp.getLeftParen();
7531 double from = interp.getExpression();
7532 interp.getComma();
7533 double to = interp.getExpression();
7534 ResultsTable rt = getResultsTable(getTitle());
7535 String title = rt.getTitle();
7536 Frame f = WindowManager.getFrame(title);
7537 if (f!=null && (f instanceof TextWindow)){
7538 TextWindow tWin = (TextWindow)f;
7539 if (from == -1 && to == -1)
7540 tWin.getTextPanel().resetSelection();
7541 else
7542 tWin.getTextPanel().setSelection((int)from, (int)to);
7543 return null;
7544 }
7545 interp.error("\""+title+"\" table not found");
7546 return null;
7547 }
7548
7549 private Variable getSelectionStart() {
7550 int selStart = -1;

Callers 2

doTableMethod · 0.95
selectRowMethod · 0.45

Calls 10

getResultsTableMethod · 0.95
getTitleMethod · 0.95
getTitleMethod · 0.95
getFrameMethod · 0.95
getTextPanelMethod · 0.95
getLeftParenMethod · 0.80
getExpressionMethod · 0.80
getCommaMethod · 0.80
resetSelectionMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected