AbstractButton
Date: 2019-10-22

org.jmol.awtjs.swing

## Class AbstractButton

- java.lang.Object
- - org.jmol.awtjs.swing.Component
  - - org.jmol.awtjs.swing.Container
    - - org.jmol.awtjs.swing.JComponent
      - - org.jmol.awtjs.swing.AbstractButton

- All Implemented Interfaces:
    SC
  Direct Known Subclasses:
    JButton, JCheckBox, JComboBox, JMenuItem, JPopupMenu

      public abstract class AbstractButton
      extends JComponent
      implements SC

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) java.lang.Object` | `applet`
    `(package private) java.lang.String` | `htmlName`
    `private java.lang.String` | `icon`
    `(package private) java.lang.Object` | `itemListener`
    `private SC` | `popupMenu`
    `(package private) boolean` | `selected`

    - ### Fields inherited from class org.jmol.awtjs.swing.JComponent

      `actionCommand, actionListener, autoScrolls`

    - ### Fields inherited from class org.jmol.awtjs.swing.Container

      `list`

    - ### Fields inherited from class org.jmol.awtjs.swing.Component

      `enabled, height, id, minHeight, minWidth, mouseListener, name, parent, renderHeight, renderWidth, text, width`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractButton(java.lang.String type)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(SC item)`
    `void` | `addItemListener(java.lang.Object listener)`
    `protected java.lang.String` | `getHtmlDisabled()`
    `java.lang.Object` | `getIcon()`
    `protected java.lang.String` | `getMenuHTML()`
    `java.lang.Object` | `getPopupMenu()`
    `SC` | `getTopPopupMenu()`
    `protected java.lang.String` | `htmlMenuOpener(java.lang.String type)`
    `void` | `init(java.lang.String text, java.lang.Object icon, java.lang.String actionCommand, SC popupMenu)`
    `void` | `insert(SC subMenu, int index)`
    `boolean` | `isSelected()`
    `void` | `setIcon(java.lang.Object icon)`
    `void` | `setSelected(boolean selected)`

    - ### Methods inherited from class org.jmol.awtjs.swing.JComponent

      `addActionListener, getActionCommand, setActionCommand, setAutoscrolls`

    - ### Methods inherited from class org.jmol.awtjs.swing.Container

      `add, addComponent, getComponent, getComponentCount, getComponents, getSubcomponentHeight, getSubcomponentWidth, insertComponent, remove, removeAll`

    - ### Methods inherited from class org.jmol.awtjs.swing.Component

      `addMouseListener, getCSSstyle, getHeight, getName, getParent, getText, getWidth, isEnabled, isVisible, newID, repaint, setBackground, setEnabled, setMinimumSize, setName, setParent, setPreferredSize, setText, setVisible, toHTML`

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

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

    - ### Methods inherited from interface org.jmol.api.SC

      `addActionListener, addMouseListener, getActionCommand, getComponent, getComponentCount, getComponents, getName, getParent, getText, isEnabled, remove, removeAll, setActionCommand, setAutoscrolls, setEnabled, setName, setText`

- - ### Field Detail

    - #### itemListener

          java.lang.Object itemListener

    - #### applet

          java.lang.Object applet

    - #### htmlName

          java.lang.String htmlName

    - #### selected

          boolean selected

    - #### popupMenu

          private SC popupMenu

    - #### icon

          private java.lang.String icon

  - ### Constructor Detail

    - #### AbstractButton

          protected AbstractButton(java.lang.String type)

  - ### Method Detail

    - #### setSelected

          public void setSelected(boolean selected)

      Specified by:
        `setSelected` in interface `SC`

    - #### isSelected

          public boolean isSelected()

      Specified by:
        `isSelected` in interface `SC`

    - #### addItemListener

          public void addItemListener(java.lang.Object listener)

      Specified by:
        `addItemListener` in interface `SC`

    - #### getIcon

          public java.lang.Object getIcon()

      Specified by:
        `getIcon` in interface `SC`

    - #### setIcon

          public void setIcon(java.lang.Object icon)

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

    - #### getTopPopupMenu

          public SC getTopPopupMenu()

    - #### add

          public void add(SC item)

      Specified by:
        `add` in interface `SC`

    - #### insert

          public void insert(SC subMenu,
                             int index)

      Specified by:
        `insert` in interface `SC`

    - #### getPopupMenu

          public java.lang.Object getPopupMenu()

      Specified by:
        `getPopupMenu` in interface `SC`

    - #### getMenuHTML

          protected java.lang.String getMenuHTML()

    - #### htmlMenuOpener

          protected java.lang.String htmlMenuOpener(java.lang.String type)

    - #### getHtmlDisabled

          protected java.lang.String getHtmlDisabled()