Examples of parsePropertyValue()


Examples of com.steadystate.css.parser.CSSOMParser.parsePropertyValue()

            String value,
            String priority ) throws DOMException {
        try {
            InputSource is = new InputSource(new StringReader(value));
            CSSOMParser parser = new CSSOMParser();
            CSSValue expr = parser.parsePropertyValue(is);
            Property p = this.getPropertyDeclaration(propertyName);
            boolean important = (priority != null)
                ? priority.equalsIgnoreCase("important")
                : false;
            if (p == null) {
View Full Code Here

Examples of com.steadystate.css.parser.CSSOMParser.parsePropertyValue()

    public void setCssText(String cssText) throws DOMException {
        try {
            InputSource is = new InputSource(new StringReader(cssText));
            CSSOMParser parser = new CSSOMParser();
            CSSValueImpl v2 = (CSSValueImpl) parser.parsePropertyValue(is);
            this._value = v2._value;
        } catch (Exception e) {
            throw new DOMExceptionImpl(
                DOMException.SYNTAX_ERR,
                DOMExceptionImpl.SYNTAX_ERROR,
View Full Code Here

Examples of com.volantis.mcs.css.parser.CSSParser.parsePropertyValue()

     * @param css The css representation of the value.
     * @return The style value.
     */
    public static PropertyValue getPropertyValue(StyleProperty property, String css) {
        CSSParser parser = CSS_PARSER_FACTORY.createStrictParser();
        return parser.parsePropertyValue(property, css);
    }
   
    /**
     * Build a styles with initial values.
     *
 
View Full Code Here

Examples of com.volantis.mcs.eclipse.builder.editors.common.EditorPropertyParser.parsePropertyValue()

     */
    public PropertyValue getPropertyValue() {
        // Check if the first could actually be a StyleKeyword
        final String firstValue = first.getValue();
        final EditorPropertyParser parser = new EditorPropertyParser();
        PropertyValue value = parser.parsePropertyValue(property,
                firstValue, isImportant());

        // Ignore the second value if the first is a keyword or inherit.
        if (value == null || !(value.getValue() instanceof StyleKeyword ||
                value.getValue() instanceof StyleInherit)) {
View Full Code Here

Examples of com.volantis.mcs.eclipse.builder.editors.common.EditorPropertyParser.parsePropertyValue()

        // Ignore the second value if the first is a keyword or inherit.
        if (value == null || !(value.getValue() instanceof StyleKeyword ||
                value.getValue() instanceof StyleInherit)) {
            // If it's not then parse the whole fraction.
            value = parser.parsePropertyValue(property,getStringValue(),
                    isImportant());
        }
        return value;
    }
View Full Code Here

Examples of com.volantis.mcs.eclipse.builder.editors.common.EditorPropertyParser.parsePropertyValue()

                // contains a value which doesn't support a type (e.g.
                // StyleKeyword) or if it's empty (because it will be enabled when
                // the editable combo associated with it is edited).
                if (!"".equals(text)) {
                    EditorPropertyParser parser = new EditorPropertyParser();
                    PropertyValue propertyValue = parser.parsePropertyValue(
                            property, text, isImportant());
                    StyleValue value = propertyValue.getValue();
                    if (!(value instanceof StyleKeyword ||
                            value instanceof StyleInherit)) {
                        unitsCombo.setEnabled(b);
View Full Code Here

Examples of org.apache.batik.css.parser.Parser.parsePropertyValue()

        }

        Parser cssParser = new Parser();
        // see if the property supports the value 'inherit'
        try {
            LexicalUnit lu = cssParser.parsePropertyValue("inherit");
            Value v = manager.createValue(lu, null);
            String s = v.getCssText();
            if (!"inherit".equalsIgnoreCase(s)) {
                report.setErrorCode(ERROR_INHERIT_VALUE);
                report.setPassed(false);
View Full Code Here

Examples of org.apache.batik.css.parser.Parser.parsePropertyValue()

        // test all possible identifiers
        if (identValues != null) {
            try {
                for (int i=0; i < identValues.length; ++i) {
                    LexicalUnit lu = cssParser.parsePropertyValue(identValues[i]);
                    Value v = manager.createValue(lu, null);
                    String s = v.getCssText();
                    if (!identValues[i].equalsIgnoreCase(s)) {
                        report.setErrorCode(ERROR_INVALID_VALUE);
                        report.setPassed(false);
View Full Code Here

Examples of org.apache.batik.css.parser.Parser.parsePropertyValue()

        }

        Parser cssParser = new Parser();
        // see if the property supports the value 'inherit'
        try {
            LexicalUnit lu = cssParser.parsePropertyValue("inherit");
            Value v = manager.createValue(lu, null);
            String s = v.getCssText();
            if (!"inherit".equalsIgnoreCase(s)) {
                report.setErrorCode(ERROR_INHERIT_VALUE);
                report.setPassed(false);
View Full Code Here

Examples of org.apache.batik.css.parser.Parser.parsePropertyValue()

        // test all possible identifiers
        if (identValues != null) {
            try {
                for (int i=0; i < identValues.length; ++i) {
                    LexicalUnit lu = cssParser.parsePropertyValue(identValues[i]);
                    Value v = manager.createValue(lu, null);
                    String s = v.getCssText();
                    if (!identValues[i].equalsIgnoreCase(s)) {
                        report.setErrorCode(ERROR_INVALID_VALUE);
                        report.setPassed(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.