Login  Register

Re: ImageJ Internal Frames

Posted by James Norman on Feb 10, 2007; 9:28pm
URL: http://imagej.273.s1.nabble.com/ImageJ-Internal-Frames-tp3700345p3700348.html

I'm fairly new to ImageJ so I'm not privy to the history surrounding it.  An
upgrade to swing does however seem like something that will have to be done
at some point.  If the application was based on swing it would be a more
attractive platform to develop plugins on.

I have had no problem with ImageJ being based on AWT to this point.  I have
developed a plugin that uses the PluginFrame and is based on AWT.  I only
ran into some issues with ImageJ/AWT once I implemented the internal
frames.  I find the internal frames to be a very attractive feature to add
to ImageJ.  In particular, on windows it can take 4-5 clicks to make all my
images/adjusters visible, and I have to know about the Image menu to do
this.  With internal frames, it takes only one click to get back to the
images.  Also, ImageJ wouldn't be dependent on internal frames, the
interface type can be selectable.

A permanent swing branch does not sound like a good idea.  No reason to
fragment the code.  If a swing upgrade was decided upon, a temporary branch
would be necessary.  Upgrade this branch and test for a few months to
identify/fix any issues.  Also, all the plugins would need to be tested.
This branch would have all intentions of merging if the Swing upgrade was
successful.

As it stands, other then the use of internal frames, there is no real reason
to upgrade to Swing.  I think the internal frames may be a good reason to
seriously discuss an upgrade.

Can anyone provide a link to former swing upgrade discussions in the mailing
list?

Thanks,
James Norman

On 2/10/07, Johannes Schindelin <[hidden email]> wrote:

>
>
>
> On Fri, 9 Feb 2007, James Norman wrote:
>
> > AWT and Swing don't play nice together.  I had to change all the AWT
> > classes to Swing classes in the ImageCanvas, ContrastAdjuster, Threshold
> > Adjuster and so on.  All AWT objects that would be displayed in a
> > JInternalFrame had to be upgraded.  This actually was incredibly easy.
> > Pretty much just added a J to everything.
> >
> > [...]
> >
> > My question is, would this be useful to incorporate into ImageJ.  I
> > would like to have an option in ImageJ where you could toggle between
> > the two different interfaces (SDI and MDI its called?).  It wouldn't be
> > difficult to relay a setLocation() method, for instance, to either the
> > JFrame or the JInternalFrame depending on the type of interface the user
>
> > selected.
>
> I do not really know how Wayne feels about switching from AWT to Swing,
> but personally I feel that it might make sense to have _both_ as possible
> backends. A few of my plugins depend on AWT being used...
>
> However, since this came up last time (I was strictly negative about it
> then), my opinion about this has changed. Many people seem to prefer Swing
> over AWT, so I think it would be nice to have it.
>
> Ciao,
> Dscho
>
>