# MainMenuItem (ARX GUI Documentation)

org.deidentifier.arx.gui.view.impl

## Class MainMenuItem

- java.lang.Object
- - org.deidentifier.arx.gui.view.impl.MainMenuItem

- Direct Known Subclasses:
    MainMenuGroup, MainMenuSeparator

      public abstract class MainMenuItem
      extends java.lang.Object

  This abstract class implements a generic menu item

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MainMenuItem(java.lang.String label, org.eclipse.swt.graphics.Image image, boolean isButton)` Creates a new instance

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `action(Controller controller)` Override this to perform the action
    `org.eclipse.swt.graphics.Image` | `getImage()`
    `java.lang.String` | `getLabel()`
    `boolean` | `isButton()`
    `abstract boolean` | `isEnabled(Model model)` Override this to return whether the item is enabled

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MainMenuItem

          public MainMenuItem(java.lang.String label,
                      org.eclipse.swt.graphics.Image image,
                      boolean isButton)

      Creates a new instance
      Parameters:
        `label` -
        `image` -
        `isButton` -

  - ### Method Detail

    - #### action

          public abstract void action(Controller controller)

      Override this to perform the action

    - #### getImage

          public org.eclipse.swt.graphics.Image getImage()

      Returns:
        the image

    - #### getLabel

          public java.lang.String getLabel()

      Returns:
        the label

    - #### isButton

          public boolean isButton()

      Returns:
        the isButton

    - #### isEnabled

          public abstract boolean isEnabled(Model model)

      Override this to return whether the item is enabled
      Parameters:
        `model` -
      Returns: