This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 2416 - Actions.SubMenu provides no way of displaying single submenu items under itself.
Summary: Actions.SubMenu provides no way of displaying single submenu items under itself.
Status: CLOSED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-07-10 04:18 UTC by Jesse Glick
Modified: 2008-12-22 16:21 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 1999-07-10 04:18:44 UTC
I.e. it forces the behavior that single submenu items should cause the actions to display as a regular menu item, rather than a submenu. While you can override getUIClassID if you really wanted (and
 you knew what to do), that will not help because the bridge refuses to add the submenu items if there is only one. So you have to do something messy like add a gratuitous separator to the end.
Comment 1 Jaroslav Tulach 2000-07-03 08:04:59 UTC
Actions.SubMenu does not support such behaviour, it is used only with connection
 with SubMenuModel and it uses only strings and no submenus.

It is a question whether or not to create new Actions.GeneralSubMenu class that
would support also submenus.
Comment 2 Jesse Glick 2000-07-07 17:06:59 UTC
I think you did not understand the bug. When a SubMenu is constructed using a
SubMenuModel with >1 item, then all is fine. When there is only 1 item in the
model, it automatically displays a plain menu item instead of a submenu. For
some purposes, this is fine and good. For other purposes, you really want it to
still display a submenu, even though there will only be one item under it. The
point is that SubMenu gives you no reasonable way to ask it to choose the second
behavior (always show submenu).
Comment 3 Jaroslav Tulach 2000-07-12 07:15:59 UTC
If you need to have submenu, why not to use JMenu instead?
Comment 4 Jan Zajicek 2001-01-23 09:31:59 UTC
Automated change of version from Other to Dev.
Comment 5 Jan Chalupa 2001-03-12 12:08:01 UTC
Version: 'Dev' -> 3.2
Comment 6 Jesse Glick 2001-04-07 18:07:04 UTC
Yeah, why not indeed.
Comment 7 Quality Engineering 2003-07-01 15:48:59 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 8 Quality Engineering 2003-07-01 16:08:47 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.