Class AbstractCSSPropertyTextHandler
java.lang.Object
org.eclipse.e4.ui.css.core.dom.properties.css2.AbstractCSSPropertyTextHandler
- All Implemented Interfaces:
ICSSPropertyTextHandler
,ICSSPropertyHandler
- Direct Known Subclasses:
CSSPropertyTextSWTHandler
public abstract class AbstractCSSPropertyTextHandler
extends Object
implements ICSSPropertyTextHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Apply CSS Propertyproperty
(ex : background-color) with CSSValuevalue
(ex : red) into theelement
(ex : Swing Component, SWT Widget).void
applyCSSPropertyColor
(Object element, CSSValue value, String pseudo, CSSEngine engine) Sets the color of a text.void
applyCSSPropertyTextTransform
(Object element, CSSValue value, String pseudo, CSSEngine engine) Controls the letters in an element.protected String
getTextTransform
(String textToInsert, String oldText, CSSValue value) protected String
getTextTransform
(String text, CSSValue value, String defaultText) protected boolean
hasTextTransform
(CSSValue value) retrieveCSSProperty
(Object element, String property, String pseudo, CSSEngine engine) Retrieve CSS value (ex : red) of CSS Propertyproperty
(ex : background-color) from theelement
(ex : Swing Component, SWT Widget).retrieveCSSPropertyColor
(Object element, String pseudo, CSSEngine engine) retrieveCSSPropertyTextTransform
(Object element, String pseudo, CSSEngine engine)
-
Constructor Details
-
AbstractCSSPropertyTextHandler
public AbstractCSSPropertyTextHandler()
-
-
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 Propertyproperty
(ex : background-color) with CSSValuevalue
(ex : red) into theelement
(ex : Swing Component, SWT Widget).- Specified by:
applyCSSProperty
in interfaceICSSPropertyHandler
- Parameters:
element
- Swing Component, SWT Widget...property
- CSS Propertyvalue
- CSS valuepseudo
- the pseudo class to use, ornull
if none is requiredengine
- 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 Propertyproperty
(ex : background-color) from theelement
(ex : Swing Component, SWT Widget).- Specified by:
retrieveCSSProperty
in interfaceICSSPropertyHandler
- Parameters:
element
- Swing Component, SWT Widget...property
- CSS Propertypseudo
- the pseudo class to use, ornull
if none is requiredengine
- CSS Engine- Returns:
- retrieved CSS properties or
null
- Throws:
Exception
- if retrieving CSS failed
-
applyCSSPropertyColor
public void applyCSSPropertyColor(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyTextHandler
Sets the color of a text.- Specified by:
applyCSSPropertyColor
in interfaceICSSPropertyTextHandler
- Throws:
Exception
-
applyCSSPropertyTextTransform
public void applyCSSPropertyTextTransform(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyTextHandler
Controls the letters in an element. Available values are : none capitalize uppercase lowercase- Specified by:
applyCSSPropertyTextTransform
in interfaceICSSPropertyTextHandler
- Throws:
Exception
-
retrieveCSSPropertyColor
public String retrieveCSSPropertyColor(Object element, String pseudo, CSSEngine engine) throws Exception - Specified by:
retrieveCSSPropertyColor
in interfaceICSSPropertyTextHandler
- Throws:
Exception
-
retrieveCSSPropertyTextTransform
public String retrieveCSSPropertyTextTransform(Object element, String pseudo, CSSEngine engine) throws Exception - Specified by:
retrieveCSSPropertyTextTransform
in interfaceICSSPropertyTextHandler
- Throws:
Exception
-
getTextTransform
-
getTextTransform
-
hasTextTransform
-