Reference to ImagePlus java.awt.frame? (Custom result window)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Reference to ImagePlus java.awt.frame? (Custom result window)

Joachim Wesner
Hi list,

I would like to show the (textual) results of a plugin in a special
(probably nicely decorated)
result window that only has a close button and keeps associated to the
original ImagePlus.

I´m thinking of doing this with a (J)Dialog, but I wonder, how do I get a
reference to the
java.awt.frame of the input ImagePlus as the "owner frame" of the
(J)Dialog?

Any other ideas to make the "private result/dialog window"?

Any hint is greatly appreciated!

Mit freundlichen Grüßen / Best regards

Joachim Wesner


Leica Microsystems CMS GmbH | GmbH mit Sitz in Wetzlar | Amtsgericht
Wetzlar  HRB 2432
Geschäftsführer:  Dr. Stefan Traeger | Dr. Wolf-Otto Reuter | Dr. David Roy
Martyr | Colin Davis
www.leica-microsystems.com


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Reference to ImagePlus java.awt.frame? (Custom result window)

Michael Schmid
Hi Joachim,

The answer to your first question looks quite trivial:

ImagePlus imp = ...;
ImageWindow win = imp.getWindow(); //class ImageWindow extends Frame

However, I don't think that adding buttons to an existing Frame and  
having everything resized corectly is so easy - my solution would be  
creating an own subclass ImageWindow, similar to the HistogramWindow
   http://rsb.info.nih.gov/ij/source/ij/gui/HistogramWindow.java

Michael
________________________________________________________________

On 10 Sep 2009, at 14:37, Joachim Wesner wrote:

> Hi list,
>
> I would like to show the (textual) results of a plugin in a special
> (probably nicely decorated)
> result window that only has a close button and keeps associated to the
> original ImagePlus.
>
> I´m thinking of doing this with a (J)Dialog, but I wonder, how do I  
> get a
> reference to the
> java.awt.frame of the input ImagePlus as the "owner frame" of the
> (J)Dialog?
>
> Any other ideas to make the "private result/dialog window"?
>
> Any hint is greatly appreciated!
>
> Mit freundlichen Grüßen / Best regards
>
> Joachim Wesner