NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #632 (closed defect: fixed)

Opened 2011-06-24T08:36:50-05:00

Last modified 2012-06-08T12:47:31-05:00

Add access to menus and make them more dynamic

Reported by: gharris Owned by: curtis
Priority: critical Milestone: imagej2-b1-initial
Component: UI Framework Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #629

Description (last modified by curtis)

For both #441 (Implement IJ1's Window menu functionality) and #584 (Get Open Recent menu working) we need a reference to the menubar, or at least the File:Recent and Window menus.

We could add getMenus() or getMenuX() to UserInterface, but then we need gui-toolkit-independent Menu (akin to Toolbar), and perhaps a MenuManager.

Change History

comment:1 Changed 2011-07-27T10:09:40-05:00 by curtis

  • Description modified
  • Summary changed from Add Access to Menus to Add access to menus and make them more dynamic

Fortunately, we have a GUI toolkit independent menu called ShadowMenu. It consists of menu entries for all available modules from the ModuleService (which includes plugins, scripts, etc.). By updating this to be kept in better sync with the UI's toolbar, it will become possible to add and remove modules from the ModuleService and see the menus update themselves accordingly. We can also provide a getter for accessing the ShadowMenu directly if desired (though this may be discouraged).

comment:2 Changed 2011-08-01T08:10:38-05:00 by curtis

  • Milestone changed from biweekly-2011: Jul-18 to Jul-29 to biweekly-2011: Aug-01 to Aug-12

comment:3 Changed 2011-08-01T08:11:32-05:00 by curtis

  • Priority changed from major to critical

comment:4 Changed 2011-08-01T12:10:32-05:00 by curtis

  • Milestone changed from biweekly-2011: Aug-01 to Aug-12 to imagej-2.0-alpha5

Milestone biweekly-2011: Aug-01 to Aug-12 deleted

comment:5 Changed 2011-08-05T09:09:25-05:00 by gharris

Curious... On Windows, at least, after opening an image, the menubar stops responding to mouse clicks. Alt-F opens the File menu, then I can use the mouse to select something. And when the menubar (inappropriately) appears in the Display window, the mouse clicks work on it... But not in the ImageJ App. window.

That said, the Open Recent dynamic menu works... Cool! I'll look at the code.

comment:6 Changed 2011-08-05T10:23:25-05:00 by curtis

Initial support for dynamic menus was added in b4815d4386b9d326ad0d72d876e84c66a623def5, and earlier commits which developed the MenuService.

There is still one big bug, which is that multiple menu bars are not kept synced. That is, the main ImageJ application menu bar updates, but other copies added to individual image windows are not.

comment:7 Changed 2011-10-18T14:45:40-05:00 by curtis

This ticket is waiting on some display refactoring. See ticket #828.

comment:8 Changed 2011-11-01T10:31:36-05:00 by curtis

  • Status changed from new to accepted

comment:9 Changed 2012-02-20T09:55:29-06:00 by curtis

  • Status changed from accepted to closed
  • Resolution set to fixed

Remaining menu syncing problem filed as separate ticket #985. Closing this one, since the menu infrastructure is in place.

comment:10 Changed 2012-06-08T12:47:31-05:00 by curtis

  • Blocking 629 added