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

Method showDialog

ij/src/main/java/ij/plugin/RoiRotator.java:57–73  ·  view source on GitHub ↗
(double angle)

Source from the content-addressed store, hash-verified

55 }
56
57 public double showDialog(double angle) {
58 GenericDialog gd = new GenericDialog("Rotate Selection");
59 int decimalPlaces = 0;
60 if ((int)angle!=angle)
61 decimalPlaces = 2;
62 if (Macro.getOptions()!=null)
63 rotateAroundImageCenter = false;
64 gd.addNumericField("Angle:", angle, decimalPlaces, 3, "degrees");
65 gd.addCheckbox("Rotate around image center", rotateAroundImageCenter);
66 gd.setInsets(5, 0, 0);
67 gd.addMessage("Enter negative angle to \nrotate counter-clockwise", null, Color.darkGray);
68 gd.showDialog();
69 if (gd.wasCanceled())
70 return Double.NaN;
71 rotateAroundImageCenter = gd.getNextBoolean();
72 return gd.getNextNumber();
73 }
74
75 public static Roi rotate(Roi roi, double angle) {
76 if (roi instanceof ImageRoi) {

Callers 1

runMethod · 0.95

Calls 9

getOptionsMethod · 0.95
addNumericFieldMethod · 0.95
addCheckboxMethod · 0.95
setInsetsMethod · 0.95
addMessageMethod · 0.95
showDialogMethod · 0.95
wasCanceledMethod · 0.95
getNextBooleanMethod · 0.95
getNextNumberMethod · 0.95

Tested by

no test coverage detected