()
| 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) |
no test coverage detected