# Class Component

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

Direct Known Subclasses:
  `Container`

public abstract class Component extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`enabled`
`protected int`
`height`
`protected String`
`id`
`protected int`
`minHeight`
`protected int`
`minWidth`
`protected Object`
`mouseListener`
`protected String`
`name`
`protected Object`
`parent`
`protected int`
`renderHeight`
`protected int`
`renderWidth`
`protected String`
`text`
`protected int`
`width`

## Constructor Summary

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

## Method Summary

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

### Methods inherited from class Object

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

## Field Details

### enabled

protected boolean enabled

### text

protected String text

### name

protected String name

### width

protected int width

### height

protected int height

### id

protected String id

### parent

protected Object parent

### mouseListener

protected Object mouseListener

### minWidth

protected int minWidth

### minHeight

protected int minHeight

### renderWidth

protected int renderWidth

### renderHeight

protected int renderHeight

## Constructor Details

### Component

protected Component(String type)

## Method Details

### setParent

public void setParent(Object p)

### newID

public static String newID(String type)

### toHTML

public abstract String toHTML()

### setBackground

public void setBackground(GenericColor color)

### setText

public void setText(String text)

### setName

public void setName(String name)

### getName

public String getName()

### getParent

public Object getParent()

### setPreferredSize

public void setPreferredSize(Dimension dimension)

### addMouseListener

public void addMouseListener(Object listener)

### getText

public 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 String getCSSstyle(int defaultPercentW, int defaultPercentH)

### repaint

public void repaint()