Package org.eclipse.e4.ui.model.application.ui.menu

# Interface MItem

All Superinterfaces:
  `MApplicationElement`, `MLocalizable`, `MUIElement`, `MUILabel`

All Known Subinterfaces:
  `MDirectMenuItem`, `MDirectToolItem`, `MDynamicMenuContribution`, `MHandledItem`, `MHandledMenuItem`, `MHandledToolItem`, `MMenuItem`, `MToolItem`

public interface MItem extends MUIElement, MUILabel
A representation of the model object 'Item'.

This is the base type for various menu and toolbar items.

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

  The following features are supported:

  - `Enabled`
  - `Selected`
  - `Type`

## Method Summary

Modifier and Type
Method
Description
`ItemType`
`getType()`
Returns the value of the 'Type' attribute.
`boolean`
`isEnabled()`
Returns the value of the 'Enabled' attribute.
`boolean`
`isSelected()`
Returns the value of the 'Selected' attribute.
`void`
`setEnabled(boolean value)`
Sets the value of the '`Enabled`' attribute.
`void`
`setSelected(boolean value)`
Sets the value of the '`Selected`' attribute.
`void`
`setType(ItemType value)`
Sets the value of the '`Type`' attribute.

### Methods inherited from interface org.eclipse.e4.ui.model.application.MApplicationElement

`getContributorURI, getElementId, getPersistedState, getTags, getTransientData, setContributorURI, setElementId`

### Methods inherited from interface org.eclipse.e4.ui.model.application.ui.MLocalizable

`updateLocalization`

### Methods inherited from interface org.eclipse.e4.ui.model.application.ui.MUIElement

`getAccessibilityPhrase, getContainerData, getCurSharedRef, getLocalizedAccessibilityPhrase, getParent, getRenderer, getVisibleWhen, getWidget, isOnTop, isToBeRendered, isVisible, setAccessibilityPhrase, setContainerData, setCurSharedRef, setOnTop, setParent, setRenderer, setToBeRendered, setVisible, setVisibleWhen, setWidget`

### Methods inherited from interface org.eclipse.e4.ui.model.application.ui.MUILabel

`getIconURI, getLabel, getLocalizedLabel, getLocalizedTooltip, getTooltip, setIconURI, setLabel, setTooltip`

## Method Details

### isEnabled

boolean isEnabled()
Returns the value of the 'Enabled' attribute. The default value is `"true"`.

Defines the current enablement state of a given menu or toolbar item.

Returns:
  the value of the 'Enabled' attribute.
See Also:
  - `setEnabled(boolean)`

### setEnabled

void setEnabled(boolean value)
Sets the value of the '`Enabled`' attribute.

Parameters:
  `value` - the new value of the 'Enabled' attribute.
See Also:
  - `isEnabled()`

### isSelected

boolean isSelected()
Returns the value of the 'Selected' attribute.

Defines the current selection state for a menu or tool item

Returns:
  the value of the 'Selected' attribute.
See Also:
  - `setSelected(boolean)`

### setSelected

void setSelected(boolean value)
Sets the value of the '`Selected`' attribute.

Parameters:
  `value` - the new value of the 'Selected' attribute.
See Also:
  - `isSelected()`

### getType

ItemType getType()
Returns the value of the 'Type' attribute. The literals are from the enumeration `ItemType`.

Defines the item type for this item.

Returns:
  the value of the 'Type' attribute.
See Also:
  - `ItemType`
  - `setType(ItemType)`

### setType

void setType(ItemType value)
Sets the value of the '`Type`' attribute.

Parameters:
  `value` - the new value of the 'Type' attribute.
See Also:
  - `ItemType`
  - `getType()`