Пример #1
0
 def destroy(self):
   if self.textfields:
     for tf in self.textfields:
         tf.setEnabled(False)
   self.textfields = None
   Roi.removeRoiListener(self)
   self.imp = None
Пример #2
0
 def windowClosing(self, event):
     answer = JOptionPane.showConfirmDialog(
         event.getSource(), "Are you sure you want to close?",
         "Confirm closing", JOptionPane.YES_NO_OPTION)
     if JOptionPane.NO_OPTION == answer:
         event.consume()  # Prevent closing
     else:
         Roi.removeRoiListener(self.roilistener)
         event.getSource().dispose()  # close the JFrame