Login  Register

Change ImageJ PopupMenu from Java

Posted by jumpfunky on Jul 18, 2014; 11:00am
URL: http://imagej.273.s1.nabble.com/Change-ImageJ-PopupMenu-from-Java-tp5008822.html

Hello community!

I wondering if it is possible to modify the popup menu (shown in an
imagej image window) by a java imagej plugin.

I've google it, but I found only the way using the startup macros.

I have tried to disable it and add my own PopupMenu, but that doesnt
work:
ImageCanvas ic = (ImageCanvas)imp.getWindow().getComponent(0);
ic.disablePopupMenu(true);
PopupMenu ab = new PopupMenu("ab");
ab.add(new MenuItem("abc"));
ic.add(ab);

Cheers,
Thorsten

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html