JSPopupHelper
Date: 2019-10-22

org.jmol.awtjs2d

## Class JSPopupHelper

- java.lang.Object
- - org.jmol.awtjs2d.JSPopupHelper

- All Implemented Interfaces:
    PopupHelper

      public class JSPopupHelper
      extends java.lang.Object
      implements PopupHelper

  For menus, popup-related awt/swing class references are in this file. We can ignore all the event/listener references because JSmol will create a simple object with just the elements getSource and getActionCommand. No need to have the entire classes fleshed out.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private ButtonGroup` | `buttonGroup`
    `(package private) GenericPopup` | `popup` used here and by SwingController to refer to the Java class being handled by this helper.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JSPopupHelper(GenericPopup popup)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(java.awt.event.ActionEvent e)`
    `java.lang.Object` | `getButtonGroup()`
    `SC` | `getCheckBox(java.lang.String name)`
    `int` | `getItemType(SC m)`
    `SC` | `getMenu(java.lang.String name)`
    `SC` | `getMenuItem(java.lang.String text)`
    `SC` | `getRadio(java.lang.String name)`
    `SC` | `getSwingComponent(java.lang.Object component)`
    `void` | `handleEvent(java.awt.event.MouseEvent e)`
    `void` | `itemStateChanged(java.awt.event.ItemEvent e)`
    `void` | `menuAddButtonGroup(SC item)`
    `void` | `menuClearListeners(SC menu)`
    `SC` | `menuCreatePopup(java.lang.String name, java.lang.Object applet)`
    `void` | `menuInsertSubMenu(SC menu, SC subMenu, int index)`
    `void` | `mouseEntered(java.awt.event.MouseEvent e)`
    `void` | `mouseExited(java.awt.event.MouseEvent e)`

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

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

- - ### Field Detail

    - #### popup

          GenericPopup popup

      used here and by SwingController to refer to the Java class being handled by this helper.

    - #### buttonGroup

          private ButtonGroup buttonGroup

  - ### Constructor Detail

    - #### JSPopupHelper

          public JSPopupHelper(GenericPopup popup)

  - ### Method Detail

    - #### menuCreatePopup

          public SC menuCreatePopup(java.lang.String name,
                                    java.lang.Object applet)

      Specified by:
        `menuCreatePopup` in interface `PopupHelper`

    - #### getMenu

          public SC getMenu(java.lang.String name)

      Specified by:
        `getMenu` in interface `PopupHelper`

    - #### getMenuItem

          public SC getMenuItem(java.lang.String text)

      Specified by:
        `getMenuItem` in interface `PopupHelper`

    - #### getRadio

          public SC getRadio(java.lang.String name)

      Specified by:
        `getRadio` in interface `PopupHelper`

    - #### getCheckBox

          public SC getCheckBox(java.lang.String name)

      Specified by:
        `getCheckBox` in interface `PopupHelper`

    - #### menuAddButtonGroup

          public void menuAddButtonGroup(SC item)

      Specified by:
        `menuAddButtonGroup` in interface `PopupHelper`

    - #### getItemType

          public int getItemType(SC m)

      Specified by:
        `getItemType` in interface `PopupHelper`

    - #### menuInsertSubMenu

          public void menuInsertSubMenu(SC menu,
                                        SC subMenu,
                                        int index)

      Specified by:
        `menuInsertSubMenu` in interface `PopupHelper`

    - #### getSwingComponent

          public SC getSwingComponent(java.lang.Object component)

      Specified by:
        `getSwingComponent` in interface `PopupHelper`

    - #### menuClearListeners

          public void menuClearListeners(SC menu)

      Specified by:
        `menuClearListeners` in interface `PopupHelper`

    - #### itemStateChanged

          public void itemStateChanged(java.awt.event.ItemEvent e)

    - #### actionPerformed

          public void actionPerformed(java.awt.event.ActionEvent e)

    - #### getButtonGroup

          public java.lang.Object getButtonGroup()

      Specified by:
        `getButtonGroup` in interface `PopupHelper`

    - #### handleEvent

          public void handleEvent(java.awt.event.MouseEvent e)

    - #### mouseEntered

          public void mouseEntered(java.awt.event.MouseEvent e)

    - #### mouseExited

          public void mouseExited(java.awt.event.MouseEvent e)