/** * Default constructor; as the instance is immutable after use, don't use * this for class instantiation externally. */ protected CalculatedStyle() { _derivedValuesById = new FSDerivedValue[CSSName.countCSSPrimitiveNames()]; }
private final static synchronized CSSName addProperty( String propName, Object type, String initialValue, Object inherit, PropertyBuilder builder ) { return addProperty(propName, type, initialValue, inherit, true, builder); }
public String asString() { return toString(); }
/** * Description of the Method * * @param val PARAM * @return Returns */ public static boolean looksLikeALineHeight(String val) { return "normal".equals(val) || looksLikeALength(val) || looksLikeANumber(val); }
public boolean isAbsoluteUnit() { return ValueConstants.isAbsoluteUnit(_cssSacUnitType); }
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; }
private final static MarginBoxName addValue(String ident, IdentValue textAlign, IdentValue verticalAlign) { MarginBoxName val = new MarginBoxName(ident, textAlign, verticalAlign); ALL.put(ident, val); return val; }
private final static PageElementPosition addValue(String ident) { PageElementPosition val = new PageElementPosition(ident); ALL.put(ident, val); return val; }
/** * Description of the Method * * @param val PARAM * @return Returns */ public static boolean looksLikeABGPosition(String val) { return BACKGROUND_POSITIONS_IDENTS.contains(val) || looksLikeALength(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()); }
public String getFingerprint() { if (getPropertyValueType() == VALUE_TYPE_IDENT) { if (_identValue == null) { _identValue = IdentValue.getByIdentString(getStringValue()); } return "I" + _identValue.FS_ID; } else { return getCssText(); } } }
public String asString() { return toString(); }
/** * Default constructor; as the instance is immutable after use, don't use * this for class instantiation externally. */ protected CalculatedStyle() { _derivedValuesById = new FSDerivedValue[CSSName.countCSSPrimitiveNames()]; }
private static synchronized CSSName addProperty( String propName, Object type, String initialValue, Object inherit, PropertyBuilder builder ) { return addProperty(propName, type, initialValue, inherit, true, builder); }
public boolean isAbsoluteUnit() { return ValueConstants.isAbsoluteUnit(_cssSacUnitType); }
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; }
private final static MarginBoxName addValue(String ident, IdentValue textAlign, IdentValue verticalAlign) { MarginBoxName val = new MarginBoxName(ident, textAlign, verticalAlign); ALL.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; }
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; }
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."); }