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


Java LexicalUnit.getParameters方法代码示例

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


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

示例1: createICCNamedColorValue

import org.w3c.css.sac.LexicalUnit; //导入方法依赖的package包/类
private Value createICCNamedColorValue(LexicalUnit lu, Value v) {
    lu = lu.getParameters();
    expectIdent(lu);
    String profileName = lu.getStringValue();

    lu = lu.getNextLexicalUnit();
    expectComma(lu);
    lu = lu.getNextLexicalUnit();
    expectIdent(lu);
    String colorName = lu.getStringValue();

    ICCNamedColor icc = new ICCNamedColor(profileName, colorName);

    lu = lu.getNextLexicalUnit();
    return icc;
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:17,代码来源:SVGColorManager.java

示例2: createCIELabColorValue

import org.w3c.css.sac.LexicalUnit; //导入方法依赖的package包/类
private Value createCIELabColorValue(LexicalUnit lu, Value v) {
    lu = lu.getParameters();
    float l = getColorValue(lu);
    lu = lu.getNextLexicalUnit();
    expectComma(lu);
    lu = lu.getNextLexicalUnit();
    float a = getColorValue(lu);
    lu = lu.getNextLexicalUnit();
    expectComma(lu);
    lu = lu.getNextLexicalUnit();
    float b = getColorValue(lu);

    CIELabColor icc = new CIELabColor(l, a, b);

    lu = lu.getNextLexicalUnit();
    return icc;
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:18,代码来源:SVGColorManager.java

示例3: createCIELCHColorValue

import org.w3c.css.sac.LexicalUnit; //导入方法依赖的package包/类
private Value createCIELCHColorValue(LexicalUnit lu, Value v) {
    lu = lu.getParameters();
    float l = getColorValue(lu);
    lu = lu.getNextLexicalUnit();
    expectComma(lu);
    lu = lu.getNextLexicalUnit();
    float c = getColorValue(lu);
    lu = lu.getNextLexicalUnit();
    expectComma(lu);
    lu = lu.getNextLexicalUnit();
    float h = getColorValue(lu);

    CIELCHColor icc = new CIELCHColor(l, c, h);

    lu = lu.getNextLexicalUnit();
    return icc;
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:18,代码来源:SVGColorManager.java

示例4: createDeviceColorValue

import org.w3c.css.sac.LexicalUnit; //导入方法依赖的package包/类
private Value createDeviceColorValue(LexicalUnit lu, Value v, int expectedComponents) {
    lu = lu.getParameters();

    boolean nChannel = (expectedComponents <= 0);
    DeviceColor col = new DeviceColor(nChannel);

    col.append(getColorValue(lu));
    LexicalUnit lastUnit = lu;
    lu = lu.getNextLexicalUnit();
    while (lu != null) {
        expectComma(lu);
        lu = lu.getNextLexicalUnit();
        col.append(getColorValue(lu));
        lastUnit = lu;
        lu = lu.getNextLexicalUnit();
    }
    if (!nChannel && expectedComponents != col.getNumberOfColors()) {
        throw createInvalidLexicalUnitDOMException(lastUnit.getLexicalUnitType());
    }
    return col;
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:22,代码来源:SVGColorManager.java

示例5: RGBColorImpl

import org.w3c.css.sac.LexicalUnit; //导入方法依赖的package包/类
public RGBColorImpl(LexicalUnit lexicalUnit) {
	LexicalUnit nextUnit = lexicalUnit.getParameters();
	red = new Measure(nextUnit);
	nextUnit = nextUnit.getNextLexicalUnit().getNextLexicalUnit();
	green = new Measure(nextUnit);
	nextUnit = nextUnit.getNextLexicalUnit().getNextLexicalUnit();
	blue = new Measure(nextUnit);
}
 
开发者ID:eclipse,项目名称:tm4e,代码行数:9,代码来源:RGBColorImpl.java

示例6: createValue

import org.w3c.css.sac.LexicalUnit; //导入方法依赖的package包/类
/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    switch (lu.getLexicalUnitType()) {
    case LexicalUnit.SAC_FUNCTION:
        if (!lu.getFunctionName().equalsIgnoreCase("rect")) {
            break;
        }
    case LexicalUnit.SAC_RECT_FUNCTION:
        lu = lu.getParameters();
        Value top = createRectComponent(lu);
        lu = lu.getNextLexicalUnit();
        if (lu == null ||
            lu.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) {
            throw createMalformedRectDOMException();
        }
        lu = lu.getNextLexicalUnit();
        Value right = createRectComponent(lu);
        lu = lu.getNextLexicalUnit();
        if (lu == null ||
            lu.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) {
            throw createMalformedRectDOMException();
        }
        lu = lu.getNextLexicalUnit();
        Value bottom = createRectComponent(lu);
        lu = lu.getNextLexicalUnit();
        if (lu == null ||
            lu.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) {
            throw createMalformedRectDOMException();
        }
        lu = lu.getNextLexicalUnit();
        Value left = createRectComponent(lu);
        return new RectValue(top, right, bottom, left);
    }
    throw createMalformedRectDOMException();
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:39,代码来源:RectManager.java

示例7: createICCColorValue

import org.w3c.css.sac.LexicalUnit; //导入方法依赖的package包/类
private Value createICCColorValue(LexicalUnit lu, Value v) {
    lu = lu.getParameters();
    expectIdent(lu);

    ICCColor icc = new ICCColor(lu.getStringValue());

    lu = lu.getNextLexicalUnit();
    while (lu != null) {
        expectComma(lu);
        lu = lu.getNextLexicalUnit();
        icc.append(getColorValue(lu));
        lu = lu.getNextLexicalUnit();
    }
    return icc;
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:16,代码来源:SVGColorManager.java

示例8: createValue

import org.w3c.css.sac.LexicalUnit; //导入方法依赖的package包/类
/**
 * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}.
 */
public Value createValue(LexicalUnit lu, CSSEngine engine)
    throws DOMException {
    if (lu.getLexicalUnitType() == LexicalUnit.SAC_RGBCOLOR) {
        lu = lu.getParameters();
        Value red = createColorComponent(lu);
        lu = lu.getNextLexicalUnit().getNextLexicalUnit();
        Value green = createColorComponent(lu);
        lu = lu.getNextLexicalUnit().getNextLexicalUnit();
        Value blue = createColorComponent(lu);
        return createRGBColor(red, green, blue);
    }
    return super.createValue(lu, engine);
}
 
开发者ID:git-moss,项目名称:Push2Display,代码行数:17,代码来源:AbstractColorManager.java


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