/*------------------------------------------------------------------*/
 public void actionPerformed(ActionEvent ae) {
   if (ae.getActionCommand().equals("Cancel")) {
     cancel = true;
   } else if (ae.getActionCommand().equals("OK")) {
     cancel = false;
   } else {
     cancel = true;
     IJ.error("Unexpected button ID");
   }
   setVisible(false);
 } /* end actionPerformed */
Exemple #2
0
 public void actionPerformed(ActionEvent e) {
   String command = e.getActionCommand();
   if (command == null) return;
   if (command.equals(moreLabel)) {
     Point bloc = moreButton.getLocation();
     pm.show(this, bloc.x, bloc.y);
   } else if (command.equals("Convert to RGB")) IJ.doCommand("Stack to RGB");
   else IJ.doCommand(command);
 }