# Interface ICSSPropertyHandler

All Known Subinterfaces:
  `ICSSPropertyBackgroundHandler, ICSSPropertyBorderHandler, ICSSPropertyClassificationHandler, ICSSPropertyCompositeHandler, ICSSPropertyDimensionHandler, ICSSPropertyFontHandler, ICSSPropertyMarginHandler, ICSSPropertyPaddingHandler, ICSSPropertyTextHandler`

All Known Implementing Classes:
  `AbstractConvertedCSSPropertySWTHandler, AbstractCSSPropertyBackgroundCompositeHandler, AbstractCSSPropertyBackgroundHandler, AbstractCSSPropertyBorderCompositeHandler, AbstractCSSPropertyBorderHandler, AbstractCSSPropertyClassificationHandler, AbstractCSSPropertyCompositeHandler, AbstractCSSPropertyDimensionHandler, AbstractCSSPropertyFontCompositeHandler, AbstractCSSPropertyFontHandler, AbstractCSSPropertyMarginHandler, AbstractCSSPropertyPaddingHandler, AbstractCSSPropertySWTHandler, AbstractCSSPropertyTextHandler, CSSBackgroundModePropertyHandler, CSSPropertyAlignmentSWTHandler, CSSPropertyBackgroundSWTHandler, CSSPropertyBorderSWTHandler, CSSPropertyBorderVisibleSWTHandler, CSSPropertyClassificationSWTHandler, CSSPropertyColorDefinitionHandler, CSSPropertyCustomTabContentBackgroundSWTHandler, CSSPropertye4SelectedTabFillHandler, CSSPropertye4TabOutline, CSSPropertyFontDefinitionHandler, CSSPropertyFontSWTHandler, CSSPropertyHeaderHandler, CSSPropertyInnerKeylineSWTHandler, CSSPropertyLinesVisibleSWTHandler, CSSPropertyLinkSWTHandler, CSSPropertyMarginSWTHandler, CSSPropertyMaximizedSWTHandler, CSSPropertyMaximizeVisibleSWTHandler, CSSPropertyMinimizedSWTHandler, CSSPropertyMinimizeVisibleSWTHandler, CSSPropertyOuterKeylineSWTHandler, CSSPropertyPaddingSWTHandler, CSSPropertySelectedImageVisibleSWTHandler, CSSPropertySelectedTabsSWTHandler, CSSPropertySimpleSWTHandler, CSSPropertySingleSWTHandler, CSSPropertyTabHeightHandler, CSSPropertyTabPositionSWTHandler, CSSPropertyTabRendererSWTHandler, CSSPropertyTabTextMinimumCharactersSWTHandler, CSSPropertyTextSWTHandler, CSSPropertyThemeElementDefinitionHandler, CSSPropertyThemesExtensionHandler, CSSPropertyUnselectedCloseVisibleSWTHandler, CSSPropertyUnselectedImageVisibleSWTHandler, CSSPropertyUnselectedTabsSWTHandler, CSSPropertyUnselectHotTabsColorBackgroundHandler, EclipsePreferencesHandler`

public interface ICSSPropertyHandler
CSS Property Handler interface used to

- apply CSS Property value to an element like Swing Component, SWT Widget.
- retrieve default CSS Property value from element like Swing Component, SWT Widget.

## 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).
`default void`
`onAllCSSPropertiesApplied(Object element, CSSEngine engine)`
Callback method called once after all CSS properties of a single declaration have been applied.
`default void`
`onAllCSSPropertiesApplied(Object element, CSSEngine engine, String pseudo)`
Variant of `onAllCSSPropertiesApplied(Object, CSSEngine)` that also receives the pseudo class.
`default 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).

## Method Details

### applyCSSProperty

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

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

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

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

### onAllCSSPropertiesApplied

default void onAllCSSPropertiesApplied(Object element, CSSEngine engine) throws Exception
Callback method called once after all CSS properties of a single declaration have been applied. Handlers that need to perform a final step (re-layout, redraw, batched commit, ...) override this method; the default is a no-op.

Throws:
  `Exception`

### onAllCSSPropertiesApplied

default void onAllCSSPropertiesApplied(Object element, CSSEngine engine, String pseudo) throws Exception
Variant of `onAllCSSPropertiesApplied(Object, CSSEngine)` that also receives the pseudo class. Defaults to delegating to the pseudo-less form.

Throws:
  `Exception`