# Class CSSSWTEngineImpl

java.lang.Object
org.eclipse.e4.ui.css.core.impl.engine.CSSEngineImpl
org.eclipse.e4.ui.css.swt.engine.CSSSWTEngineImpl

All Implemented Interfaces:
  `CSSEngine`

public class CSSSWTEngineImpl extends CSSEngineImpl
CSS SWT Engine. Configures `CSSEngineImpl` with the SWT-specific value converters and the registry-driven element + property handler providers, and applies styles to SWT widgets.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Display`
`display`

### Fields inherited from class CSSEngineImpl

`computeDefaultStyle, propertyHandlerProviders`

## Constructor Summary

Constructors
Constructor
Description
`CSSSWTEngineImpl(Display display)`
`CSSSWTEngineImpl(Display display, boolean lazyApplyingStyles)`

## Method Summary

Modifier and Type
Method
Description
`Element`
`getElement(Object element)`
Return the w3c Element linked to the Object element.
`IResourcesRegistry`
`getResourcesRegistry()`
Get the `IResourcesRegistry` registered used to cache/dispose resources.
`protected void`
`hookNativeWidget(Object widget)`
Called when an element context is created for a native widget and registered with this engine.
`protected boolean`
`isStylable(Widget widget)`
Return true if the given widget can be styled.
`void`
`reapply()`
Reapply the styles to the objects managed by this engine.
`void`
`reset()`
Reset all style sheet registered into CSS Engine.

### Methods inherited from class CSSEngineImpl

`applyCSSProperty, applyDefaultStyleDeclaration, applyDefaultStyleDeclaration, applyInlineStyle, applyStyleDeclaration, applyStyles, applyStyles, convert, convert, dispose, getCSSCompositePropertiesNames, getCSSElementContext, getCSSProperties, getCSSPropertyHandlers, getCSSValueConverter, getDefaultStyleDeclaration, getDefaultStyleDeclaration, getDocumentCSS, getElementProvider, getElementsContext, getErrorHandler, getNativeWidget, getResourcesLocatorManager, getStaticPseudoInstances, getViewCSS, handleExceptions, handleWidgetDisposed, isElementStyled, isVisible, makeCSSParser, markElementStyled, matches, onStylesAppliedToChildNodes, parseAndApplyStyleDeclaration, parseAndApplyStyleDeclaration, parseAndApplyStyleDeclaration, parseAndApplyStyleDeclaration, parsePropertyValue, parsePropertyValue, parsePropertyValue, parsePropertyValue, parseSelectors, parseSelectors, parseSelectors, parseSelectors, parseStyleDeclaration, parseStyleDeclaration, parseStyleDeclaration, parseStyleDeclaration, parseStyleSheet, parseStyleSheet, parseStyleSheet, registerCSSProperty, registerCSSPropertyHandler, registerCSSPropertyHandlerProvider, registerCSSValueConverter, registerPackage, retrieveCSSProperty, setElementProvider, setErrorHandler, setResourceRegistryKeyFactory, setResourcesLocatorManager, setResourcesRegistry, startStylingSession, stopStylingSession, unregisterCSSPropertyHandlerProvider, unregisterCSSValueConverter`

### Methods inherited from class Object

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

## Field Details

### display

protected Display display

## Constructor Details

### CSSSWTEngineImpl

public CSSSWTEngineImpl(Display display)

### CSSSWTEngineImpl

public CSSSWTEngineImpl(Display display, boolean lazyApplyingStyles)

## Method Details

### hookNativeWidget

protected void hookNativeWidget(Object widget)
Description copied from class: `CSSEngineImpl`
Called when an element context is created for a native widget and registered with this engine. Subclasses should override and install a listener on the widget that will call `CSSEngineImpl.handleWidgetDisposed(Object)` when the widget is disposed.

The default implementation of this method does nothing.

Overrides:
  `hookNativeWidget` in class `CSSEngineImpl`
Parameters:
  `widget` - the native widget to hook

### getResourcesRegistry

public IResourcesRegistry getResourcesRegistry()
Description copied from interface: `CSSEngine`
Get the `IResourcesRegistry` registered used to cache/dispose resources.

Specified by:
  `getResourcesRegistry` in interface `CSSEngine`
Overrides:
  `getResourcesRegistry` in class `CSSEngineImpl`

### getElement

public Element getElement(Object element)
Description copied from class: `CSSEngineImpl`
Return the w3c Element linked to the Object element.

Specified by:
  `getElement` in interface `CSSEngine`
Overrides:
  `getElement` in class `CSSEngineImpl`

### isStylable

protected boolean isStylable(Widget widget)
Return true if the given widget can be styled.

### reset

public void reset()
Description copied from interface: `CSSEngine`
Reset all style sheet registered into CSS Engine. This method must be called if you want parse and apply new StyleSheet and remove the old StyleSheet parsed.

Specified by:
  `reset` in interface `CSSEngine`
Overrides:
  `reset` in class `CSSEngineImpl`

### reapply

public void reapply()
Description copied from interface: `CSSEngine`
Reapply the styles to the objects managed by this engine.