Examples of ParagraphAttributes


Examples of com.volantis.mcs.papi.ParagraphAttributes

        DOMOutputBuffer buffer = new DOMOutputBuffer();
        buffer.initialise();
        context.setCurrentOutputBuffer(buffer);

        MCSAttributes attributes = new AltTextAttributes(
            new ParagraphAttributes());
        String altText = "some alt text";
        protocol.renderAltText(altText, attributes);

        checkRenderAltText(altText, buffer);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.ParagraphAttributes

        TestMarinerPageContext testContext = new TestMarinerPageContext();
        testContext.pushRequestContext(requestContext);
        ContextInternals.setMarinerPageContext(requestContext, testContext);
        protocol.setMarinerPageContext(testContext);

        ParagraphAttributes paraAttrs = new ParagraphAttributes();
        paraAttrs.setStyles(StylesBuilder.getCompleteStyles(
                "white-space: nowrap"));

        // Create a style with a nowrap whitespace. This should mean that the
        // protocol creates a paragraph with mode="nowrap".

        protocol.openParagraph(buffer, paraAttrs);
        Element element = buffer.getCurrentElement();
        String modeValue = element.getAttributeValue("mode");
        // There should be mode="nowrap" attribute.
        assertEquals("Unexpected mode value on p", "nowrap", modeValue);

        // Create a style with a pre whitespace. This should mean that the
        // protocol creates a paragraph with no mode attribute.
        paraAttrs.setStyles(StylesBuilder.getCompleteStyles(
                "white-space: pre"));

        protocol.openParagraph(buffer, paraAttrs);
        element = buffer.getCurrentElement();
        modeValue = element.getAttributeValue("mode");
View Full Code Here

Examples of com.volantis.mcs.protocols.ParagraphAttributes

        testContext.pushRequestContext(requestContext);
        ContextInternals.setMarinerPageContext(requestContext, testContext);
        protocol.setMarinerPageContext(testContext);

        // The default paragraph attributes has no class attribute.
        ParagraphAttributes attributes = new ParagraphAttributes();
        attributes.setStyles(StylesBuilder.getInitialValueStyles());

        protocol.openParagraph(buffer, attributes);
        Element element = buffer.getCurrentElement();
        String modeValue = element.getAttributeValue("mode");
        // There should be no mode attribute because there is no style.
View Full Code Here

Examples of com.volantis.mcs.protocols.ParagraphAttributes

        LocalizationFactory.createExceptionLocalizer(ParagraphElement.class);

    public ParagraphElement(XDIMEContextInternal context) {
        super(XHTML2Elements.P, context);

        protocolAttributes = new ParagraphAttributes();
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.ParagraphAttributes

     * This method tests the method public void writeOpenParagraph (
     * ParagraphAttributes ) for the
     * com.volantis.mcs.protocols.VolantisProtocol class.
     */
    public void testWriteOpenParagraph() throws Exception {
        final ParagraphAttributes attributes =
                (ParagraphAttributes) ProtocolIntegrationTestHelper.
                provideAttributes(ParagraphAttributes.class);

        final VolantisProtocol protocol = getProtocol();

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.