# Class AbstractCSSPropertyBackgroundHandler

java.lang.Object
org.eclipse.e4.ui.css.core.dom.properties.AbstractCSSPropertyCompositeHandler
org.eclipse.e4.ui.css.core.dom.properties.css2.AbstractCSSPropertyBackgroundCompositeHandler
org.eclipse.e4.ui.css.core.dom.properties.css2.AbstractCSSPropertyBackgroundHandler

All Implemented Interfaces:
  `ICSSPropertyBackgroundHandler, ICSSPropertyCompositeHandler, ICSSPropertyHandler`

Direct Known Subclasses:
  `CSSPropertyBackgroundSWTHandler`

public abstract class AbstractCSSPropertyBackgroundHandler extends AbstractCSSPropertyBackgroundCompositeHandler implements ICSSPropertyBackgroundHandler
Abstract CSS property background which is enable to manage apply CSS Property background, background-color, background-image...

## Constructor Summary

Constructors
Constructor
Description
`AbstractCSSPropertyBackgroundHandler()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`applyCSSProperty(Object element, String property, CSSValue value, String pseudo, CSSEngine engine)`
Apply CSS Property `property` (ex : background-color) with CSSValue `value` (ex : red) into the `element` (ex : Swing Component, SWT Widget).
`void`
`applyCSSPropertyBackground(Object element, CSSValue value, String pseudo, CSSEngine engine)`
A shorthand property for setting all background properties in one declaration Available values = background-color background-image background-repeat background-attachment background-position
`void`
`applyCSSPropertyBackgroundAttachment(Object element, CSSValue value, String pseudo, CSSEngine engine)`
Sets whether a background image is fixed or scrolls with the rest of the page.
`void`
`applyCSSPropertyBackgroundColor(Object element, CSSValue value, String pseudo, CSSEngine engine)`
Sets the background color of an element.
`void`
`applyCSSPropertyBackgroundImage(Object element, CSSValue value, String pseudo, CSSEngine engine)`
Sets an image as the background.
`void`
`applyCSSPropertyBackgroundPosition(Object element, CSSValue value, String pseudo, CSSEngine engine)`
Sets the starting position of a background image.
`void`
`applyCSSPropertyBackgroundRepeat(Object element, CSSValue value, String pseudo, CSSEngine engine)`
Sets if/how a background image will be repeated.
`String`
`retrieveCSSProperty(Object element, String property, String pseudo, CSSEngine engine)`
Retrieve CSS value (ex : red) of CSS Property `property` (ex : background-color) from the `element` (ex : Swing Component, SWT Widget).

### Methods inherited from class AbstractCSSPropertyBackgroundCompositeHandler

`applyCSSProperty, getCSSPropertiesNames, isCSSPropertyComposite`

### Methods inherited from class AbstractCSSPropertyCompositeHandler

`applyCSSPropertyComposite`

### Methods inherited from class Object

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

### Methods inherited from interface ICSSPropertyBackgroundHandler

`retrieveCSSPropertyBackgroundAttachment, retrieveCSSPropertyBackgroundColor, retrieveCSSPropertyBackgroundImage, retrieveCSSPropertyBackgroundPosition, retrieveCSSPropertyBackgroundRepeat`

### Methods inherited from interface ICSSPropertyHandler

`onAllCSSPropertiesApplied, onAllCSSPropertiesApplied`

## Constructor Details

### AbstractCSSPropertyBackgroundHandler

public AbstractCSSPropertyBackgroundHandler()

## Method Details

### applyCSSProperty

public boolean applyCSSProperty(Object element, String property, CSSValue value, String pseudo, CSSEngine engine) throws Exception
Description copied from interface: `ICSSPropertyHandler`
Apply CSS Property `property` (ex : background-color) with CSSValue `value` (ex : red) into the `element` (ex : Swing Component, SWT Widget).

Specified by:
  `applyCSSProperty` in interface `ICSSPropertyHandler`
Parameters:
  `element` - Swing Component, SWT Widget...
  `property` - CSS Property
  `value` - CSS value
  `pseudo` - the pseudo class to use, or `null` if none is required
  `engine` - CSS Engine
Returns:
  weather CSS property was applied or not
Throws:
  `Exception` - if applying CSS failed

### retrieveCSSProperty

public String retrieveCSSProperty(Object element, String property, String pseudo, CSSEngine engine) throws Exception
Description copied from interface: `ICSSPropertyHandler`
Retrieve CSS value (ex : red) of CSS Property `property` (ex : background-color) from the `element` (ex : Swing Component, SWT Widget).

Specified by:
  `retrieveCSSProperty` in interface `ICSSPropertyHandler`
Parameters:
  `element` - Swing Component, SWT Widget...
  `property` - CSS Property
  `pseudo` - the pseudo class to use, or `null` if none is required
  `engine` - CSS Engine
Returns:
  retrieved CSS properties or `null`
Throws:
  `Exception` - if retrieving CSS failed

### applyCSSPropertyBackground

public void applyCSSPropertyBackground(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception
Description copied from interface: `ICSSPropertyBackgroundHandler`
A shorthand property for setting all background properties in one declaration Available values = background-color background-image background-repeat background-attachment background-position

Specified by:
  `applyCSSPropertyBackground` in interface `ICSSPropertyBackgroundHandler`
Throws:
  `Exception`

### applyCSSPropertyBackgroundAttachment

public void applyCSSPropertyBackgroundAttachment(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception
Description copied from interface: `ICSSPropertyBackgroundHandler`
Sets whether a background image is fixed or scrolls with the rest of the page. Available values are=scroll,fixed

Specified by:
  `applyCSSPropertyBackgroundAttachment` in interface `ICSSPropertyBackgroundHandler`
Throws:
  `Exception`

### applyCSSPropertyBackgroundColor

public void applyCSSPropertyBackgroundColor(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception
Description copied from interface: `ICSSPropertyBackgroundHandler`
Sets the background color of an element. Available values are= color-rgb, color-hex, color-name, transparent

Specified by:
  `applyCSSPropertyBackgroundColor` in interface `ICSSPropertyBackgroundHandler`
Throws:
  `Exception`

### applyCSSPropertyBackgroundImage

public void applyCSSPropertyBackgroundImage(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception
Description copied from interface: `ICSSPropertyBackgroundHandler`
Sets an image as the background. Available values=url(URL), none

Specified by:
  `applyCSSPropertyBackgroundImage` in interface `ICSSPropertyBackgroundHandler`
Throws:
  `Exception`

### applyCSSPropertyBackgroundPosition

public void applyCSSPropertyBackgroundPosition(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception
Description copied from interface: `ICSSPropertyBackgroundHandler`
Sets the starting position of a background image. Available values=top left,top center,top right,center left,center center,center right,bottom left,bottom center,bottom right,x% y%,xpos ypos

Specified by:
  `applyCSSPropertyBackgroundPosition` in interface `ICSSPropertyBackgroundHandler`
Throws:
  `Exception`

### applyCSSPropertyBackgroundRepeat

public void applyCSSPropertyBackgroundRepeat(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception
Description copied from interface: `ICSSPropertyBackgroundHandler`
Sets if/how a background image will be repeated. Available values=repeat,repeat-x,repeat-y,no-repeat

Specified by:
  `applyCSSPropertyBackgroundRepeat` in interface `ICSSPropertyBackgroundHandler`
Throws:
  `Exception`