# 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 inherited from class JComponent

`actionCommand, actionListener, autoScrolls`

### Fields inherited from class Container

`list`

### Fields inherited from class Component

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

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractButton(String type)`

## Method Summary

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

### Methods inherited from class JComponent

`addActionListener, getActionCommand, setActionCommand, setAutoscrolls`

### Methods inherited from class Container

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

### Methods inherited from class 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 Object

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

### Methods inherited from interface SC

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

## Constructor Details

### AbstractButton

protected AbstractButton(String type)

## Method Details

### 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(Object listener)

Specified by:
  `addItemListener` in interface `SC`

### getIcon

public Object getIcon()

Specified by:
  `getIcon` in interface `SC`

### setIcon

public void setIcon(Object icon)

Specified by:
  `setIcon` in interface `SC`

### init

public void init(String text, Object icon, 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 Object getPopupMenu()

Specified by:
  `getPopupMenu` in interface `SC`

### getMenuHTML

protected String getMenuHTML()

### htmlMenuOpener

protected String htmlMenuOpener(String type)

### getHtmlDisabled

protected String getHtmlDisabled()