JMenu (Groovy JDK enhancements)

Package: javax.swing

## Class JMenu

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `Component` | `getAt(int index)` Support the subscript operator for JMenu.
    `Iterator` | `iterator()` Returns an Iterator which traverses the JMenu one component at a time.
    `JMenu` | `leftShift(GString gstr)` Overloads the left shift operator to provide an easy way to add components to a menu.
    `JMenu` | `leftShift(Component component)` Overloads the left shift operator to provide an easy way to add components to a menu.
    `JMenu` | `leftShift(String str)` Overloads the left shift operator to provide an easy way to add components to a menu.
    `JMenu` | `leftShift(Action action)` Overloads the left shift operator to provide an easy way to add components to a menu.
    `JMenu` | `leftShift(JMenuItem item)` Overloads the left shift operator to provide an easy way to add components to a menu.
    `int` | `size()` Provide the standard Groovy `size()` method for `JMenu`.

  - #### Methods inherited from class javax.swing.AbstractButton

    `setMnemonic`

  - #### Methods inherited from class java.awt.Container

    `clear`, `getAt`, `iterator`, `leftShift`, `size`

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

    `addShutdownHook`, `any`, `any`, `asBoolean`, `asType`, `collect`, `collect`, `collect`, `dump`, `each`, `eachMatch`, `eachMatch`, `eachWithIndex`, `every`, `every`, `find`, `find`, `findAll`, `findAll`, `findIndexOf`, `findIndexOf`, `findIndexValues`, `findIndexValues`, `findLastIndexOf`, `findLastIndexOf`, `findResult`, `findResult`, `findResult`, `findResult`, `getAt`, `getMetaClass`, `getMetaPropertyValues`, `getProperties`, `grep`, `grep`, `hasProperty`, `identity`, `inject`, `inject`, `inspect`, `invokeMethod`, `is`, `isCase`, `isNotCase`, `iterator`, `metaClass`, `print`, `print`, `printf`, `printf`, `println`, `println`, `println`, `putAt`, `respondsTo`, `respondsTo`, `setMetaClass`, `split`, `sprintf`, `sprintf`, `stream`, `tap`, `toString`, `use`, `use`, `use`, `with`, `with`, `withCloseable`, `withMethodClosure`, `withStream`, `withTraits`

- - ### Methods Detail

    - #### public Component getAt(int index)

      Support the subscript operator for JMenu.

      Parameters:
        `index` - the index of the menu component to get
      Returns:
        the menu component at the given index
      Since:
        1.6.4

    - #### public Iterator iterator()

      Returns an Iterator which traverses the JMenu one component at a time.

      Returns:
        an Iterator for a JMenu
      Since:
        1.6.4

    - #### public JMenu leftShift(GString gstr)

      Overloads the left shift operator to provide an easy way to add components to a menu.

      Parameters:
        `gstr` - a GString to be added to the menu.
      Returns:
        same menu, after the value was added to it.
      Since:
        1.6.4

    - #### public JMenu leftShift(Component component)

      Overloads the left shift operator to provide an easy way to add components to a menu.

      Parameters:
        `component` - a component to be added to the menu.
      Returns:
        same menu, after the value was added to it.
      Since:
        1.6.4

    - #### public JMenu leftShift(String str)

      Overloads the left shift operator to provide an easy way to add components to a menu.

      Parameters:
        `str` - a String to be added to the menu.
      Returns:
        same menu, after the value was added to it.
      Since:
        1.6.4

    - #### public JMenu leftShift(Action action)

      Overloads the left shift operator to provide an easy way to add components to a menu.

      Parameters:
        `action` - an action to be added to the menu.
      Returns:
        same menu, after the value was added to it.
      Since:
        1.6.4

    - #### public JMenu leftShift(JMenuItem item)

      Overloads the left shift operator to provide an easy way to add components to a menu.

      Parameters:
        `item` - an item to be added to the menu.
      Returns:
        same menu, after the value was added to it.
      Since:
        1.6.4

    - #### public int size()

      Provide the standard Groovy `size()` method for `JMenu`.

      Returns:
        the menu component count of the menu
      Since:
        1.6.4