Пример #1
0
 void abortPluginOrMacro(ImagePlus imp) {
   if (imp != null) {
     ImageWindow win = imp.getWindow();
     if (win != null) {
       win.running = false;
       win.running2 = false;
     }
   }
   Macro.abort();
   Interpreter.abort();
   if (Interpreter.getInstance() != null) IJ.beep();
 }
Пример #2
0
 private boolean ignoreArrowKeys(ImagePlus imp) {
   Frame frame = WindowManager.getFrontWindow();
   String title = frame.getTitle();
   if (title != null && title.equals("ROI Manager")) return true;
   // Control Panel?
   if (frame != null && frame instanceof javax.swing.JFrame) return true;
   ImageWindow win = imp.getWindow();
   // LOCI Data Browser window?
   if (imp.getStackSize() > 1 && win != null && win.getClass().getName().startsWith("loci"))
     return true;
   return false;
 }