Project

General

Profile

Actions

Bug #2392

closed

MENUS: Top-Level Menu - need centralized way to remove menubar

Added by Matthew Brooke about 18 years ago. Updated about 18 years ago.

Status:
Resolved
Priority:
Normal
Category:
interface
Target version:
Start date:
03/29/2006
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2392

Description

Some dialogs need to be shown without menubars (eg Welcome Window, Query Builder
dialog). We therefore need centralized way to remove the menubar, so the code
for these dialogs can do so without havign to worry too much about threading
issues etc (since the Kepler menus are not added until an observing thread sees
that the ptii menus have been completely rendered).

Notes from IRC as a reminder to me: ================================
Mar 27 16:32:30 mbHome nandita
Mar 27 16:33:15 mbHome all you need to do is call the JFrame method
"setJMenuBar()" and pass it null as the JMenuBar value
Mar 27 16:33:41 mbHome the only issue is getting this to happen at the right
time, since the menu bar is added in a separate thread
Mar 27 16:34:09 nandita ok
Mar 27 16:34:36 mbHome see src/exp/ptolemy/vergil/basic/MenuMapper.java
Mar 27 16:34:49 mbHome the public void run() method
Mar 27 16:35:17 mbHome waits for a frame to display before it removes the ptii
menubar and adds the kepler menubar instead
Mar 27 16:35:32 mbHome that code will be similar to what you want to do, i think ================================


Related issues

Blocked by Kepler - Bug #2337: TRACKING - MENUS: Top-Level Menu RevisionIn ProgressMatthew Brooke01/18/2006

Actions
Actions #1

Updated by Matthew Brooke about 18 years ago

There is already a way to do this - all you need to do is call hideMenuBar() (which is a public method in ptolemy.gui.Top - of which the frame you're workign in should be a descendent). This call would typically be in the constructor of your frame class

Actions #2

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 2392

Actions

Also available in: Atom PDF