Package com.volantis.mcs.protocols.gallery.attributes

Examples of com.volantis.mcs.protocols.gallery.attributes.SlideshowAttributes


        if(!isWidgetSupported(protocol)) {
            return;
        }               

        SlideshowAttributes slideshowAttributes = (SlideshowAttributes) attributes;

        isRendering = false;
       
        protocol.writeCloseDiv(slideshowDivAttributes);

        if (itemDisplayId == null) {
            scriptWriter.write("null");
        } else {
            scriptWriter.write(createJavaScriptString(itemDisplayId));

            addUsedWidgetId(itemDisplayId);
           
            itemDisplayId = null;
        }
       
       
        // Render reference to gallery items
        String itemsId = slideshowAttributes.getItems();
       
        if (itemsId == null) {
            itemsId = protocol.getMarinerPageContext().generateFCID("GALLERY_ITEMS");
        }
       
        scriptWriter.write(",items:" + createJavaScriptString(itemsId));
           
        addUsedWidgetId(itemsId);

        // Render the autoPlay option.
        // The default value for autoPlay option in JavaScript is true,
        // so there's no need to render anything if case the value of the
        // style property is 'yes'.
        if (slideshowAttributes.getStyles().getPropertyValues().getComputedValue(StylePropertyDetails.MCS_AUTO_PLAY) == StyleKeywords.NO) {
            scriptWriter.write(",autoPlay:false");
        }
       
        // Extract style values and render them into JavaScript
        StylesExtractor stylesExtractor = createStylesExtractor(protocol, slideshowAttributes.getStyles());
       
        scriptWriter.write(",order:" + createJavaScriptString(stylesExtractor.getItemsOrder()));
       
        int repetitions = stylesExtractor.getRepetitions();     
        scriptWriter.write(",repetitions:" + ((repetitions == Integer.MAX_VALUE)
View Full Code Here


public class SlideshowElement extends BaseGalleryElement   {
   
    public SlideshowElement(XDIMEContextInternal context){
        super(GalleryElements.SLIDESHOW, context);
       
        protocolAttributes = new SlideshowAttributes();
    }
View Full Code Here

        return super.callOpenOnProtocol(context, attributes);
    }
   
    // Javadoc inherited
    protected void initialiseElementSpecificAttributes(XDIMEContextInternal context, XDIMEAttributes attributes) throws XDIMEException {
        SlideshowAttributes galleryAttributes = (SlideshowAttributes) protocolAttributes;
       
        galleryAttributes.setItems(attributes.getValue("", "items"));
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.gallery.attributes.SlideshowAttributes

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.