Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StyleString


        formatterSelectorMock.expects
                .selectFormatter(ListStyleTypeKeywords.LOWER_ALPHA, 6)
                .returns(formatterMock);

        StyleString result =
            StyleValueFactory.getDefaultInstance().getString(null, "blah");
        formatterMock.expects.formatAsStyleValue(
                ListStyleTypeKeywords.LOWER_ALPHA, 6)
                .returns(result);
View Full Code Here


        functionArgs.add(ListStyleTypeKeywords.LOWER_ALPHA);

        StyleValue functionValue =
                function.evaluate(evaluationContextMock,
                        "counter", functionArgs);
        StyleString expected = STYLE_VALUE_FACTORY.getString(null, "0.A.B.C");
        assertEquals(expected, functionValue);
    }
View Full Code Here

     * @param counterValue   The input value.
     * @param expectedResult The expected result.
     */
    protected void doTestFormatter(
            final int counterValue, final String expectedResult) {
        StyleString value = (StyleString) formatter.formatAsStyleValue(null,
                counterValue);
        assertEquals(expectedResult, value.getString());
    }
View Full Code Here

     * @return The value as a string.
     */
    protected String getArgumentAsString(
            String functionName, List arguments, int index) {
        StyleValue value = (StyleValue) arguments.get(index);
        StyleString string = null;
        if (value instanceof StyleString) {
            string = (StyleString) value;
        } else {
            unexpectedType(functionName, index, StyleValueType.STRING,
                    value);
        }

        return string.getString();
    }
View Full Code Here

            if ("normal".equals(styleKeyword.getName())) {
                format = new String("%D %d %m %Y %h:%i:%s");
            }
        } else if (styleValue != null) {
            if (styleValue instanceof StyleString) {
                StyleString styleString = (StyleString)styleValue;
                format = styleString.getString();
            }
        }
        return format;
    }
View Full Code Here

       
        StyleValue styleValue = getStyleValue(property);

        if (styleValue != null) {
            if (styleValue instanceof StyleString) {
                StyleString styleString = (StyleString) styleValue;

                string = styleString.getString();
            }
        }

        return string;
    }
View Full Code Here

        DeviceLayoutContext layoutContext = null;

        // Process an mcs-layout style first.
        if (layout instanceof StyleString) {
            StyleString layoutString = (StyleString) layout;

            String layoutName = layoutString.getString();

            // only create new layout context if the specified layout is not
            // the current one
            if (!pageContext.getDeviceLayout().getName().equals(layoutName)) {
                // Push the newly specified layout onto the stack in the
View Full Code Here

     */
    private String getSpecifiedContainerName(StyleValue specifiedContainer) {
        String containerName = null;

        if (specifiedContainer instanceof StyleString) {
            StyleString styleString = (StyleString) specifiedContainer;
            containerName = styleString.getString();
        }

        return containerName;
    }
View Full Code Here

    // Javadoc inherited.
    public StyleValue evaluate(
            EvaluationContext context, String name, List arguments) {

        StyleString string = (StyleString) arguments.get(0);
        String containerName = string.getString();

        // Create an array of the indeces.
        int indeces[] = new int[arguments.size() - 1];
        for (int i = 0; i < indeces.length; i++) {
            indeces[i] = getArgumentAsInt(name, arguments, i + 1);
View Full Code Here

        String format;
        if (value == StyleKeywords.NONE) {
            // No validation.
            format = null;
        } else if (value instanceof StyleString) {
            StyleString string = (StyleString) value;
            format = string.getString();
        } else if (value instanceof StyleComponentURI) {
            StyleComponentURI uri = (StyleComponentURI) value;
            PolicyReference reference = assetResolver.evaluateExpression(
                    uri.getExpression());
            format = assetResolver.resolveText(reference, requiredEncodings);
View Full Code Here

TOP

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

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.