/** * Adds a feature to the Value attribute of the IdentValue class * * @param ident The feature to be added to the Value attribute * @return Returns */ private final static synchronized IdentValue addValue(String ident) { if (ALL_IDENT_VALUES == null) { ALL_IDENT_VALUES = new HashMap(); } IdentValue val = new IdentValue(ident); ALL_IDENT_VALUES.put(ident, val); return val; }
public boolean hasAbsoluteUnit() { // log and return false throw new XRRuntimeException("Ident value is never an absolute unit; wrong class used for derived value; this " + "ident value is a " + this.asString()); }
/** * Description of the Method * * @return Returns */ public IdentValue asIdentValue() { if (!identIsSet) { _identVal = IdentValue.getByIdentString(cssPrimitiveValue.getCssText()); identIsSet = true; } return _identVal; }
public String asString() { return toString(); }
protected IdentValue getListStyleType(FSFunction function) { IdentValue result = IdentValue.DECIMAL; List parameters = function.getParameters(); if (parameters.size() == 2) { PropertyValue pValue = (PropertyValue)parameters.get(1); IdentValue iValue = IdentValue.valueOf(pValue.getStringValue()); if (iValue != null) { result = iValue; } } return result; }
private CSSPrimitiveValue convertToBorderWidth(CSSPrimitiveValue value) { int type = value.getPrimitiveType(); if (type != CSSPrimitiveValue.CSS_IDENT && ! isLength(value)) { return null; } if (isLength(value)) { return value; } else { IdentValue ident = IdentValue.valueOf(value.getStringValue()); if (ident == null) { return null; } if (PrimitivePropertyBuilders.BORDER_WIDTHS.get(ident.FS_ID)) { return Conversions.getBorderWidth(ident.toString()); } else { return null; } } }
private static BitSet setFor(IdentValue[] values) { BitSet result = new BitSet(IdentValue.getIdentCount()); for (int i = 0; i < values.length; i++) { IdentValue ident = (IdentValue)values[i]; result.set(ident.FS_ID); } return result; }
public String asString() { return toString(); }
protected IdentValue getListStyleType(FSFunction function) { IdentValue result = IdentValue.DECIMAL; List parameters = function.getParameters(); if (parameters.size() == 2) { PropertyValue pValue = (PropertyValue)parameters.get(1); IdentValue iValue = IdentValue.valueOf(pValue.getStringValue()); if (iValue != null) { result = iValue; } } return result; }
private CSSPrimitiveValue convertToBorderWidth(CSSPrimitiveValue value) { int type = value.getPrimitiveType(); if (type != CSSPrimitiveValue.CSS_IDENT && ! isLength(value)) { return null; } if (isLength(value)) { return value; } else { IdentValue ident = IdentValue.valueOf(value.getStringValue()); if (ident == null) { return null; } if (PrimitivePropertyBuilders.BORDER_WIDTHS.get(ident.FS_ID)) { return Conversions.getBorderWidth(ident.toString()); } else { return null; } } }
private static BitSet setFor(IdentValue[] values) { BitSet result = new BitSet(IdentValue.getIdentCount()); for (int i = 0; i < values.length; i++) { IdentValue ident = values[i]; result.set(ident.FS_ID); } return result; }
public PropertyValue(IdentValue ident) { _type = CSSPrimitiveValue.CSS_IDENT; _stringValue = ident.toString(); _cssValueType = _stringValue.equals("inherit") ? CSSValue.CSS_INHERIT : CSSValue.CSS_PRIMITIVE_VALUE; _cssText = ident.toString(); _propertyValueType = VALUE_TYPE_IDENT; _identValue = ident; }
private boolean isBorderStyle(CSSPrimitiveValue value) { if (value.getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT) { return false; } IdentValue ident = IdentValue.valueOf(value.getCssText()); if (ident == null) { return false; } return PrimitivePropertyBuilders.BORDER_STYLES.get(ident.FS_ID); }
/** * Description of the Method * * @return Returns */ public IdentValue asIdentValue() { if (!identIsSet) { _identVal = IdentValue.getByIdentString(cssPrimitiveValue.getCssText()); identIsSet = true; } return _identVal; }
public boolean hasAbsoluteUnit() { // log and return false throw new XRRuntimeException("Ident value is never an absolute unit; wrong class used for derived value; this " + "ident value is a " + this.asString()); }
/** * Adds a feature to the Value attribute of the IdentValue class * * @param ident The feature to be added to the Value attribute * @return Returns */ private final static synchronized IdentValue addValue(String ident) { if (ALL_IDENT_VALUES == null) { ALL_IDENT_VALUES = new HashMap(); } IdentValue val = new IdentValue(ident); ALL_IDENT_VALUES.put(ident, val); return val; }
public PropertyValue(IdentValue ident) { _type = CSSPrimitiveValue.CSS_IDENT; _stringValue = ident.toString(); _cssValueType = _stringValue.equals("inherit") ? CSSValue.CSS_INHERIT : CSSValue.CSS_PRIMITIVE_VALUE; _cssText = ident.toString(); _propertyValueType = VALUE_TYPE_IDENT; _identValue = ident; }
private boolean isBorderStyle(CSSPrimitiveValue value) { if (value.getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT) { return false; } IdentValue ident = IdentValue.valueOf(value.getCssText()); if (ident == null) { return false; } return PrimitivePropertyBuilders.BORDER_STYLES.get(ident.FS_ID); }
public String getFingerprint() { if (getPropertyValueType() == VALUE_TYPE_IDENT) { if (_identValue == null) { _identValue = IdentValue.getByIdentString(getStringValue()); } return "I" + _identValue.FS_ID; } else { return getCssText(); } } }
public float getFloatProportionalTo(CSSName cssName, float baseValue, CssContext ctx) { throw new XRRuntimeException("Ident value (" + toString() + ") is never a length; wrong class used for derived value."); }