Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StyleInteger


        StyleValue cast = CASTER.cast(value, StyleValueType.INTEGER);
        if (cast == null) {
            unexpectedType(functionName, index, StyleValueType.INTEGER, value);
        }

        StyleInteger styleInteger = (StyleInteger) cast;
        return styleInteger.getInteger();
    }
View Full Code Here


            String name = styleIdentifier.getName();
            Integer integer = null;

            StyleValue second = value.getSecond();
            if (second instanceof StyleInteger) {
                StyleInteger styleInteger = (StyleInteger) second;
                integer = new Integer(styleInteger.getInteger());
            }

            // Send them off to the iteratee
            iteratee.next(name, integer);
        }
View Full Code Here

     * a {@link StyleInteger}.</p>
     */
    public void testStyleInteger()
            throws IOException, SAXException {

        StyleInteger integer = STYLE_VALUE_FACTORY.getInteger(null, 6);
        StyleList list = STYLE_VALUE_FACTORY.getList(Arrays.asList(
            new StyleValue[]{integer}));

        final String input = "<root/>";
        final String expected = "<root>6</root>";
View Full Code Here

                if ("infinite".equals(styleKeyword.getName())) {
                    repetitions = Integer.MAX_VALUE;
                }
            } else if (styleValue instanceof StyleInteger) {
                StyleInteger styleInteger = (StyleInteger) styleValue;

                repetitions = styleInteger.getInteger();
            }
        }

        return repetitions;
    }
View Full Code Here

                if ("infinite".equals(styleKeyword.getName())) {
                    repetitions = Integer.MAX_VALUE;
                }
            } else if (styleValue instanceof StyleInteger) {
                StyleInteger styleInteger = (StyleInteger) styleValue;

                repetitions = styleInteger.getInteger();
            }
        }

        return repetitions;
    }
View Full Code Here

                if ("infinite".equals(styleKeyword.getName())) {
                    limits = Integer.MAX_VALUE;
                }
            } else if (styleValue instanceof StyleInteger) {
                StyleInteger styleInteger = (StyleInteger) styleValue;

                limits = styleInteger.getInteger();
            }
        }

        return limits;
    }
View Full Code Here

        Styles styles = attributes.getStyles();
        PropertyValues propertyValues = styles.getPropertyValues();
        StyleValue styleValue = propertyValues.getComputedValue(
                StylePropertyDetails.MCS_ROWS);

        StyleInteger rowsValue = (StyleInteger) styleValue;
        int rows = rowsValue.getInteger();
        if (rows > 1) {
            element.setAttribute("format", String.valueOf(rows));
        } else {
            super.addTextInputValidation(element, attributes);
        }
View Full Code Here

        StyleKeyword styleValuePosition = PositionKeywords.ABSOLUTE;
        properties.setComputedValue(
                StylePropertyDetails.POSITION, styleValuePosition);

        StyleInteger styleTopInteger =
                styleValueFactory.getInteger(null, 50);
        properties.setComputedValue(StylePropertyDetails.TOP, styleTopInteger);

        StyleInteger styleLeftInteger =
                styleValueFactory.getInteger(null, 25);
        properties.setComputedValue(
                StylePropertyDetails.LEFT, styleLeftInteger);

        Element element = domFactory.createElement();
View Full Code Here

        // Get stylistic information.
        Styles styles = attributes.getStyles();
        PropertyValues propertyValues = styles.getPropertyValues();

        StyleInteger columnsValue = (StyleInteger)
                propertyValues.getComputedValue(StylePropertyDetails.MCS_COLUMNS);
        element.setAttribute("size", columnsValue.getStandardCSS());

        addTextInputValidation(element, attributes);

        if ((value = getInitialValue(attributes)) != null) {
            element.setAttribute("value", value);
View Full Code Here

     * results in the initial value being used.
     */
    public void testRenderNegativeRepetition() {
        MarqueeAttributeValueRenderer renderer =
                new MarqueeAttributeValueRenderer(false);
        final StyleInteger integer =
            StyleValueFactory.getDefaultInstance().getInteger(null, -16);
        final String renderedValue = renderer.render(integer);
        assertEquals("1", renderedValue);
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.themes.StyleInteger

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.