imagej / imagej-ui-swing

ImageJ UI for Java Swing.
BSD 2-Clause "Simplified" License
10 stars 20 forks source link

Updater: Replace ad-hoc popup menu by a proper one #14

Closed dscho closed 10 years ago

dscho commented 10 years ago

The only reason why we tried to roll our own code to intercept the mouse event and show our own popup menu was because the popup menu is actually context dependent on the selected files.

However... there is a much better way to do it. We can install the popup menu in the recommended way and then intercept just before it is shown so that we can populate the menu properly.

This change incidentally fixes the problem described in https://github.com/imagej/imagej-ui-swing/issues/2.

Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de

dscho commented 10 years ago

Was tested on MacOSX; needs to be tested on Linux and Windows, still.

dscho commented 10 years ago

@ctrueden whoops, I just saw your comment. I agree that it would be nice, but it's definitely something we have to tackle another time.

ctrueden commented 10 years ago

No worries; that comment was not intended to spur any changes to the PR. Just pontificating for a second.