Examples of FSFunction


Examples of org.xhtmlrenderer.css.parser.FSFunction

        for (Iterator i = values.iterator(); i.hasNext();) {
            PropertyValue value = (PropertyValue) i.next();

            ContentFunction contentFunction = null;
            FSFunction function = null;

            String content = null;

            short type = value.getPrimitiveType();
            if (type == CSSPrimitiveValue.CSS_STRING) {
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSFunction

        public boolean canHandle(LayoutContext c, FSFunction function) {
            if (c.isPrint() && function.getName().equals("target-counter")) {
                List parameters = function.getParameters();
                if (parameters.size() == 2 || parameters.size() == 3) {
                    FSFunction f = ((PropertyValue)parameters.get(0)).getFunction();
                    if (f == null ||
                            f.getParameters().size() != 1 ||
                            ((PropertyValue)f.getParameters().get(0)).getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT ||
                            ! ((PropertyValue)f.getParameters().get(0)).getStringValue().equals("href")) {
                        return false;
                    }

                    PropertyValue param = (PropertyValue)parameters.get(1);
                    if (param.getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT ||
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSFunction

                    PropertyValue value = (PropertyValue)decl.getValue();
                    List values = value.getValues();
                    if (values.size() == 1) {
                        PropertyValue funcVal = (PropertyValue)values.get(0);
                        if (funcVal.getPropertyValueType() == PropertyValue.VALUE_TYPE_FUNCTION) {
                            FSFunction func = funcVal.getFunction();
                            if (BoxBuilder.isElementFunction(func)) {
                                BlockBox metadata = BoxBuilder.getRunningBlock(c, funcVal);
                                if (metadata != null) {
                                    _metadata = metadata.getElement();
                                }
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSFunction

        return value instanceof FunctionValue;
    }
   
    public String getRunningName() {
        FunctionValue value = (FunctionValue)valueByName(CSSName.POSITION);
        FSFunction function = value.getFunction();
       
        PropertyValue param = (PropertyValue)function.getParameters().get(0);
       
        return param.getStringValue();
    }
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSFunction

        for (Iterator i = values.iterator(); i.hasNext();) {
            PropertyValue value = (PropertyValue) i.next();

            ContentFunction contentFunction = null;
            FSFunction function = null;

            String content = null;

            short type = value.getPrimitiveType();
            if (type == CSSPrimitiveValue.CSS_STRING) {
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSFunction

                    checkIdentType(cssName, value);
                    IdentValue ident = checkIdent(cssName, value);
                   
                    checkValidity(cssName, getAllowed(), ident);
                } else if (value.getPropertyValueType() == PropertyValue.VALUE_TYPE_FUNCTION) {
                    FSFunction function = value.getFunction();
                    if (function.getName().equals("running")) {
                        List params = function.getParameters();
                        if (params.size() == 1) {
                            PropertyValue param = (PropertyValue)params.get(0);
                            if (param.getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT) {
                                throw new CSSParseException("The running function takes an identifier as a parameter", -1);
                            }
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSFunction

                    checkIdentType(cssName, value);
                    IdentValue ident = checkIdent(cssName, value);

                    checkValidity(cssName, getAllowed(), ident);
                } else if (value.getPropertyValueType() == PropertyValue.VALUE_TYPE_FUNCTION) {
                    FSFunction function = value.getFunction();
                    if (function.getName().equals("running")) {
                        List params = function.getParameters();
                        if (params.size() == 1) {
                            PropertyValue param = (PropertyValue)params.get(0);
                            if (param.getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT) {
                                throw new CSSParseException("The running function takes an identifier as a parameter", -1);
                            }
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSFunction

                    PropertyValue value = (PropertyValue)decl.getValue();
                    List values = value.getValues();
                    if (values.size() == 1) {
                        PropertyValue funcVal = (PropertyValue)values.get(0);
                        if (funcVal.getPropertyValueType() == PropertyValue.VALUE_TYPE_FUNCTION) {
                            FSFunction func = funcVal.getFunction();
                            if (BoxBuilder.isElementFunction(func)) {
                                BlockBox metadata = BoxBuilder.getRunningBlock(c, funcVal);
                                if (metadata != null) {
                                    _metadata = metadata.getElement();
                                }
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSFunction

        return value instanceof FunctionValue;
    }

    public String getRunningName() {
        FunctionValue value = (FunctionValue)valueByName(CSSName.POSITION);
        FSFunction function = value.getFunction();

        PropertyValue param = (PropertyValue)function.getParameters().get(0);

        return param.getStringValue();
    }
View Full Code Here

Examples of org.xhtmlrenderer.css.parser.FSFunction

        public boolean canHandle(LayoutContext c, FSFunction function) {
            if (c.isPrint() && function.getName().equals("target-counter")) {
                List parameters = function.getParameters();
                if (parameters.size() == 2 || parameters.size() == 3) {
                    FSFunction f = ((PropertyValue)parameters.get(0)).getFunction();
                    if (f == null ||
                            f.getParameters().size() != 1 ||
                            ((PropertyValue)f.getParameters().get(0)).getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT ||
                            ! ((PropertyValue)f.getParameters().get(0)).getStringValue().equals("href")) {
                        return false;
                    }

                    PropertyValue param = (PropertyValue)parameters.get(1);
                    if (param.getPrimitiveType() != CSSPrimitiveValue.CSS_IDENT ||
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.