当前位置: 首页>>代码示例>>Java>>正文


Java LexicalUnit.SAC_INHERIT属性代码示例

本文整理汇总了Java中org.w3c.css.sac.LexicalUnit.SAC_INHERIT属性的典型用法代码示例。如果您正苦于以下问题:Java LexicalUnit.SAC_INHERIT属性的具体用法?Java LexicalUnit.SAC_INHERIT怎么用?Java LexicalUnit.SAC_INHERIT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.w3c.css.sac.LexicalUnit的用法示例。


在下文中一共展示了LexicalUnit.SAC_INHERIT属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return ValueConstants.INHERIT_VALUE;

    case LexicalUnit.SAC_IDENT:
        String s = lu.getStringValue().toLowerCase().intern();
        Object v = values.get(s);
        if (v == null) {
            throw createInvalidIdentifierDOMException(s);
        }
        return (Value)v;
    default:
        break;
    }
    return super.createValue(lu, engine);
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:21,代码来源:FontSizeManager.java

示例2: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return SVGValueConstants.INHERIT_VALUE;

    case LexicalUnit.SAC_URI:
        return new URIValue(lu.getStringValue(),
                            resolveURI(engine.getCSSBaseURI(),
                                       lu.getStringValue()));

    case LexicalUnit.SAC_IDENT:
        if (lu.getStringValue().equalsIgnoreCase
            (CSSConstants.CSS_NONE_VALUE)) {
            return SVGValueConstants.NONE_VALUE;
        }
        throw createInvalidIdentifierDOMException(lu.getStringValue());
    }
    throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType());
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:23,代码来源:FilterManager.java

示例3: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return ValueConstants.INHERIT_VALUE;

    case LexicalUnit.SAC_URI:
        return new URIValue(lu.getStringValue(),
                            resolveURI(engine.getCSSBaseURI(),
                                       lu.getStringValue()));

    case LexicalUnit.SAC_IDENT:
        if (lu.getStringValue().equalsIgnoreCase
            (CSSConstants.CSS_NONE_VALUE)) {
            return ValueConstants.NONE_VALUE;
        }
    }
    throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType());
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:22,代码来源:ClipPathManager.java

示例4: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return SVGValueConstants.INHERIT_VALUE;

    case  LexicalUnit.SAC_INTEGER:
        return new FloatValue(CSSPrimitiveValue.CSS_NUMBER,
                              lu.getIntegerValue());

    case  LexicalUnit.SAC_REAL:
        return new FloatValue(CSSPrimitiveValue.CSS_NUMBER,
                              lu.getFloatValue());

    default:
        throw createInvalidLexicalUnitDOMException
            (lu.getLexicalUnitType());
    }
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:22,代码来源:StrokeMiterlimitManager.java

示例5: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return SVGValueConstants.INHERIT_VALUE;

    case LexicalUnit.SAC_IDENT:
        if (lu.getStringValue().equalsIgnoreCase
            (CSSConstants.CSS_NORMAL_VALUE)) {
            return SVGValueConstants.NORMAL_VALUE;
        }
        throw createInvalidIdentifierDOMException(lu.getStringValue());
    }
    return super.createValue(lu, engine);
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:18,代码来源:SpacingManager.java

示例6: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return SVGValueConstants.INHERIT_VALUE;

    case LexicalUnit.SAC_IDENT:
        String s = lu.getStringValue().toLowerCase();
        if (s.equals(CSSConstants.CSS_AUTO_VALUE)) {
            return SVGValueConstants.AUTO_VALUE;
        }
        if (s.equals(CSSConstants.CSS_SRGB_VALUE)) {
            return SVGValueConstants.SRGB_VALUE;
        }
        return new StringValue(CSSPrimitiveValue.CSS_IDENT, s);
        
    case LexicalUnit.SAC_URI:
        return new URIValue(lu.getStringValue(),
                            resolveURI(engine.getCSSBaseURI(),
                                       lu.getStringValue()));
    }
    throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType());
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:26,代码来源:ColorProfileManager.java

示例7: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return SVGValueConstants.INHERIT_VALUE;

    case LexicalUnit.SAC_IDENT:
        Object v = values.get(lu.getStringValue().toLowerCase().intern());
        if (v == null) {
            throw createInvalidIdentifierDOMException(lu.getStringValue());
        }
        return (Value)v;
    }
    return super.createValue(lu, engine);
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:18,代码来源:BaselineShiftManager.java

示例8: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return SVGValueConstants.INHERIT_VALUE;

    case LexicalUnit.SAC_IDENT:
        if (lu.getStringValue().equalsIgnoreCase
            (CSSConstants.CSS_AUTO_VALUE)) {
            return SVGValueConstants.AUTO_VALUE;
        }
        throw createInvalidIdentifierDOMException(lu.getStringValue());
    }
    return super.createValue(lu, engine);
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:18,代码来源:KerningManager.java

示例9: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return ValueConstants.INHERIT_VALUE;

    case LexicalUnit.SAC_IDENT:
        String s = lu.getStringValue().toLowerCase().intern();
        Object v = getIdentifiers().get(s);
        if (v == null) {
            throw createInvalidIdentifierDOMException(lu.getStringValue());
        }
        return (Value)v;

    default:
        throw createInvalidLexicalUnitDOMException
            (lu.getLexicalUnitType());
    }
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:22,代码来源:IdentifierManager.java

示例10: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {

    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return SVG12ValueConstants.INHERIT_VALUE;
    case LexicalUnit.SAC_IDENT: {
        String s = lu.getStringValue().toLowerCase();
        if (SVG12CSSConstants.CSS_NORMAL_VALUE.equals(s))
            return SVG12ValueConstants.NORMAL_VALUE;
        throw createInvalidIdentifierDOMException(lu.getStringValue());
    }
    default:
        return super.createValue(lu, engine);
    }
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:19,代码来源:LineHeightManager.java

示例11: getCssText

public String getCssText() {
	// TODO: All LexicalUnit.SAC_OPERATOR_* except for COMMA left undone for
	// now as it's not even clear whether they should be treated as measures
	// see bug #278139
	switch (value.getLexicalUnitType()) {
	case LexicalUnit.SAC_INTEGER:
		return String.valueOf(value.getIntegerValue());
	case LexicalUnit.SAC_REAL:
		return String.valueOf(value.getFloatValue());
	case LexicalUnit.SAC_PERCENTAGE:
	case LexicalUnit.SAC_PIXEL:
	case LexicalUnit.SAC_CENTIMETER:
	case LexicalUnit.SAC_EM:
	case LexicalUnit.SAC_EX:
	case LexicalUnit.SAC_PICA:
	case LexicalUnit.SAC_POINT:
	case LexicalUnit.SAC_INCH:
	case LexicalUnit.SAC_DEGREE:
		return String.valueOf(value.getFloatValue()) + value.getDimensionUnitText();
	case LexicalUnit.SAC_URI:
		return "url(" + value.getStringValue() + ")";
	case LexicalUnit.SAC_OPERATOR_COMMA:
		return ",";
	case LexicalUnit.SAC_INHERIT:
		return "inherit";
	}
	return value.getStringValue();
}
 
开发者ID:eclipse,项目名称:tm4e,代码行数:28,代码来源:Measure.java

示例12: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    if (lu.getLexicalUnitType() == LexicalUnit.SAC_INHERIT) {
        return SVGValueConstants.INHERIT_VALUE;
    }
    return super.createValue(lu, engine);
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:10,代码来源:StrokeWidthManager.java

示例13: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return ValueConstants.INHERIT_VALUE;

    case LexicalUnit.SAC_IDENT:
        if (lu.getStringValue().equalsIgnoreCase
            (CSSConstants.CSS_NONE_VALUE)) {
            return ValueConstants.NONE_VALUE;
        }
        ListValue lv = new ListValue(' ');
        do {
            if (lu.getLexicalUnitType() == LexicalUnit.SAC_IDENT) {
                String s = lu.getStringValue().toLowerCase().intern();
                Object obj = values.get(s);
                if (obj == null) {
                    throw createInvalidIdentifierDOMException
                        (lu.getStringValue());
                }
                lv.append((Value)obj);
                lu = lu.getNextLexicalUnit();
            } else {
                throw createInvalidLexicalUnitDOMException
                    (lu.getLexicalUnitType());
            }

        } while (lu != null);
        return lv;
    }
    throw createInvalidLexicalUnitDOMException
        (lu.getLexicalUnitType());
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:36,代码来源:TextDecorationManager.java

示例14: setValues

/**
 * Implements {@link ShorthandManager#setValues(CSSEngine,ShorthandManager.PropertyHandler,LexicalUnit,boolean)}.
 */
public void setValues(CSSEngine eng,
                      ShorthandManager.PropertyHandler ph,
                      LexicalUnit lu,
                      boolean imp)
    throws DOMException {
    if (lu.getLexicalUnitType() == LexicalUnit.SAC_INHERIT)
        return;

    LexicalUnit []lus  = new LexicalUnit[4];
    int cnt=0;
    while (lu != null) {
        if (cnt == 4)
            throw createInvalidLexicalUnitDOMException
                (lu.getLexicalUnitType());
        lus[cnt++] = lu;
        lu = lu.getNextLexicalUnit();
    }
    switch (cnt) {
    case 1: lus[3] = lus[2] = lus[1] = lus[0]; break;
    case 2: lus[2] = lus[0];  lus[3] = lus[1]; break;
    case 3: lus[3] = lus[1]; break;
    default:
    }

    ph.property(SVG12CSSConstants.CSS_MARGIN_TOP_PROPERTY,    lus[0], imp);
    ph.property(SVG12CSSConstants.CSS_MARGIN_RIGHT_PROPERTY,  lus[1], imp);
    ph.property(SVG12CSSConstants.CSS_MARGIN_BOTTOM_PROPERTY, lus[2], imp);
    ph.property(SVG12CSSConstants.CSS_MARGIN_LEFT_PROPERTY,   lus[3], imp);
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:32,代码来源:MarginShorthandManager.java

示例15: createValue

/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    ListValue result = new ListValue();
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_INHERIT:
        return ValueConstants.INHERIT_VALUE;

    case LexicalUnit.SAC_URI:
        do {
            result.append(new URIValue(lu.getStringValue(),
                                       resolveURI(engine.getCSSBaseURI(),
                                                  lu.getStringValue())));
            lu = lu.getNextLexicalUnit();
            if (lu == null) {
                throw createMalformedLexicalUnitDOMException();
            }
            if (lu.getLexicalUnitType() !=
                LexicalUnit.SAC_OPERATOR_COMMA) {
                throw createInvalidLexicalUnitDOMException
                    (lu.getLexicalUnitType());
            }
            lu = lu.getNextLexicalUnit();
            if (lu == null) {
                throw createMalformedLexicalUnitDOMException();
            }
        } while (lu.getLexicalUnitType() == LexicalUnit.SAC_URI);
        if (lu.getLexicalUnitType() != LexicalUnit.SAC_IDENT) {
            throw createInvalidLexicalUnitDOMException
                (lu.getLexicalUnitType());
        }
        // Fall through...

    case LexicalUnit.SAC_IDENT:
        String s = lu.getStringValue().toLowerCase().intern();
        Object v = values.get(s);
        if (v == null) {
            throw createInvalidIdentifierDOMException(lu.getStringValue());
        }
        result.append((Value)v);
        lu = lu.getNextLexicalUnit();
    }
    if (lu != null) {
        throw createInvalidLexicalUnitDOMException
            (lu.getLexicalUnitType());
    }
    return result;
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:50,代码来源:CursorManager.java


注:本文中的org.w3c.css.sac.LexicalUnit.SAC_INHERIT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。