()
| 2328 | } |
| 2329 | |
| 2330 | public boolean okToDeleteRoi() { |
| 2331 | if (roi!=null && (roi instanceof PointRoi) && getWindow()!=null && ((PointRoi)roi).promptBeforeDeleting()) { |
| 2332 | int npoints = ((PolygonRoi)roi).getNCoordinates(); |
| 2333 | int counters = ((PointRoi)roi).getNCounters(); |
| 2334 | String msg = "Delete this multi-point selection ("+npoints+" points, "+counters+" counter"+(counters>1?"s":"")+")?"; |
| 2335 | GenericDialog gd=new GenericDialog("Delete Points?"); |
| 2336 | gd.addMessage(msg+"\nRestore using Edit>Selection>Restore Selection."); |
| 2337 | gd.addHelp(PointToolOptions.help); |
| 2338 | gd.setOKLabel("Keep"); |
| 2339 | gd.setCancelLabel("Delete"); |
| 2340 | gd.showDialog(); |
| 2341 | if (gd.wasOKed()) |
| 2342 | return false; |
| 2343 | } |
| 2344 | return true; |
| 2345 | } |
| 2346 | |
| 2347 | /** Deletes the current region of interest. */ |
| 2348 | public void killRoi() { |
no test coverage detected