Class AbstractCSSPropertySWTHandler

java.lang.Object
org.eclipse.e4.ui.css.swt.properties.AbstractCSSPropertySWTHandler
All Implemented Interfaces:
ICSSPropertyHandler
Direct Known Subclasses:
AbstractConvertedCSSPropertySWTHandler, CSSBackgroundModePropertyHandler, CSSPropertyAlignmentSWTHandler, CSSPropertyBorderVisibleSWTHandler, CSSPropertyCornerRadiusSWTHandler, CSSPropertyCustomTabContentBackgroundSWTHandler, CSSPropertye4SelectedTabFillHandler, CSSPropertye4TabOutline, CSSPropertyInnerKeylineSWTHandler, CSSPropertyLinesVisibleSWTHandler, CSSPropertyMaximizedSWTHandler, CSSPropertyMaximizeVisibleSWTHandler, CSSPropertyMinimizedSWTHandler, CSSPropertyMinimizeVisibleSWTHandler, CSSPropertyOuterKeylineSWTHandler, CSSPropertySelectedImageVisibleSWTHandler, CSSPropertySelectedTabsSWTHandler, CSSPropertySimpleSWTHandler, CSSPropertySingleSWTHandler, CSSPropertyTabHeightHandler, CSSPropertyTabPositionSWTHandler, CSSPropertyTabRendererSWTHandler, CSSPropertyTabTextMinimumCharactersSWTHandler, CSSPropertyUnselectedCloseVisibleSWTHandler, CSSPropertyUnselectedImageVisibleSWTHandler, CSSPropertyUnselectedTabsSWTHandler, CSSPropertyUnselectHotTabsColorBackgroundHandler

public abstract class AbstractCSSPropertySWTHandler extends Object implements ICSSPropertyHandler
Abstract CSS Property SWT Handler to check if the element coming from applyCSSProperty and retrieveCSSProperty methods is SWT Control.
  • Constructor Details

    • AbstractCSSPropertySWTHandler

      public AbstractCSSPropertySWTHandler()
  • 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
    • applyCSSProperty

      protected abstract void applyCSSProperty(Control control, String property, CSSValue value, String pseudo, CSSEngine engine) throws Exception
      Apply CSS Property property (ex : background-color) with CSSValue value (ex : red) into the SWT control (ex : SWT Text, SWT Label).
      Parameters:
      control - SWT control to change
      property - CSS Property
      value - CSS value
      pseudo - the pseudo class to use, or null if none is required
      engine - CSS Engine
      Throws:
      Exception - if applying CSS failed
    • retrieveCSSProperty

      protected abstract String retrieveCSSProperty(Control control, String property, String pseudo, CSSEngine engine) throws Exception
      Retrieve CSS value (ex : red) of CSS Property property (ex : background-color) from the SWT control (ex : SWT Text, SWT Label).
      Parameters:
      control - SWT control to change
      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