Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.AltTextAttributes


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

        final VolantisProtocol protocol = getProtocol();

        // Because alt text is now an object, provideAttributes will not
        // automatically initialize it
        attributes.setAltText(new LiteralTextAssetReference("altText"));

        MethodInvoker invoker = new MethodInvoker() {
            public void invoke() throws Exception {
                protocol.writeAltText(attributes);
            }
View Full Code Here


            TextAssetReference altText,
            BlockAttributes attributes,
            MarinerPageContext pageContext,
            Styles styles) throws PAPIException {

        AltTextAttributes altTextAttrs = new AltTextAttributes(attributes);
        altTextAttrs.setAltText(altText);
        altTextAttrs.setStyles(styles);

        try {
            VolantisProtocol protocol = pageContext.getProtocol();
            return protocol.writeAltText(altTextAttrs);
        } catch (ProtocolException e) {
View Full Code Here

                        // No image asset which matches could be found so use the
                        // alt text, if any.

                        // And then try and write out the alt or fallback text,
                        // if we can
                        AltTextAttributes altTextAttrs =
                                new AltTextAttributes(attributes);
                        altTextAttrs.setStyles(pattributes.getStyles());
                        altText = new FallbackComponentTextAssetReference(
                                assetResolver, selected.getPolicy(), altText);
                        altTextAttrs.setAltText(altText);

                        if (protocol.writeAltText(altTextAttrs)) {
                            return SKIP_ELEMENT_BODY;
                        }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.AltTextAttributes

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.