JComponent
Date: 2019-10-22

org.jmol.awtjs.swing

## Class JComponent

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

- Direct Known Subclasses:
    AbstractButton, JComponentImp, JContentPane, JEditorPane, JLabel, JPanel, JScrollPane, JSplitPane, JTable, JTextField, JTextPane

      public abstract class JComponent
      extends Container

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `actionCommand`
    `protected java.lang.Object` | `actionListener`
    `protected boolean` | `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` | `JComponent(java.lang.String type)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addActionListener(java.lang.Object listener)` Note that it will be the job of the JavaScript on the page to do with actionListener what is desired.
    `java.lang.String` | `getActionCommand()`
    `void` | `setActionCommand(java.lang.String actionCommand)`
    `void` | `setAutoscrolls(boolean b)`

    - ### 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`

- - ### Field Detail

    - #### autoScrolls

          protected boolean autoScrolls

    - #### actionCommand

          protected java.lang.String actionCommand

    - #### actionListener

          protected java.lang.Object actionListener

  - ### Constructor Detail

    - #### JComponent

          protected JComponent(java.lang.String type)

  - ### Method Detail

    - #### setAutoscrolls

          public void setAutoscrolls(boolean b)

    - #### addActionListener

          public void addActionListener(java.lang.Object listener)

      Note that it will be the job of the JavaScript on the page to do with actionListener what is desired. In javax.swing, these methods are in AbstractButton, but this is better for org.jmol.awtjs.swing, reducing the duplication of JTextField's actionListener business.
      Parameters:
        `listener` -

    - #### getActionCommand

          public java.lang.String getActionCommand()

    - #### setActionCommand

          public void setActionCommand(java.lang.String actionCommand)