Posted By

laurenceosx on 04/02/13


Tagged

groovy


Versions (?)

Groovy - EDT Inspect and Kill All Inspection Windows


 / Published in: Groovy
 

URL: http://groovy.codehaus.org/gapi/groovy/inspect/swingui/ObjectBrowser.html

see http://groovy.codehaus.org/gapi/groovy/inspect/swingui/ObjectBrowser.html

  1. // gi(someObj); - groovy inspect obj
  2. def gi = { itObjToInspect ->
  3. javax.swing.SwingUtilities.invokeAndWait( {
  4. groovy.inspect.swingui.ObjectBrowser.inspect( itObjToInspect );
  5. } );
  6. }
  7.  
  8. // gik(); - kill all groovy inspect windows
  9. def gik = {
  10. java.awt.Frame.getFrames()
  11. .findAll { it.visible && it.title == 'Groovy Object Browser' }
  12. .each { itWin ->
  13. javax.swing.SwingUtilities.invokeAndWait({ itWin.visible = false; itWin.dispose(); });
  14. }
  15. }

Report this snippet  

You need to login to post a comment.