Class AbstractCSSPropertyFontHandler
java.lang.Object
org.eclipse.e4.ui.css.core.dom.properties.AbstractCSSPropertyCompositeHandler
org.eclipse.e4.ui.css.core.dom.properties.css2.AbstractCSSPropertyFontCompositeHandler
org.eclipse.e4.ui.css.core.dom.properties.css2.AbstractCSSPropertyFontHandler
- All Implemented Interfaces:
ICSSPropertyFontHandler
,ICSSPropertyCompositeHandler
,ICSSPropertyHandler
- Direct Known Subclasses:
CSSPropertyFontDefinitionHandler
,CSSPropertyFontSWTHandler
public abstract class AbstractCSSPropertyFontHandler
extends AbstractCSSPropertyFontCompositeHandler
implements ICSSPropertyFontHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Apply CSS Propertyproperty
(ex : background-color) with CSSValuevalue
(ex : red) into theelement
(ex : Swing Component, SWT Widget).void
applyCSSPropertyFont
(Object element, CSSValue value, String pseudo, CSSEngine engine) A shorthand property for setting all of the properties for a font in one declaration.void
applyCSSPropertyFontFamily
(Object element, CSSValue value, String pseudo, CSSEngine engine) A prioritized list of font family names and/or generic family names for an element.protected void
applyCSSPropertyFontFamily
(CSS2FontProperties font, CSSValue value, String pseudo, CSSEngine engine) void
applyCSSPropertyFontSize
(Object element, CSSValue value, String pseudo, CSSEngine engine) Sets the size of a font.protected void
applyCSSPropertyFontSize
(CSS2FontProperties font, CSSValue value, String pseudo, CSSEngine engine) void
applyCSSPropertyFontSizeAdjust
(Object element, CSSValue value, String pseudo, CSSEngine engine) Specifies an aspect value for an element that will preserve the x-height of the first-choice font.void
applyCSSPropertyFontStretch
(Object element, CSSValue value, String pseudo, CSSEngine engine) Condenses or expands the current font-family.void
applyCSSPropertyFontStyle
(Object element, CSSValue value, String pseudo, CSSEngine engine) Sets the style of the font.protected void
applyCSSPropertyFontStyle
(CSS2FontProperties font, CSSValue value, String pseudo, CSSEngine engine) void
applyCSSPropertyFontVariant
(Object element, CSSValue value, String pseudo, CSSEngine engine) Displays text in a small-caps font or a normal font.void
applyCSSPropertyFontWeight
(Object element, CSSValue value, String pseudo, CSSEngine engine) Sets the weight of a font.protected void
applyCSSPropertyFontWeight
(CSS2FontProperties font, CSSValue value, String pseudo, CSSEngine engine) 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.AbstractCSSPropertyFontCompositeHandler
applyCSSProperty, getCSSPropertiesNames, isCSSPropertyComposite
Methods inherited from class org.eclipse.e4.ui.css.core.dom.properties.AbstractCSSPropertyCompositeHandler
applyCSSPropertyComposite
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.e4.ui.css.core.dom.properties.css2.ICSSPropertyFontHandler
retrieveCSSPropertyFontAdjust, retrieveCSSPropertyFontFamily, retrieveCSSPropertyFontSize, retrieveCSSPropertyFontStretch, retrieveCSSPropertyFontStyle, retrieveCSSPropertyFontVariant, retrieveCSSPropertyFontWeight
-
Constructor Details
-
AbstractCSSPropertyFontHandler
public AbstractCSSPropertyFontHandler()
-
-
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
-
applyCSSPropertyFont
public void applyCSSPropertyFont(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyFontHandler
A shorthand property for setting all of the properties for a font in one declaration. Available values are=font-style font-variant font-weight font-size/line-height font-family caption icon menu message-box small-caption status-bar- Specified by:
applyCSSPropertyFont
in interfaceICSSPropertyFontHandler
- Throws:
Exception
-
applyCSSPropertyFontFamily
public void applyCSSPropertyFontFamily(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyFontHandler
A prioritized list of font family names and/or generic family names for an element.- Specified by:
applyCSSPropertyFontFamily
in interfaceICSSPropertyFontHandler
- Throws:
Exception
-
applyCSSPropertyFontFamily
protected void applyCSSPropertyFontFamily(CSS2FontProperties font, CSSValue value, String pseudo, CSSEngine engine) throws Exception - Throws:
Exception
-
applyCSSPropertyFontSize
public void applyCSSPropertyFontSize(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyFontHandler
Sets the size of a font.- Specified by:
applyCSSPropertyFontSize
in interfaceICSSPropertyFontHandler
- Throws:
Exception
-
applyCSSPropertyFontSize
protected void applyCSSPropertyFontSize(CSS2FontProperties font, CSSValue value, String pseudo, CSSEngine engine) throws Exception - Throws:
Exception
-
applyCSSPropertyFontSizeAdjust
public void applyCSSPropertyFontSizeAdjust(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyFontHandler
Specifies an aspect value for an element that will preserve the x-height of the first-choice font.- Specified by:
applyCSSPropertyFontSizeAdjust
in interfaceICSSPropertyFontHandler
- Throws:
Exception
-
applyCSSPropertyFontStretch
public void applyCSSPropertyFontStretch(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyFontHandler
Condenses or expands the current font-family.- Specified by:
applyCSSPropertyFontStretch
in interfaceICSSPropertyFontHandler
- Throws:
Exception
-
applyCSSPropertyFontStyle
public void applyCSSPropertyFontStyle(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyFontHandler
Sets the style of the font.- Specified by:
applyCSSPropertyFontStyle
in interfaceICSSPropertyFontHandler
- Throws:
Exception
-
applyCSSPropertyFontStyle
protected void applyCSSPropertyFontStyle(CSS2FontProperties font, CSSValue value, String pseudo, CSSEngine engine) throws Exception - Throws:
Exception
-
applyCSSPropertyFontVariant
public void applyCSSPropertyFontVariant(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyFontHandler
Displays text in a small-caps font or a normal font.- Specified by:
applyCSSPropertyFontVariant
in interfaceICSSPropertyFontHandler
- Throws:
Exception
-
applyCSSPropertyFontWeight
public void applyCSSPropertyFontWeight(Object element, CSSValue value, String pseudo, CSSEngine engine) throws Exception Description copied from interface:ICSSPropertyFontHandler
Sets the weight of a font.- Specified by:
applyCSSPropertyFontWeight
in interfaceICSSPropertyFontHandler
- Throws:
Exception
-
applyCSSPropertyFontWeight
protected void applyCSSPropertyFontWeight(CSS2FontProperties font, CSSValue value, String pseudo, CSSEngine engine) throws Exception - Throws:
Exception
-