Java Code Examples for org.w3c.dom.css.CSSValue#CSS_VALUE_LIST
The following examples show how to use
org.w3c.dom.css.CSSValue#CSS_VALUE_LIST .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GridPropertyHandler.java From nebula with Eclipse Public License 2.0 | 6 votes |
private void applyCSSPropertyFont(final Object element, final Grid grid, final CSSValue value, String target) throws Exception { if (value.getCssValueType() == CSSValue.CSS_VALUE_LIST) { final CSSValueList valueList = (CSSValueList) value; final int length = valueList.getLength(); for (int i = 0; i < length; i++) { final CSSValue value2 = valueList.item(i); if (value2.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) { final String cssProp = CSS2FontHelper.getCSSFontPropertyName((CSSPrimitiveValue) value2); if (cssProp.equals("font-family")) { applyCSSPropertyFamily(element, grid, value2, target); } else if (cssProp.equals("font-size")) { applyCSSPropertySize(element, grid, value2, target); } else if (cssProp.equals("font-weight") && ("bold".equals(value2.getCssText()) || "bolder".equals(value2.getCssText()))) { applyCSSPropertyWeight(element, grid, value2, target); } else if (cssProp.equals("font-style") && ("italic".equals(value2.getCssText()) || "oblique".equals(value2.getCssText()))) { applyCSSPropertyStyle(element, grid, value2, target); } } } } }
Example 2
Source File: TableComboPropertyHandler.java From nebula with Eclipse Public License 2.0 | 6 votes |
private void applyCSSPropertyFont(final Object element, final Control widget, final CSSValue value) throws Exception { if (value.getCssValueType() == CSSValue.CSS_VALUE_LIST) { final CSSValueList valueList = (CSSValueList) value; final int length = valueList.getLength(); for (int i = 0; i < length; i++) { final CSSValue value2 = valueList.item(i); if (value2.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) { final String cssProp = CSS2FontHelper.getCSSFontPropertyName((CSSPrimitiveValue) value2); if (cssProp.equals("font-family")) { applyCSSPropertyFamily(element, widget, value2); } else if (cssProp.equals("font-size")) { applyCSSPropertySize(element, widget, value2); } else if (cssProp.equals("font-weight") && ("bold".equals(value2.getCssText()) || "bolder".equals(value2.getCssText()))) { applyCSSPropertyWeight(element, widget, value2); } else if (cssProp.equals("font-style") && ("italic".equals(value2.getCssText()) || "oblique".equals(value2.getCssText()))) { applyCSSPropertyStyle(element, widget, value2); } } } } }
Example 3
Source File: CDateTimePropertyHandler.java From nebula with Eclipse Public License 2.0 | 6 votes |
private void applyCSSPropertyFont(final Control widget, final CSSValue value, final boolean picker) throws Exception { if (value.getCssValueType() == CSSValue.CSS_VALUE_LIST) { final CSSValueList valueList = (CSSValueList) value; final int length = valueList.getLength(); for (int i = 0; i < length; i++) { final CSSValue value2 = valueList.item(i); if (value2.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) { final String cssProp = CSS2FontHelper.getCSSFontPropertyName((CSSPrimitiveValue) value2); if (cssProp.equals("font-family")) { applyCSSPropertyFamily(widget, value2, picker); } else if (cssProp.equals("font-size")) { applyCSSPropertySize(widget, value2, picker); } else if (cssProp.equals("font-weight") && ("bold".equals(value2.getCssText()) || "bolder".equals(value2.getCssText()))) { applyCSSPropertyWeight(widget, value2, picker); } else if (cssProp.equals("font-style") && ("italic".equals(value2.getCssText()) || "oblique".equals(value2.getCssText()))) { applyCSSPropertyStyle(widget, value2, picker); } } } } }
Example 4
Source File: ListValue.java From birt with Eclipse Public License 1.0 | 4 votes |
/** * Implements {@link Value#getCssValueType()}. */ public short getCssValueType( ) { return CSSValue.CSS_VALUE_LIST; }