## org.eclipse.contribution.visualiser.views
Class Menu

    java.lang.Object
      org.eclipse.ui.part.WorkbenchPart
          org.eclipse.ui.part.ViewPart
              org.eclipse.contribution.visualiser.views.Menu

All Implemented Interfaces:
  org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IPersistable, org.eclipse.ui.IViewPart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation

public class Menu
extends org.eclipse.ui.part.ViewPart

The Menu part of the Visualiser. Displays Markup kinds, colour selection buttons and checkboxes.

Field Summary

Fields inherited from interface org.eclipse.ui.IWorkbenchPart
`PROP_TITLE`

Constructor Summary
`Menu()` The constructor.

Method Summary
`void` `createPartControl(org.eclipse.swt.widgets.Composite parent)` This is a callback that allows us to create the composite and initialize it.
`void` `dispose()` Dispose of the menu when closed.
`void` `ensureUptodate()` The main method - adds aspect names to the menu.
`boolean` `getActive(IMarkupKind kind)` Get the active state of a kind (IE is the checkbox checked).
`boolean` `getActive(java.lang.String kindName)` Get the active state of a kind by name(IE is the checkbox checked).
`java.lang.Object` `getAdapter(java.lang.Class key)`
`protected void` `onlyShow(java.util.List names)` Select the checkboxes whose names are in the given List then update the visualiser
`void` `reset()` Reset the up-to-date state of this view
`void` `setFocus()` Passing the focus request to the viewer's control.
`void` `setVisMarkupProvider(IMarkupProvider vmp)` Set the current IMarkupProvider

Methods inherited from class org.eclipse.ui.part.ViewPart
`checkSite, getViewSite, init, init, saveState, setContentDescription, setInitializationData, setPartName`

Methods inherited from class org.eclipse.ui.part.WorkbenchPart
`addPropertyListener, firePropertyChange, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.ui.IWorkbenchPart
`addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener`

Constructor Detail

### Menu

    public Menu()

  The constructor.

Method Detail

### setVisMarkupProvider

    public void setVisMarkupProvider(IMarkupProvider vmp)

  Set the current IMarkupProvider

  Parameters:
    `vmp` -

### createPartControl

    public void createPartControl(org.eclipse.swt.widgets.Composite parent)

  This is a callback that allows us to create the composite and initialize it. It also creates listeners for the colour buttons and the checkboxes.

### onlyShow

    protected void onlyShow(java.util.List names)

  Select the checkboxes whose names are in the given List then update the visualiser

### getActive

    public boolean getActive(IMarkupKind kind)

  Get the active state of a kind (IE is the checkbox checked).

  Parameters:
    `kind` - - the kind
  Returns:
    true if the kind is active

### getActive

    public boolean getActive(java.lang.String kindName)

  Get the active state of a kind by name(IE is the checkbox checked).

  Parameters:
    `kindName` - - the kind name
  Returns:
    true if the kind with the given name is active

### reset

    public void reset()

  Reset the up-to-date state of this view

### ensureUptodate

    public void ensureUptodate()

  The main method - adds aspect names to the menu.

### setFocus

    public void setFocus()

  Passing the focus request to the viewer's control.

### dispose

    public void dispose()

  Dispose of the menu when closed.

### getAdapter

    public java.lang.Object getAdapter(java.lang.Class key)