Package org.itsnat.impl.core.css.lex

Examples of org.itsnat.impl.core.css.lex.SourceCode


    public void setFloatValue(short unitType, float floatValue) throws DOMException
    {
        String suffix = floatUnitToString(unitType);
        String cssText = Float.toString(floatValue) + suffix;
        setCssTextSourceCode(new SourceCode(cssText),false);

        this.primitiveType = unitType;
        this.floatValue = floatValue;
    }
View Full Code Here


        {
            // A�adimos los literales (es obligatorio que est�n)
            stringValue = '"' + stringValue + '"';
        }

        setCssTextSourceCode(new SourceCode(stringValue),false);
        this.primitiveType = stringType;
    }
View Full Code Here

        this.cssText = cssText;

        propertyList.clear();
        propertyMap.clear();

        SourceCode cssTextSource = SourceCode.newSourceCode(cssText);
        SourceCode[] cssTextSourceProps = cssTextSource.split(SemiColon.getSingleton());

        for(int i = 0; i < cssTextSourceProps.length; i++)
        {
            SourceCode cssTextSourceProp = cssTextSourceProps[i];
            addCSSProperty(new CSSPropertyImpl(cssTextSourceProp,this),false);
        }
    }
View Full Code Here

        if (pairNameValue.length < 2)
            throw new DOMException(DOMException.INVALID_ACCESS_ERR,"Missing : or missing name-value, code: " + cssTextProp.toString());
        else if (pairNameValue.length > 2)
            throw new DOMException(DOMException.INVALID_ACCESS_ERR,"CSS: unexpected \":\" , code: " + cssTextProp.toString());

        SourceCode srcPropName = pairNameValue[0];
        srcPropName = srcPropName.trim();
        if (srcPropName.tokenCount() > 1)
            throw new DOMException(DOMException.INVALID_ACCESS_ERR,"CSS: syntax error , code: " + srcPropName.toString());
        if (!(srcPropName.getToken(0) instanceof Identifier))
            throw new DOMException(DOMException.INVALID_ACCESS_ERR,"CSS: expected an identifier: " + srcPropName.toString());

        String propertyName = srcPropName.toString();
        propertyName = propertyName.toLowerCase();

        this.propertyName = propertyName;
        this.cssTextValue = pairNameValue[1];
        this.parent = parent;
View Full Code Here

    {
        propertyName = propertyName.trim();
        propertyName = propertyName.toLowerCase();

        this.propertyName = propertyName;
        this.cssTextValue = new SourceCode(cssText);
        this.parent = parent;
    }
View Full Code Here

        this.parent = parent;
    }

    public String getCssText(boolean updateIfNeeded)
    {
        SourceCode sourceCode = getCssTextSourceCode(updateIfNeeded);
        return sourceCode.toString();
    }
View Full Code Here

        return sourceCode.toString();
    }

    public void setCssText(String value,boolean updateParent)
    {
        setCssTextSourceCode(new SourceCode(value),updateParent);
    }
View Full Code Here

    public void rebuild()
    {
        CSSPropertyImpl property = parent.getPropertyObject(propertyName);
        if (property != this) // Ha cambiado
        {
            SourceCode cssText = property.getCssTextSourceCode(false);
            rebuild(cssText);
        }
    }
View Full Code Here

        String rightValue = right.getCssTextSourceCode(false).toString();
        String bottomValue = bottom.getCssTextSourceCode(false).toString();
        String leftValue = left.getCssTextSourceCode(false).toString();

        String cssTextRect = "rect(" + topValue + "," + rightValue + "," + bottomValue + "," + leftValue + ")";
        SourceCode cssTextRectCode = new SourceCode(cssTextRect);
        parent.setCssTextSourceCode(cssTextRectCode,true);
    }
View Full Code Here

    public void notifyToElementChangedCSSText(SourceCode cssTextCode, Object requester)
    {
        // Una de las partes se ha actualizado (da igual cual sea), hay que notificar el cambio
        // de toda la estructura RGB.
        String cssTextRGB = "rgb(" + red.getCssTextSourceCode(false) + "," + green.getCssTextSourceCode(false) + "," + blue.getCssTextSourceCode(false) + ")";
        SourceCode cssTextRGBCode = new SourceCode(cssTextRGB);
        parent.setCssTextSourceCode(cssTextRGBCode,true);
    }
View Full Code Here

TOP

Related Classes of org.itsnat.impl.core.css.lex.SourceCode

Copyright © 2018 www.massapicom. 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.