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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanApply CSS Propertyproperty(ex : background-color) with CSSValuevalue(ex : red) into theelement(ex : Swing Component, SWT Widget).voidapplyCSSPropertyBackground(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-positionvoidapplyCSSPropertyBackgroundAttachment(Object element, CSSValue value, String pseudo, CSSEngine engine) Sets whether a background image is fixed or scrolls with the rest of the page.voidapplyCSSPropertyBackgroundColor(Object element, CSSValue value, String pseudo, CSSEngine engine) Sets the background color of an element.voidapplyCSSPropertyBackgroundImage(Object element, CSSValue value, String pseudo, CSSEngine engine) Sets an image as the background.voidapplyCSSPropertyBackgroundPosition(Object element, CSSValue value, String pseudo, CSSEngine engine) Sets the starting position of a background image.voidapplyCSSPropertyBackgroundRepeat(Object element, CSSValue value, String pseudo, CSSEngine engine) Sets if/how a background image will be repeated.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).Methods inherited from class org.eclipse.e4.ui.css.core.dom.properties.css2.AbstractCSSPropertyBackgroundCompositeHandler
applyCSSProperty, getCSSPropertiesNames, isCSSPropertyCompositeMethods inherited from class org.eclipse.e4.ui.css.core.dom.properties.AbstractCSSPropertyCompositeHandler
applyCSSPropertyCompositeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.e4.ui.css.core.dom.properties.css2.ICSSPropertyBackgroundHandler
retrieveCSSPropertyBackgroundAttachment, retrieveCSSPropertyBackgroundColor, retrieveCSSPropertyBackgroundImage, retrieveCSSPropertyBackgroundPosition, retrieveCSSPropertyBackgroundRepeat
-
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:ICSSPropertyHandlerApply CSS Propertyproperty(ex : background-color) with CSSValuevalue(ex : red) into theelement(ex : Swing Component, SWT Widget).- Specified by:
applyCSSPropertyin interfaceICSSPropertyHandler- Parameters:
element- Swing Component, SWT Widget...property- CSS Propertyvalue- CSS valuepseudo- the pseudo class to use, ornullif 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:ICSSPropertyHandlerRetrieve CSS value (ex : red) of CSS Propertyproperty(ex : background-color) from theelement(ex : Swing Component, SWT Widget).- Specified by:
retrieveCSSPropertyin interfaceICSSPropertyHandler- Parameters:
element- Swing Component, SWT Widget...property- CSS Propertypseudo- the pseudo class to use, ornullif none is requiredengine- 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:ICSSPropertyBackgroundHandlerA shorthand property for setting all background properties in one declaration Available values = background-color background-image background-repeat background-attachment background-position- Specified by:
applyCSSPropertyBackgroundin interfaceICSSPropertyBackgroundHandler- Throws:
Exception
-
applyCSSPropertyBackgroundAttachment
public void applyCSSPropertyBackgroundAttachment(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyBackgroundHandlerSets whether a background image is fixed or scrolls with the rest of the page. Available values are=scroll,fixed- Specified by:
applyCSSPropertyBackgroundAttachmentin interfaceICSSPropertyBackgroundHandler- Throws:
Exception
-
applyCSSPropertyBackgroundColor
public void applyCSSPropertyBackgroundColor(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyBackgroundHandlerSets the background color of an element. Available values are= color-rgb, color-hex, color-name, transparent- Specified by:
applyCSSPropertyBackgroundColorin interfaceICSSPropertyBackgroundHandler- Throws:
Exception
-
applyCSSPropertyBackgroundImage
public void applyCSSPropertyBackgroundImage(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyBackgroundHandlerSets an image as the background. Available values=url(URL), none- Specified by:
applyCSSPropertyBackgroundImagein interfaceICSSPropertyBackgroundHandler- Throws:
Exception
-
applyCSSPropertyBackgroundPosition
public void applyCSSPropertyBackgroundPosition(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyBackgroundHandlerSets 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:
applyCSSPropertyBackgroundPositionin interfaceICSSPropertyBackgroundHandler- Throws:
Exception
-
applyCSSPropertyBackgroundRepeat
public void applyCSSPropertyBackgroundRepeat(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyBackgroundHandlerSets if/how a background image will be repeated. Available values=repeat,repeat-x,repeat-y,no-repeat- Specified by:
applyCSSPropertyBackgroundRepeatin interfaceICSSPropertyBackgroundHandler- Throws:
Exception
-