AwtSwingComponent
Date: 2019-10-22

org.jmol.awt

## Class AwtSwingComponent

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

- All Implemented Interfaces:
    SC

      public class AwtSwingComponent
      extends java.lang.Object
      implements SC

  A javax.swing implementation of SwingComponent that mirrors org.jmol.awtjs.swing for compatibility with compilation with java2script.
  Author:
    Bob Hanson, hansonr

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) javax.swing.AbstractButton` | `ab`
    `javax.swing.JComponent` | `jc`
    `(package private) javax.swing.JMenu` | `jm`
    `(package private) javax.swing.JMenuItem` | `jmi`
    `private SC` | `parent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AwtSwingComponent()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(SC item)`
    `void` | `addActionListener(java.lang.Object owner)`
    `void` | `addItemListener(java.lang.Object owner)`
    `void` | `addMouseListener(java.lang.Object owner)`
    `java.lang.String` | `getActionCommand()`
    `(package private) static SC` | `getCheckBox(AwtPopupHelper helper, java.lang.String name, java.util.Map<java.lang.Object,SC> htSources)`
    `java.lang.Object` | `getComponent(int i)`
    `int` | `getComponentCount()`
    `java.lang.Object[]` | `getComponents()`
    `java.lang.Object` | `getIcon()`
    `(package private) static SC` | `getMenu(java.lang.String name, java.util.Map<java.lang.Object,SC> htSources)`
    `(package private) static SC` | `getMenuItem(AwtPopupHelper helper, java.lang.String name, java.util.Map<java.lang.Object,SC> htSources)`
    `java.lang.String` | `getName()`
    `java.lang.Object` | `getParent()`
    `(package private) static SC` | `getPopup(java.lang.String title, java.util.Map<java.lang.Object,SC> htSources)`
    `java.lang.Object` | `getPopupMenu()`
    `(package private) static SC` | `getRadio(AwtPopupHelper helper, java.lang.String name, java.util.Map<java.lang.Object,SC> htSources)`
    `java.lang.String` | `getText()`
    `void` | `init(java.lang.String text, java.lang.Object icon, java.lang.String actionCommand, SC popupMenu)`
    `void` | `insert(SC subMenu, int index)`
    `boolean` | `isEnabled()`
    `boolean` | `isSelected()`
    `void` | `remove(int i)`
    `void` | `removeAll()`
    `void` | `setActionCommand(java.lang.String script)`
    `void` | `setAutoscrolls(boolean b)`
    `void` | `setEnabled(boolean enabled)`
    `void` | `setIcon(java.lang.Object icon)`
    `void` | `setName(java.lang.String name)`
    `void` | `setSelected(boolean b)`
    `void` | `setText(java.lang.String text)`

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

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

- - ### Field Detail

    - #### jc

          public javax.swing.JComponent jc

    - #### ab

          javax.swing.AbstractButton ab

    - #### jmi

          javax.swing.JMenuItem jmi

    - #### jm

          javax.swing.JMenu jm

    - #### parent

          private SC parent

  - ### Constructor Detail

    - #### AwtSwingComponent

          public AwtSwingComponent()

  - ### Method Detail

    - #### getPopup

          static SC getPopup(java.lang.String title,
                             java.util.Map<java.lang.Object,SC> htSources)

    - #### getMenu

          static SC getMenu(java.lang.String name,
                            java.util.Map<java.lang.Object,SC> htSources)

    - #### getMenuItem

          static SC getMenuItem(AwtPopupHelper helper,
                                java.lang.String name,
                                java.util.Map<java.lang.Object,SC> htSources)

    - #### getRadio

          static SC getRadio(AwtPopupHelper helper,
                             java.lang.String name,
                             java.util.Map<java.lang.Object,SC> htSources)

    - #### getCheckBox

          static SC getCheckBox(AwtPopupHelper helper,
                                java.lang.String name,
                                java.util.Map<java.lang.Object,SC> htSources)

    - #### add

          public void add(SC item)

      Specified by:
        `add` in interface `SC`

    - #### addActionListener

          public void addActionListener(java.lang.Object owner)

      Specified by:
        `addActionListener` in interface `SC`

    - #### addItemListener

          public void addItemListener(java.lang.Object owner)

      Specified by:
        `addItemListener` in interface `SC`

    - #### addMouseListener

          public void addMouseListener(java.lang.Object owner)

      Specified by:
        `addMouseListener` in interface `SC`

    - #### getActionCommand

          public java.lang.String getActionCommand()

      Specified by:
        `getActionCommand` in interface `SC`

    - #### getComponent

          public java.lang.Object getComponent(int i)

      Specified by:
        `getComponent` in interface `SC`

    - #### getComponentCount

          public int getComponentCount()

      Specified by:
        `getComponentCount` in interface `SC`

    - #### getComponents

          public java.lang.Object[] getComponents()

      Specified by:
        `getComponents` in interface `SC`

    - #### getName

          public java.lang.String getName()

      Specified by:
        `getName` in interface `SC`

    - #### getParent

          public java.lang.Object getParent()

      Specified by:
        `getParent` in interface `SC`

    - #### getPopupMenu

          public java.lang.Object getPopupMenu()

      Specified by:
        `getPopupMenu` in interface `SC`

    - #### getText

          public java.lang.String getText()

      Specified by:
        `getText` in interface `SC`

    - #### getIcon

          public java.lang.Object getIcon()

      Specified by:
        `getIcon` in interface `SC`

    - #### init

          public void init(java.lang.String text,
                           java.lang.Object icon,
                           java.lang.String actionCommand,
                           SC popupMenu)

      Specified by:
        `init` in interface `SC`

    - #### insert

          public void insert(SC subMenu,
                             int index)

      Specified by:
        `insert` in interface `SC`

    - #### isEnabled

          public boolean isEnabled()

      Specified by:
        `isEnabled` in interface `SC`

    - #### isSelected

          public boolean isSelected()

      Specified by:
        `isSelected` in interface `SC`

    - #### remove

          public void remove(int i)

      Specified by:
        `remove` in interface `SC`

    - #### removeAll

          public void removeAll()

      Specified by:
        `removeAll` in interface `SC`

    - #### setActionCommand

          public void setActionCommand(java.lang.String script)

      Specified by:
        `setActionCommand` in interface `SC`

    - #### setAutoscrolls

          public void setAutoscrolls(boolean b)

      Specified by:
        `setAutoscrolls` in interface `SC`

    - #### setEnabled

          public void setEnabled(boolean enabled)

      Specified by:
        `setEnabled` in interface `SC`

    - #### setName

          public void setName(java.lang.String name)

      Specified by:
        `setName` in interface `SC`

    - #### setSelected

          public void setSelected(boolean b)

      Specified by:
        `setSelected` in interface `SC`

    - #### setText

          public void setText(java.lang.String text)

      Specified by:
        `setText` in interface `SC`

    - #### setIcon

          public void setIcon(java.lang.Object icon)

      Specified by:
        `setIcon` in interface `SC`