Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.action
Interface IMenuManager

All Superinterfaces:
IContributionItem, IContributionManager
All Known Implementing Classes:
MenuManager, SubMenuManager

public interface IMenuManager
extends IContributionManager, IContributionItem

The IMenuManager interface provides protocol for managing contributions to a menu bar and its sub menus. An IMenuManager is also an IContributionItem, allowing sub-menus to be nested in parent menus.

This interface is internal to the framework; it should not be implemented outside the framework.

This package provides a concrete menu manager implementation, MenuManager.

Restriction:
This interface is not intended to be implemented by clients.

Method Summary
 void addMenuListener ( IMenuListener listener)
          Adds a menu listener to this menu.
  IMenuManager findMenuUsingPath ( String path)
          Finds the manager for the menu at the given path.
  IContributionItem findUsingPath ( String path)
          Finds the contribution item at the given path.
 boolean getRemoveAllWhenShown ()
          Returns whether all items should be removed when the menu is about to show, but before notifying menu listeners.
 boolean isEnabled ()
          Returns whether this menu should be enabled or not.
 void removeMenuListener ( IMenuListener listener)
          Removes the given menu listener from this menu.
 void setRemoveAllWhenShown (boolean removeAll)
          Sets whether all items should be removed when the menu is about to show, but before notifying menu listeners.
 void updateAll (boolean force)
          Incrementally builds the menu from the contribution items, and does so recursively for all submenus.
 
Methods inherited from interface org.eclipse.jface.action. IContributionManager
add, add, appendToGroup, appendToGroup, find, getItems, getOverrides, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll, update
 
Methods inherited from interface org.eclipse.jface.action. IContributionItem
dispose, fill, fill, fill, fill, getId, isDirty, isDynamic, isGroupMarker, isSeparator, isVisible, saveWidgetState, setParent, setVisible, update, update
 

Method Detail

addMenuListener

void addMenuListener(
IMenuListener listener)
Adds a menu listener to this menu. Has no effect if an identical listener is already registered.

Parameters:
listener - a menu listener

findMenuUsingPath


IMenuManager findMenuUsingPath(
String path)
Finds the manager for the menu at the given path. A path consists of contribution item ids separated by the separator character. The path separator character is '/'.

Convenience for findUsingPath(path) which extracts an IMenuManager if possible.

Parameters:
path - the path string
Returns:
the menu contribution item, or null if there is no such contribution item or if the item does not have an associated menu manager

findUsingPath


IContributionItem findUsingPath(
String path)
Finds the contribution item at the given path. A path consists of contribution item ids separated by the separator character. The path separator character is '/'.

Parameters:
path - the path string
Returns:
the contribution item, or null if there is no such contribution item

getRemoveAllWhenShown

boolean getRemoveAllWhenShown()
Returns whether all items should be removed when the menu is about to show, but before notifying menu listeners. The default is false.

Returns:
true if all items should be removed when shown, false if not

isEnabled

boolean isEnabled()
Returns whether this menu should be enabled or not.

Specified by:
isEnabled in interface IContributionItem
Returns:
true if enabled, and false if disabled

removeMenuListener

void removeMenuListener(
IMenuListener listener)
Removes the given menu listener from this menu. Has no effect if an identical listener is not registered.

Parameters:
listener - the menu listener

setRemoveAllWhenShown

void setRemoveAllWhenShown(boolean removeAll)
Sets whether all items should be removed when the menu is about to show, but before notifying menu listeners.

Parameters:
removeAll - true if all items should be removed when shown, false if not

updateAll

void updateAll(boolean force)
Incrementally builds the menu from the contribution items, and does so recursively for all submenus.

Parameters:
force - true means update even if not dirty, and false for normal incremental updating

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire