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

Method lineWidth

ij/src/main/java/ij/plugin/Options.java:107–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 }
106
107 void lineWidth() {
108 GenericDialog gd = new GenericDialog("Default Line Width");
109 gd.addNumericField("Line width: ", Line.getWidth(), 0);
110 gd.setInsets(5,2,0);
111 gd.addMessage("Sets the default line selection width.\nPress 'y' (Edit>Selection>Properties)\nto change the width of the current\nline selection.");
112 gd.showDialog();
113 if (gd.wasCanceled())
114 return;
115 int width = (int)gd.getNextNumber();
116 Line.setWidth(width);
117 LineWidthAdjuster.update();
118 ImagePlus imp = WindowManager.getCurrentImage();
119 if (imp!=null && imp.isProcessor()) {
120 ImageProcessor ip = imp.getProcessor();
121 ip.setLineWidth(Line.getWidth());
122 Roi roi = imp.getRoi();
123 if (roi!=null && roi.isLine())
124 imp.draw();
125 }
126 }
127
128 // Input/Output options
129 @AstroImageJ(reason = "Add .tbl for file extensions", modified = true)

Callers 1

runMethod · 0.95

Calls 15

addNumericFieldMethod · 0.95
getWidthMethod · 0.95
setInsetsMethod · 0.95
addMessageMethod · 0.95
showDialogMethod · 0.95
wasCanceledMethod · 0.95
getNextNumberMethod · 0.95
setWidthMethod · 0.95
updateMethod · 0.95
getCurrentImageMethod · 0.95
isProcessorMethod · 0.95
getProcessorMethod · 0.95

Tested by

no test coverage detected