Package com.volantis.styling.properties

Examples of com.volantis.styling.properties.StyleProperty


        // Javadoc unnecessary.
        public IterationAction next(PropertyValue propertyValue) {

            // The property being emulated.
            final StyleProperty property = propertyValue.getProperty();
            final String jsName = JavascriptToCSSStyleMapper.
                    getDefaultInstance().getJSForCSS(property.getName());

            // Add the hover property value as the mouse over value.
            final String hoverValue = propertyValue.getValue().getStandardCSS();
            appendStyleValue(mouseOverBuffer, jsName, hoverValue);
View Full Code Here


        all = 0;
        requiredForShorthand = 0;
        requiredForIndividual = 0;

        for (int i = 0; i < count; i++) {
            StyleProperty property = group[i];
            int bit = 1 << i;

            all |= bit;

            StyleValue styleValue = inputValues.getStyleValue(property);
View Full Code Here

    // Javadoc inherited.
    public int getIndividualCost(MutableStylePropertySet required) {
        int cost = 0;

        for (int index = 0; index < group.length; index++) {
            StyleProperty property = group[index];
            if (required.contains(property)) {
                // Calculate the cost of the property and it's concrete value.
                StyleValue value = inputValues.getStyleValue(property);
                value = getConcreteValue(index, value);
                cost += property.getName().length();
                cost += 1; // The ':'.
                cost += value.getStandardCost();
                if (isImportant(index)) {
                    cost += Priority.IMPORTANT.getStandardCost();
                }
View Full Code Here

    public void copyIndividualValues(
            MutableStyleProperties outputValues,
            MutableStylePropertySet required) {

        for (int index = 0; index < group.length; index++) {
            StyleProperty property = group[index];
            if (required.contains(property)) {
                copyValue(property, outputValues, index);
            }
        }
    }
View Full Code Here

     *
     * @param outputValues The properties to update.
     */
    public void updateProperties(MutableStyleProperties outputValues) {
        for (int index = 0; index < group.length; index++) {
            StyleProperty property = group[index];
            int bit = 1 << index;
            if ((requiredForIndividual & bit) != 0) {
                copyValue(property, outputValues, index);
            }
        }
View Full Code Here

    public void addRequired(
            MutableStylePropertySet requiredForIndividual,
            MutableStylePropertySet requiredForShorthand) {

        for (int index = 0; index < group.length; index++) {
            StyleProperty property = group[index];
            int bit = 1 << index;
            if ((this.requiredForIndividual & bit) != 0) {
                requiredForIndividual.add(property);
            }
            if ((this.requiredForShorthand & bit) != 0) {
View Full Code Here

        // If any of them are set to their initial value then ignore them.
        int count = group.length;
        StyleValue[] values = new StyleValue[count];
        for (int index = 0; index < group.length; index++) {
            StyleProperty property = group[index];
            if (isRequiredShorthandProperty(index)) {
                final StyleValue concreteValue = getConcreteValue(index,
                        inputValues.getStyleValue(property));
                values[index] = concreteValue;
            }
View Full Code Here

        // If any of them are set to their initial value then ignore them.
        int separatorCost = 0;
        for (int index = 0; index < group.length; index++) {
            // Only values that can not be treated as initial values affect the
            // cost of the shorthand.
            StyleProperty property = group[index];
            if (isRequiredShorthandProperty(index)) {
                StyleValue value = getConcreteValue(index,
                        inputValues.getStyleValue(property));
                if (value != null) {
                    cost += separatorCost;
View Full Code Here

    protected StyleValue getRequiredInitialValue(int index) {
        StyleValue result;

        // Then we definitely can't use null or it would upset the
        // styling, so we instead use the initial value of the property.
        final StyleProperty property = group[index];
        result = (StyleValue) INITIAL_VALUE_OVERRIDES.get(property);
        if (result == null) {
            result = property.getStandardDetails().getInitialValue();
            // property is required so it must not be null
            if (result == null) {
                throw new IllegalStateException(
                        "initialValue must not be null");
            }
View Full Code Here

            StyleValue systemFont = inputValues.getStyleValue(
                    StylePropertyDetails.MCS_SYSTEM_FONT);

            StyleValue[] values = new StyleValue[FontShorthandValue.PROPERTIES.length];
            for (int i = 0; i < FontShorthandValue.PROPERTIES.length; i++) {
                StyleProperty property = FontShorthandValue.PROPERTIES[i];
                StyleValue value = inputValues.getStyleValue(property);
                if (value != UnknownFontValue.INSTANCE && value != null) {
                    values[i] = value;
                }
            }
View Full Code Here

TOP

Related Classes of com.volantis.styling.properties.StyleProperty

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.