Package org.eclipse.e4.ui.css.swt.helpers

# Class SWTElementHelpers

java.lang.Object
org.eclipse.e4.ui.css.swt.helpers.SWTElementHelpers

public class SWTElementHelpers extends Object
SWT Helper to link w3c Element with SWT widget.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`SWT_ELEMENT_KEY`
`static final String`
`SWT_NODELIST_KEY`

## Constructor Summary

Constructors
Constructor
Description
`SWTElementHelpers()`

## Method Summary

Modifier and Type
Method
Description
`static Control`
`getControl(Object element)`
Return the SWT Control which is wrapped to the object `element`.
`static Element`
`getElement(Widget widget, CSSEngine engine)`
Return the w3c Element linked to the SWT widget.
`static Element`
`getElement(Widget widget, CSSEngine engine, Class<?> classElement)`
Return the w3c Element linked to the SWT widget.
`static Element`
`getHTMLElement(Widget widget, CSSEngine engine)`
Return the w3c Element linked to the SWT widget.
`static Widget`
`getWidget(Object element)`
Return the SWT Widget which is wrapped to the object `element`.

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

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

## Field Details

### SWT_ELEMENT_KEY

public static final String SWT_ELEMENT_KEY

See Also:
  - Constant Field Values

### SWT_NODELIST_KEY

public static final String SWT_NODELIST_KEY

See Also:
  - Constant Field Values

## Constructor Details

### SWTElementHelpers

public SWTElementHelpers()

## Method Details

### getElement

public static Element getElement(Widget widget, CSSEngine engine, Class<?> classElement) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException
Return the w3c Element linked to the SWT widget.

Throws:
  `NoSuchMethodException`
  `InvocationTargetException`
  `InstantiationException`
  `IllegalAccessException`

### getElement

public static Element getElement(Widget widget, CSSEngine engine)
Return the w3c Element linked to the SWT widget.

### getHTMLElement

public static Element getHTMLElement(Widget widget, CSSEngine engine)
Return the w3c Element linked to the SWT widget.

### getControl

public static Control getControl(Object element)
Return the SWT Control which is wrapped to the object `element`.

### getWidget

public static Widget getWidget(Object element)
Return the SWT Widget which is wrapped to the object `element`.