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

Method getBoolean

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

Source from the content-addressed store, hash-verified

1516 }
1517
1518 double getBoolean() {
1519 interp.getLeftParen();
1520 String prompt = getString();
1521 String yesButton = " Yes ";
1522 String noButton = " No ";
1523 if (interp.nextToken()==',') {
1524 yesButton = getNextString();
1525 noButton = getNextString();
1526 }
1527 interp.getRightParen();
1528 String title = interp.macroName!=null?interp.macroName:"";
1529 if (title.endsWith(" Options"))
1530 title = title.substring(0, title.length()-8);
1531 YesNoCancelDialog d = new YesNoCancelDialog(IJ.getInstance(), title, prompt, yesButton, noButton);
1532 if (d.cancelPressed()) {
1533 interp.done = true;
1534 return 0.0;
1535 } else if (d.yesPressed())
1536 return 1.0;
1537 else
1538 return 0.0;
1539 }
1540
1541 String getStringDialog() {
1542 interp.getLeftParen();

Callers 1

getFunctionValueMethod · 0.95

Calls 10

getStringMethod · 0.95
getNextStringMethod · 0.95
getInstanceMethod · 0.95
cancelPressedMethod · 0.95
yesPressedMethod · 0.95
getLeftParenMethod · 0.80
getRightParenMethod · 0.80
substringMethod · 0.80
lengthMethod · 0.65
nextTokenMethod · 0.45

Tested by

no test coverage detected