Component
Date: 2019-10-22

org.jmol.awtjs.swing

## Class Component

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

- Direct Known Subclasses:
    Container

      public abstract class Component
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private boolean` | `_visible`
    `private javajs.api.GenericColor` | `bgcolor`
    `protected boolean` | `enabled`
    `protected int` | `height`
    `protected java.lang.String` | `id`
    `protected int` | `minHeight`
    `protected int` | `minWidth`
    `protected java.lang.Object` | `mouseListener`
    `protected java.lang.String` | `name`
    `protected java.lang.Object` | `parent`
    `protected int` | `renderHeight`
    `protected int` | `renderWidth`
    `protected java.lang.String` | `text`
    `protected int` | `width`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addMouseListener(java.lang.Object listener)`
    `protected java.lang.String` | `getCSSstyle(int defaultPercentW, int defaultPercentH)`
    `int` | `getHeight()`
    `java.lang.String` | `getName()`
    `java.lang.Object` | `getParent()`
    `int` | `getSubcomponentHeight()`
    `int` | `getSubcomponentWidth()`
    `java.lang.String` | `getText()`
    `int` | `getWidth()`
    `boolean` | `isEnabled()`
    `boolean` | `isVisible()`
    `static java.lang.String` | `newID(java.lang.String type)`
    `void` | `repaint()`
    `void` | `setBackground(javajs.api.GenericColor color)`
    `void` | `setEnabled(boolean enabled)`
    `void` | `setMinimumSize(Dimension d)`
    `void` | `setName(java.lang.String name)`
    `void` | `setParent(java.lang.Object p)`
    `void` | `setPreferredSize(Dimension dimension)`
    `void` | `setText(java.lang.String text)`
    `void` | `setVisible(boolean visible)`
    `abstract java.lang.String` | `toHTML()`

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

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

- - ### Field Detail

    - #### _visible

          private boolean _visible

    - #### enabled

          protected boolean enabled

    - #### text

          protected java.lang.String text

    - #### name

          protected java.lang.String name

    - #### width

          protected int width

    - #### height

          protected int height

    - #### id

          protected java.lang.String id

    - #### parent

          protected java.lang.Object parent

    - #### mouseListener

          protected java.lang.Object mouseListener

    - #### bgcolor

          private javajs.api.GenericColor bgcolor

    - #### minWidth

          protected int minWidth

    - #### minHeight

          protected int minHeight

    - #### renderWidth

          protected int renderWidth

    - #### renderHeight

          protected int renderHeight

  - ### Constructor Detail

    - #### Component

          protected Component(java.lang.String type)

  - ### Method Detail

    - #### setParent

          public void setParent(java.lang.Object p)

    - #### newID

          public static java.lang.String newID(java.lang.String type)

    - #### toHTML

          public abstract java.lang.String toHTML()

    - #### setBackground

          public void setBackground(javajs.api.GenericColor color)

    - #### setText

          public void setText(java.lang.String text)

    - #### setName

          public void setName(java.lang.String name)

    - #### getName

          public java.lang.String getName()

    - #### getParent

          public java.lang.Object getParent()

    - #### setPreferredSize

          public void setPreferredSize(Dimension dimension)

    - #### addMouseListener

          public void addMouseListener(java.lang.Object listener)

    - #### getText

          public java.lang.String getText()

    - #### isEnabled

          public boolean isEnabled()

    - #### setEnabled

          public void setEnabled(boolean enabled)

    - #### isVisible

          public boolean isVisible()

    - #### setVisible

          public void setVisible(boolean visible)

    - #### getHeight

          public int getHeight()

    - #### getWidth

          public int getWidth()

    - #### setMinimumSize

          public void setMinimumSize(Dimension d)

    - #### getSubcomponentWidth

          public int getSubcomponentWidth()

    - #### getSubcomponentHeight

          public int getSubcomponentHeight()

    - #### getCSSstyle

          protected java.lang.String getCSSstyle(int defaultPercentW,
                                                 int defaultPercentH)

    - #### repaint

          public void repaint()