[ImageJ-devel] MenuService/AbstractSwingUI issues
Johannes Schindelin
schindelin at wisc.edu
Mon Feb 6 19:52:04 CST 2012
Hi,
it appears to me that AbstractSwingUI might be a bit too limiting at the
moment with its builtin assumption that there is only one appFrame and
that all menu item changes should be applied to that appFrame's
application menu bar.
So now I face the problematic situation where method calls to a ShadowMenu
(which was already connected to a given JMenuBar using the
SwingJMenuBarCreator -- why are there so many layers BTW?
AbstractMenuCreator>AbstractSwingMenuCreator>SwingJMenuBarCreator?) are
always redirected to the IJ2 menu bar -- which is bad when you want them
to appear in the Script Editor's menu bar.
Now, the MenuEvent knows pretty well which ShadowMenu it belongs to, but
apparently no class feels responsible to retain the connection between the
ShadowMenu and the SwingJMenuBarCreator used to turn this into an
instance.
Consequently, I do not see where it was intended to resolve this issue
(this is related to the wasteful recreation of a complete menu bar
whenever anything changed in any menu item).
Help?
Johannes
More information about the ImageJ-devel
mailing list