Eclipse Platform
2.1

org.eclipse.ui.actions
Class NewWizardMenu

java.lang.Object
  |
  +--org.eclipse.jface.action.ContributionItem
        |
        +--org.eclipse.ui.actions.NewWizardMenu
All Implemented Interfaces:
IContributionItem

public class NewWizardMenu
extends ContributionItem

A NewWizardMenu is used to populate a menu manager with New Wizard actions. The visible actions are determined by user preference from the Perspective Customize dialog.


Constructor Summary
NewWizardMenu(IMenuManager innerMgr, IWorkbenchWindow window, boolean register)
          Create a new wizard shortcut menu.
NewWizardMenu(IWorkbenchWindow window)
           
 
Method Summary
 void deregisterListeners()
          Deprecated.  
 void fill(Menu menu, int index)
          The default implementation of this IContributionItem method does nothing.
 boolean isDirty()
          The default implementation of this IContributionItem method returns false.
 boolean isDynamic()
          The default implementation of this IContributionItem method returns false.
 boolean isEnabled()
          The default implementation of this IContributionItem method returns true.
 void setEnabled(boolean enabledValue)
          Sets the enabled state of the receiver.
 
Methods inherited from class org.eclipse.jface.action.ContributionItem
dispose, fill, fill, getId, getParent, isGroupMarker, isSeparator, isVisible, setParent, setVisible, toString, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NewWizardMenu

public NewWizardMenu(IMenuManager innerMgr,
                     IWorkbenchWindow window,
                     boolean register)
Create a new wizard shortcut menu.

If the menu will appear on a semi-permanent basis, for instance within a toolbar or menubar, the value passed for register should be true. If set, the menu will listen to perspective activation and update itself to suit. In this case clients are expected to call deregister when the menu is no longer needed. This will unhook any perspective listeners.

Parameters:
innerMgr - the location for the shortcut menu contents
window - the window containing the menu
register - if true the menu listens to perspective changes in the window

NewWizardMenu

public NewWizardMenu(IWorkbenchWindow window)
Method Detail

isEnabled

public boolean isEnabled()
Description copied from class: ContributionItem
The default implementation of this IContributionItem method returns true. Subclasses may override.
Overrides:
isEnabled in class ContributionItem
Following copied from interface: org.eclipse.jface.action.IContributionItem
Returns:
true if this item is enabled

isDynamic

public boolean isDynamic()
Description copied from class: ContributionItem
The default implementation of this IContributionItem method returns false. Subclasses may override.
Overrides:
isDynamic in class ContributionItem
Following copied from interface: org.eclipse.jface.action.IContributionItem
Returns:
true if this item is dynamic, and false for normal items

isDirty

public boolean isDirty()
Description copied from class: ContributionItem
The default implementation of this IContributionItem method returns false. Subclasses may override.
Overrides:
isDirty in class ContributionItem
Following copied from interface: org.eclipse.jface.action.IContributionItem
Returns:
true if this item is dirty

setEnabled

public void setEnabled(boolean enabledValue)
Sets the enabled state of the receiver.
Parameters:
enabledValue - if true the menu is enabled; else it is disabled

deregisterListeners

public void deregisterListeners()
Deprecated.  

Removes all listeners from the containing workbench window.

This method should only be called if the shortcut menu is created with register = true.


fill

public void fill(Menu menu,
                 int index)
Description copied from class: ContributionItem
The default implementation of this IContributionItem method does nothing. Subclasses may override.
Overrides:
fill in class ContributionItem
Following copied from interface: org.eclipse.jface.action.IContributionItem
Parameters:
parent - the parent menu
index - the index where the controls are inserted, or -1 to insert at the end

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.