Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.ImageAttributes


                } else {
                    createTableCellElement(protocol, idCollector, true);
                    AnchorAttributes aAttributes = new AnchorAttributes();
                    aAttributes.setHref("javascript:void(0)");
                    protocol.writeOpenAnchor(aAttributes);
                    ImageAttributes iAttributes = new ImageAttributes();
                    iAttributes.setSrc("");
                    protocol.writeImage(iAttributes);
                    protocol.writeCloseAnchor(aAttributes);
                }
                closeTableDataCellElement(protocol);
            }
View Full Code Here


        for (int j = 0; j < 4 * MAIN_IMAGES_TABLE_SIZE; j++) {
            createTableCellElement(protocol, idCollector, true);
            AnchorAttributes aAttributes = new AnchorAttributes();
            aAttributes.setHref("javascript:void(0)");
            protocol.writeOpenAnchor(aAttributes);
            ImageAttributes iAttributes = new ImageAttributes();
            iAttributes.setSrc("");
            protocol.writeImage(iAttributes);
            protocol.writeCloseAnchor(aAttributes);
            closeTableDataCellElement(protocol);
        }
        closeTableRowElement(protocol);
View Full Code Here

        MarinerRequestContext requestContext =
        context.getInitialRequestContext();
       
       
        ImageAttributes imageAttributes = attributes.getImageAttributes();
        if(imageAttributes == null){
            // widget is not supported therefore image attributes were not set.
            written = false;
        } else {
            String url = imageAttributes.getSrc();
            // transcode the image.
            try {
                url = ContextInternals.constructImageURL(
                           requestContext, url);
            } catch (RepositoryException e) {
                throw new XDIMEException(e);
            }
     
            createFakeAssetURLMapEntry(requestContext, url);
                   
            // Rewrite the URL with PageURLRewriter.
            url = getPageContext(context)
                    .getAssetResolver()
                    .rewriteURLWithPageURLRewriter(url, PageURLType.IMAGE);
                   
            imageAttributes.setSrc(url);
            written = true;
        }
        return written;
    }
View Full Code Here

            return;
        }

        url = resolver.rewriteURLWithPageURLRewriter(url, PageURLType.IMAGE);

        ImageAttributes imageAttributes = new ImageAttributes();

        BaseLocation location = resolver.getBaseLocation(selectedVariant);
        imageAttributes.setLocalSrc(location == BaseLocation.DEVICE);

        Variant variant = selectedVariant.getVariant();
        ImageMetaData image = (ImageMetaData) variant.getMetaData();
        // Make a note of whether this image is a convertible
        // image asset
        if (image.getConversionMode() == ImageConversionMode.ALWAYS_CONVERT) {
            imageAttributes.setConvertibleImageAsset(true);
        } else {
            imageAttributes.setConvertibleImageAsset(false);
        }

        imageAttributes.setHeight(StringConvertor.valueOf(image.getHeight()));
        imageAttributes.setWidth(StringConvertor.valueOf(image.getWidth()));
        imageAttributes.setSrc(url);
        imageAttributes.setAltText(alt);
        protocol.writeImage(imageAttributes);
    }
View Full Code Here

            // Extract necessary info from the image reference
            String reference = image.getURL();

            if (reference != null) {
                // There is a url to use
                ImageAttributes attributes = new ImageAttributes();
                attributes.setSrc(reference);
                imageOutput.outputImage(dom, attributes);
            } else {
                logger.warn("render-reference-error", new Object[]{
                        ImageAssetReference.class.toString(),
                        image});
View Full Code Here

TOP

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

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.