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

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


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

        GalleryAttributes galleryAttributes = (GalleryAttributes) attributes;

        protocol.writeCloseDiv(galleryDivAttributes);

        // Render enclosed item-display ids.
        for (int index = 0; index < displayIds.size(); index++) {
            String displayId = (String) displayIds.get(index);
           
            if (index != 0)
                scriptWriter.write(",");
       
            scriptWriter.write(createJavaScriptString(displayId));

            addUsedWidgetId(displayId);
        }
       
        displayIds = null;
       
        scriptWriter.write("]");
       
        // Render reference to gallery items
        String itemsId = galleryAttributes.getItems();
       
        if (itemsId == null) {
            itemsId = protocol.getMarinerPageContext().generateFCID("GALLERY_ITEMS");
        }
       
        scriptWriter.write(",items:" + createJavaScriptString(itemsId));
           
        addUsedWidgetId(itemsId);
       
        if (galleryAttributes.getSlideshow() != null) {
            scriptWriter.write(",slideshow:" + createJavaScriptString(galleryAttributes.getSlideshow()));

            addUsedWidgetId(galleryAttributes.getSlideshow());
        }

        if (galleryAttributes.getSlideshowPopup() != null) {
            scriptWriter.write(",slideshowPopup:" + createJavaScriptString(galleryAttributes.getSlideshowPopup()));

            addUsedWidgetId(galleryAttributes.getSlideshowPopup());
        }
       
        // Extract style values and render them into JavaScript
        StylesExtractor stylesExtractor = createStylesExtractor(protocol, galleryAttributes.getStyles());
       
        double slideshowLaunchDelay = stylesExtractor.getSlideshowLaunchDelay();
       
        if (!Double.isInfinite(slideshowLaunchDelay)) {
          scriptWriter.write(",slideshowLaunchDelay:" + Double.toString(slideshowLaunchDelay));
View Full Code Here


                    GalleryElement.class);

    public GalleryElement(XDIMEContextInternal context){
        super(GalleryElements.GALLERY, context);
       
        protocolAttributes = new GalleryAttributes();
    }
View Full Code Here

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

TOP

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

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.