Add 'disabled' items to the popup menu for DITA Maps Manager
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 17
- Joined: Tue Sep 05, 2023 12:14 am
Add 'disabled' items to the popup menu for DITA Maps Manager
Hi Team,
I am extending default popup menu behaviour for DITA Maps Manager using DITAMapPopupMenuCustomizer.
I want to add few item to the existing popup menu and enable/disable these items as per the requirements.
When I disable the item, it is not displayed in popup menu.
It is working fine for enabled items but I want to display disabled items too.
Please check the screenshot and my customizePopUpMenu() function.
I have tried similar implementation with MenusAndToolbarsContributorCustomizer by overriding customizeDITAMapPopUpMenu() function, but disabled items are not visible.
Please suggest solution to append the 'disabled' item to the popup menu of DITA Maps Manager.
Thanks & Regards,
Abhi_K
I am extending default popup menu behaviour for DITA Maps Manager using DITAMapPopupMenuCustomizer.
I want to add few item to the existing popup menu and enable/disable these items as per the requirements.
When I disable the item, it is not displayed in popup menu.
It is working fine for enabled items but I want to display disabled items too.
Please check the screenshot and my customizePopUpMenu() function.
Code: Select all
public void customizePopUpMenu(Object popUp, AuthorDocumentController ditaMapDocumentController) {
javax.swing.JMenuItem itemMenuEnabled = new javax.swing.JMenuItem("Enabled Menu item");
javax.swing.JMenuItem itemMenuDisabled = new javax.swing.JMenuItem("Disabled Menu item");
itemMenuDisabled.setEnabled(false);
javax.swing.JMenu extendedMenu = new javax.swing.JMenu("Extended Menu");
javax.swing.JMenuItem itemSubmenuEnabled = new javax.swing.JMenuItem("Enabled Submenu item");
javax.swing.JMenuItem itemSubmenuDisabled = new javax.swing.JMenuItem("Disabled Submenu item");
itemSubmenuDisabled.setEnabled(false);
extendedMenu.add(itemSubmenuEnabled);
extendedMenu.add(itemSubmenuDisabled);
javax.swing.JPopupMenu jpm = (javax.swing.JPopupMenu) popUp;
jpm.addSeparator();
jpm.add(itemMenuEnabled);
jpm.add(itemMenuDisabled);
jpm.add(extendedMenu);
}
popup_menu_screenshot.png
I have tried similar implementation with MenusAndToolbarsContributorCustomizer by overriding customizeDITAMapPopUpMenu() function, but disabled items are not visible.
Please suggest solution to append the 'disabled' item to the popup menu of DITA Maps Manager.
Thanks & Regards,
Abhi_K
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Add 'disabled' items to the popup menu for DITA Maps Manager
Hi,
For the Oxygen contextual menus we follow a best UI practice of hiding completely the actions which are disabled as the end user cannot use them anyway and they add to the list of available contextual menu actions.
You do not have a way to override this behavior via our APIs. If you want those actions to appear you can always make them enabled and maybe show a message dialog if the action is called in an inappropriate context.
Regards,
Radu
For the Oxygen contextual menus we follow a best UI practice of hiding completely the actions which are disabled as the end user cannot use them anyway and they add to the list of available contextual menu actions.
You do not have a way to override this behavior via our APIs. If you want those actions to appear you can always make them enabled and maybe show a message dialog if the action is called in an inappropriate context.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service