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 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.