All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.jface.action.IMenuManager Maven / Gradle / Ivy

Go to download

JFace is a UI toolkit with classes for handling many common UI programming tasks. JFace is window-system-independent in both its API and implementation, and is designed to work with SWT without hiding it. JFace includes the usual UI toolkit components of image and font registries, text, dialog, preference and wizard frameworks, and progress reporting for long running operations. Two of its more interesting features are actions and viewers. The action mechanism allows user commands to be defined independently from their exact whereabouts in the UI. Viewers are model based adapters for certain SWT widgets, simplifying the presentation of application data structured as lists, tables or trees.

The newest version!
/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jface.action;

/**
 * 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, * {@link MenuManager MenuManager}. *

*/ public interface IMenuManager extends IContributionManager, IContributionItem { /** * Adds a menu listener to this menu. * Has no effect if an identical listener is already registered. * * @param listener a menu listener */ public void addMenuListener(IMenuListener listener); /** * 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. *

* * @param path the path string * @return the menu contribution item, or null * if there is no such contribution item or if the item does * not have an associated menu manager */ public IMenuManager findMenuUsingPath(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 '/'. * * @param path the path string * @return the contribution item, or null if there is no * such contribution item */ public IContributionItem findUsingPath(String path); /** * Returns whether all items should be removed when the menu is about to * show, but before notifying menu listeners. The default is * false. * * @return true if all items should be removed when shown, * false if not */ public boolean getRemoveAllWhenShown(); /** * Returns whether this menu should be enabled or not. * * @return true if enabled, and * false if disabled */ public boolean isEnabled(); /** * Removes the given menu listener from this menu. * Has no effect if an identical listener is not registered. * * @param listener the menu listener */ public void removeMenuListener(IMenuListener listener); /** * Sets whether all items should be removed when the menu is about to show, * but before notifying menu listeners. * * @param removeAll * true if all items should be removed when shown, * false if not */ public void setRemoveAllWhenShown(boolean removeAll); /** * Incrementally builds the menu from the contribution items, and * does so recursively for all submenus. * * @param force true means update even if not dirty, * and false for normal incremental updating */ public void updateAll(boolean force); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy