/** * Implements {@link Value#getLength()}. */ public int getLength() throws DOMException { return computedValue.getLength(); }
/** * Implements {@link Value#getLength()}. */ public int getLength() throws DOMException { return computedValue.getLength(); }
/** * Implements {@link Value#getLength()}. */ public int getLength() throws DOMException { return computedValue.getLength(); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.css.CSSValueList#getLength()}. */ public int getLength() { return valueProvider.getValue().getLength(); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.css.CSSValueList#getLength()}. */ public int getLength() { return valueProvider.getValue().getLength(); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.css.CSSValueList#getLength()}. */ public int getLength() { return valueProvider.getValue().getLength(); }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.css.CSSValueList#item(int)}. */ public CSSValue item(int index) { int len = valueProvider.getValue().getLength(); if (index < 0 || index >= len) { return null; } if (items == null) { items = new CSSValue[valueProvider.getValue().getLength()]; } else if (items.length < len) { CSSValue[] nitems = new CSSValue[len]; System.arraycopy( items, 0, nitems, 0, items.length ); items = nitems; } CSSValue result = items[index]; if (result == null) { items[index] = result = new ListComponent(index); } return result; }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.css.CSSValueList#item(int)}. */ public CSSValue item(int index) { int len = valueProvider.getValue().getLength(); if (index < 0 || index >= len) { return null; } if (items == null) { items = new CSSValue[valueProvider.getValue().getLength()]; } else if (items.length < len) { CSSValue[] nitems = new CSSValue[len]; System.arraycopy( items, 0, nitems, 0, items.length ); items = nitems; } CSSValue result = items[index]; if (result == null) { items[index] = result = new ListComponent(index); } return result; }
/** * <b>DOM</b>: Implements {@link org.w3c.dom.css.CSSValueList#item(int)}. */ public CSSValue item(int index) { int len = valueProvider.getValue().getLength(); if (index < 0 || index >= len) { return null; } if (items == null) { items = new CSSValue[valueProvider.getValue().getLength()]; } else if (items.length < len) { CSSValue[] nitems = new CSSValue[len]; System.arraycopy( items, 0, nitems, 0, items.length ); items = nitems; } CSSValue result = items[index]; if (result == null) { items[index] = result = new ListComponent(index); } return result; }
private String[] getFontFamilyNames(Value list) { if ((list == null) || (list.getLength() == 0)) { return new String[] {JAVA_FONT_FAMILY_NAME_SANS_SERIF}; } List<String> fontFamilyNames = new ArrayList<String>(); Map validNames = getValidFontNameMapping(); for (int i = 0, len = list.getLength(); i < len; i++) { Value it = list.item(i); String fontName = it.getStringValue(); String family = (String)validNames.get(mapCssFontFamilyNameToJavaFontFamilyName(fontName)); if (family == null) { family = (String)validNames.get(fontName.toLowerCase()); } if (family != null) { // return family; fontFamilyNames.add(family); } } if (fontFamilyNames.isEmpty()) { // Fallback. fontFamilyNames.add(JAVA_FONT_FAMILY_NAME_SANS_SERIF); } return fontFamilyNames.toArray(new String[fontFamilyNames.size()]); }
/** * The returns the actual value of this component. */ protected Value getValue() { if (index >= valueProvider.getValue().getLength()) { throw new DOMException (DOMException.NO_MODIFICATION_ALLOWED_ERR, ""); } return valueProvider.getValue().item(index); }
/** * The returns the actual value of this component. */ protected Value getValue() { if (index >= valueProvider.getValue().getLength()) { throw new DOMException (DOMException.NO_MODIFICATION_ALLOWED_ERR, ""); } return valueProvider.getValue().item(index); }
/** * The returns the actual value of this component. */ protected Value getValue() { if (index >= valueProvider.getValue().getLength()) { throw new DOMException (DOMException.NO_MODIFICATION_ALLOWED_ERR, ""); } return valueProvider.getValue().item(index); }
/** * Converts the 'stroke-dasharray' property to a list of float * number in user units. * * @param v the CSS value describing the dasharray property */ public static float [] convertStrokeDasharray(Value v) { float [] dasharray = null; if (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { int length = v.getLength(); dasharray = new float[length]; float sum = 0; for (int i = 0; i < dasharray.length; ++i) { dasharray[i] = v.item(i).getFloatValue(); sum += dasharray[i]; } if (sum == 0) { /* 11.4 - If the sum of the <length>'s is zero, then * the stroke is rendered as if a value of none were specified. */ dasharray = null; } } return dasharray; }
/** * Converts the 'stroke-dasharray' property to a list of float * number in user units. * * @param v the CSS value describing the dasharray property */ public static float [] convertStrokeDasharray(Value v) { float [] dasharray = null; if (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { int length = v.getLength(); dasharray = new float[length]; float sum = 0; for (int i = 0; i < dasharray.length; ++i) { dasharray[i] = v.item(i).getFloatValue(); sum += dasharray[i]; } if (sum == 0) { /* 11.4 - If the sum of the <length>'s is zero, then * the stroke is rendered as if a value of none were specified. */ dasharray = null; } } return dasharray; }
/** * Converts the 'stroke-dasharray' property to a list of float * number in user units. * * @param v the CSS value describing the dasharray property */ public static float [] convertStrokeDasharray(Value v) { float [] dasharray = null; if (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { int length = v.getLength(); dasharray = new float[length]; float sum = 0; for (int i = 0; i < dasharray.length; ++i) { dasharray[i] = v.item(i).getFloatValue(); sum += dasharray[i]; } if (sum == 0) { /* 11.4 - If the sum of the <length>'s is zero, then * the stroke is rendered as if a value of none were specified. */ dasharray = null; } } return dasharray; }
cursorValue.getCssValueType() == CSSValue.CSS_VALUE_LIST && cursorValue.getLength() == 1) { Value lValue = cursorValue.item(0); if (lValue != null
cursorValue.getCssValueType() == CSSValue.CSS_VALUE_LIST && cursorValue.getLength() == 1) { Value lValue = cursorValue.item(0); if (lValue != null
cursorValue.getCssValueType() == CSSValue.CSS_VALUE_LIST && cursorValue.getLength() == 1) { Value lValue = cursorValue.item(0); if (lValue != null
} else if (cursorValue.getCssValueType() == CSSValue.CSS_VALUE_LIST) { int nValues = cursorValue.getLength(); if (nValues == 1) { cursorValue = cursorValue.item(0);