display.dispose,jframe.close()

I am using the jython scripts set up by Tom W.
I would like to close the display windows within the .py script.

I did this by modifying the subs.py:

def showDisplay(display, width=300, height=300,
                title="VisAD Display", bottom=None, top=None,
                panel=None):
  mf=myFrame(display, width, height, title, bottom, top, panel)
  return mf

class myFrame:

  def desty(self, event):
    self.display.destroy()
    self.frame.dispose()

  def kill(self):
    self.display.destroy()
    self.frame.dispose()
..

then I can do mf.kill()

This simulates the user clicking the window close icon.

Is there a better way without modifying the semi standard routines in
subs.py and graph.py?

G. Garrett Campbell Ph. D.
Cooperative Institute for Research in the Atmosphere
Colorado State University
Ft. Collins, CO, USA
970 491 8497
campbell@xxxxxxxxxxxxxxxxxx 


  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: