# Class CSSEngineHelper

java.lang.Object
org.eclipse.e4.ui.workbench.renderers.swt.CSSEngineHelper

public class CSSEngineHelper extends Object
Helper class for retrieving CSS values for a particular control so it can be used by renderers.

## Constructor Summary

Constructors
Constructor
Description
`CSSEngineHelper(IEclipseContext context, Control control)`
Create a CSSEngineHelper that can retrieve engine values for a particular control.

## Method Summary

Modifier and Type
Method
Description
`int`
`getMarginBottom(int defaultValue)`
Return the margin bottom as specified in the stylesheet for this control, or the defaultValue if none is specified.
`int`
`getMarginLeft(int defaultValue)`
Return the margin left as specified in the stylesheet for this control, or the defaultValue if none is specified.
`int`
`getMarginRight(int defaultValue)`
Return the margin right as specified in the stylesheet for this control, or the defaultValue if none is specified.
`int`
`getMarginTop(int defaultValue)`
Return the margin top as specified in the stylesheet for this control, or the defaultValue if none is specified.

### Methods inherited from class Object

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

## Constructor Details

### CSSEngineHelper

public CSSEngineHelper(IEclipseContext context, Control control)
Create a CSSEngineHelper that can retrieve engine values for a particular control.

## Method Details

### getMarginBottom

public int getMarginBottom(int defaultValue)
Return the margin bottom as specified in the stylesheet for this control, or the defaultValue if none is specified.

Returns:
  the margin in pixels

### getMarginTop

public int getMarginTop(int defaultValue)
Return the margin top as specified in the stylesheet for this control, or the defaultValue if none is specified.

Returns:
  the margin in pixels

### getMarginLeft

public int getMarginLeft(int defaultValue)
Return the margin left as specified in the stylesheet for this control, or the defaultValue if none is specified.

Returns:
  the margin in pixels

### getMarginRight

public int getMarginRight(int defaultValue)
Return the margin right as specified in the stylesheet for this control, or the defaultValue if none is specified.

Returns:
  the margin in pixels