Login  Register

Re: Non-modal dialog in window list?

Posted by Michael Schmid on Jun 02, 2009; 9:22am
URL: http://imagej.273.s1.nabble.com/Non-modal-dialog-in-window-list-tp3692239p3692240.html

Hi Bill,

when creating the frame, you need code like this in a PlugInFrame:

         this.setTitle(myTitle);
         WindowManager.addWindow(this);

And when closing

     /** Overrides the superclass close method */
     public void close () {
         WindowManager.removeWindow(this);
         super.close();
     }

If you don't have a PlugInFrame, I suspect that it would work the  
same way, with 'this' replaced by the reference to the frame. You  
will have to detect the 'Frame closed' event to remove your frame  
from the list - having a PlugInFrame is a simple solution for this  
(see the code above).

Michael
________________________________________________________________

On 1 Jun 2009, at 16:03, Bill Mohler wrote:

> I just created a new non-modal dialog which implements PlugIn and  
> properly installs itself in the Plugins menu at start up. When the  
> Dialog is open, however, it does not appear in the Window list of  
> ImageJ although the process is clearly running within ImageJ.
>
> Q: Does my plugin class need to extend PlugInFrame in order to  
> appear in the Window menu when open?
>
> Thank,
> Bill