AwtPopupHelper
Date: 2019-10-22

org.jmol.awt

## Class AwtPopupHelper

- java.lang.Object
- - org.jmol.awt.AwtPopupHelper

- All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.util.EventListener, PopupHelper

      public class AwtPopupHelper
      extends java.lang.Object
      implements java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.MouseListener, PopupHelper

  all popup-related awt/swing class references are in this file.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private javax.swing.ButtonGroup` | `buttonGroup`
    `private java.util.Map<java.lang.Object,SC>` | `htSources`
    `private GenericPopup` | `popup`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AwtPopupHelper(GenericPopup popup)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(java.awt.event.ActionEvent e)`
    `private void` | `clearListener(javax.swing.AbstractButton ab)`
    `private void` | `clearListeners(java.lang.Object[] subMenus)`
    `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 name)`
    `SC` | `getRadio(java.lang.String name)`
    `private SC` | `getSource(java.util.EventObject e)` returns the SwingComponent wrapper for this item
    `SC` | `getSwingComponent(java.lang.Object component)`
    `void` | `itemStateChanged(java.awt.event.ItemEvent e)`
    `void` | `menuAddButtonGroup(SC item)`
    `void` | `menuClearListeners(SC c)`
    `SC` | `menuCreatePopup(java.lang.String title, java.lang.Object applet)`
    `void` | `menuInsertSubMenu(SC menu, SC subMenu, int index)`
    `void` | `mouseClicked(java.awt.event.MouseEvent e)`
    `void` | `mouseEntered(java.awt.event.MouseEvent e)`
    `void` | `mouseExited(java.awt.event.MouseEvent e)`
    `void` | `mousePressed(java.awt.event.MouseEvent e)`
    `void` | `mouseReleased(java.awt.event.MouseEvent e)`
    `void` | `reinstateMenu(javax.swing.JMenuItem item, javax.swing.MenuElement[] path)` Cause the menu to persist in its open state.

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

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

- - ### Field Detail

    - #### popup

          private GenericPopup popup

    - #### htSources

          private java.util.Map<java.lang.Object,SC> htSources

    - #### buttonGroup

          private javax.swing.ButtonGroup buttonGroup

  - ### Constructor Detail

    - #### AwtPopupHelper

          public AwtPopupHelper(GenericPopup popup)

  - ### Method Detail

    - #### menuCreatePopup

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

      Specified by:
        `menuCreatePopup` 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`

    - #### getMenu

          public SC getMenu(java.lang.String name)

      Specified by:
        `getMenu` in interface `PopupHelper`

    - #### getMenuItem

          public SC getMenuItem(java.lang.String name)

      Specified by:
        `getMenuItem` in interface `PopupHelper`

    - #### menuAddButtonGroup

          public void menuAddButtonGroup(SC item)

      Specified by:
        `menuAddButtonGroup` in interface `PopupHelper`

    - #### getButtonGroup

          public java.lang.Object getButtonGroup()

      Specified by:
        `getButtonGroup` in interface `PopupHelper`

    - #### menuInsertSubMenu

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

      Specified by:
        `menuInsertSubMenu` in interface `PopupHelper`

    - #### getItemType

          public int getItemType(SC m)

      Specified by:
        `getItemType` in interface `PopupHelper`

    - #### getSwingComponent

          public SC getSwingComponent(java.lang.Object component)

      Specified by:
        `getSwingComponent` in interface `PopupHelper`

    - #### menuClearListeners

          public void menuClearListeners(SC c)

      Specified by:
        `menuClearListeners` in interface `PopupHelper`

    - #### clearListener

          private void clearListener(javax.swing.AbstractButton ab)

    - #### clearListeners

          private void clearListeners(java.lang.Object[] subMenus)

    - #### itemStateChanged

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

      Specified by:
        `itemStateChanged` in interface `java.awt.event.ItemListener`

    - #### actionPerformed

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

      Specified by:
        `actionPerformed` in interface `java.awt.event.ActionListener`

    - #### mouseEntered

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

      Specified by:
        `mouseEntered` in interface `java.awt.event.MouseListener`

    - #### mouseExited

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

      Specified by:
        `mouseExited` in interface `java.awt.event.MouseListener`

    - #### mousePressed

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

      Specified by:
        `mousePressed` in interface `java.awt.event.MouseListener`

    - #### mouseReleased

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

      Specified by:
        `mouseReleased` in interface `java.awt.event.MouseListener`

    - #### mouseClicked

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

      Specified by:
        `mouseClicked` in interface `java.awt.event.MouseListener`

    - #### getSource

          private SC getSource(java.util.EventObject e)

      returns the SwingComponent wrapper for this item
      Parameters:
        `e` -
      Returns:
        wrapped component

    - #### reinstateMenu

          public void reinstateMenu(javax.swing.JMenuItem item,
                                    javax.swing.MenuElement[] path)

      Cause the menu to persist in its open state. Path is set in the setArmed() method of the item, and it is checked in the doClick() method. Persist only if (a) somewhere in the path of names there is "Persist", and nowhere in that path is "!Persist".
      Parameters:
        `item` -
        `path` -