Package com.volantis.mcs.protocols.widgets.attributes

Examples of com.volantis.mcs.protocols.widgets.attributes.RefreshAttributes


public class RefreshElement extends WidgetElement {

    public RefreshElement(XDIMEContextInternal context) {
        super(WidgetElements.REFRESH, context);
        protocolAttributes = new RefreshAttributes();
    }
View Full Code Here


        DOMOutputBuffer currentBuffer = getCurrentBuffer(protocol);    
        closeDivElement(currentBuffer);
        String textToScript;
        String textRefreshAttr = "";
       
        RefreshAttributes refreshAttributes = ((ProgressAttributes)attributes).getRefreshAttributes();
        if(refreshAttributes != null) {
            // require AJAX script module
            require(WidgetScriptModules.BASE_AJAX, protocol, attributes);
           
            textRefreshAttr = "refreshURL: "+ createJavaScriptString(refreshAttributes.getSrc())+
            ", refreshInterval: "+ getIntegerPart(refreshAttributes.getInterval()) + ", ";
        }
        textToScript = new StringBuffer("Widget.register(")
            .append(createJavaScriptString(attributes.getId()))
            .append(",new Widget.ProgressBar(")
            .append(createJavaScriptString(attributes.getId())).append(", {")
View Full Code Here

        pushElement(parent);

        executeTest();

        CarouselAttributes parentAttrs = (CarouselAttributes)parent.getProtocolAttributes();
        RefreshAttributes refreshAttrs = parentAttrs.getRefreshAttributes();
        assertNotNull(refreshAttrs);
        assertEquals(refreshAttrs.getId(), getWidgetId());
    }
View Full Code Here

        currentBuffer.closeElement("ul");
        closeDivElement(currentBuffer)
        // close external div element
        closeDivElement(currentBuffer);
                   
        RefreshAttributes refreshAttributes = ((CarouselAttributes)attributes).getRefreshAttributes();
        String textRefreshAttr = "";
        if(refreshAttributes != null) {              
            textRefreshAttr = ", refreshURL: "+ createJavaScriptString(refreshAttributes.getSrc()) +
            ", refreshInterval: "+ refreshAttributes.getInterval();
        }
       
        StylesExtractor styles = createStylesExtractor(protocol, attributes.getStyles());
       
        StylesExtractor disappearStyles = createStylesExtractor(protocol, attributes.getStyles());
View Full Code Here

                    }
                }
            }           
        }
       
        RefreshAttributes refreshAttributes = ((TickerTapeAttributes) attributes)
                .getRefreshAttributes();
       
        // Read ticker-tape properties out of style attributes.
        StylesExtractor styles = createStylesExtractor(protocol, attributes.getStyles());
       
        // Prepare Javascript content.
        StringWriter scriptWriter = new StringWriter();
        scriptWriter.write(createJavaScriptWidgetRegistrationOpening(attributes.getId()));
       
        addCreatedWidgetId(attributes.getId());
       
        scriptWriter.write("new Widget.TickerTape(" + createJavaScriptString(attributes.getId()) + ", {");

        // Render scroll type: scroll, slide or alternating.
        scriptWriter.write("style:" + createJavaScriptString(styles.getMarqueeStyle()) + ",");
        scriptWriter.write("focusable:" + createJavaScriptString(styles.getFocusStyle()) + ",");

        // Render scroll attributes: direction, FPS & CPS.
        scriptWriter.write("scroll:{");
        scriptWriter.write("direction:" + createJavaScriptString(styles.getMarqueeDirection()) + ",");
        scriptWriter.write("framesPerSecond:" + styles.getFrameRate() + ",");
        scriptWriter.write("charsPerSecond:" + styles.getMarqueeSpeed());
        scriptWriter.write("}");   

        // Render refresh attributes: URL & interval.
        if (refreshAttributes != null) {
            scriptWriter.write(",refresh:{");
            scriptWriter.write("url:" + createJavaScriptString(refreshAttributes.getSrc()) + ",");
            scriptWriter.write("interval:" + createJavaScriptString(refreshAttributes.getInterval()));
            scriptWriter.write("}");
        }

        int repetitions = styles.getMarqueeRepetitions();
        scriptWriter.write(",repetitions:" + ((repetitions != Integer.MAX_VALUE) ?
View Full Code Here

                protocol, styles);
               
        String dateTimeFormat =
            getDateTimeFormat(stylesExtractor.getDateTimeFormat(),specialMarks);
       
        RefreshAttributes refreshAttributes =
            digitalClockAttributes.getRefreshAttributes();
       
        StringBuffer textRefreshAttr = new StringBuffer();
        if(refreshAttributes != null) {
            textRefreshAttr.append(", refreshURL: ")
            .append(createJavaScriptString(refreshAttributes.getSrc()))
            .append(", refreshInterval: "+ refreshAttributes.getInterval());
        }       
       
        StringBuffer textBuffer = new StringBuffer();
       
        textBuffer.append(createJavaScriptWidgetRegistrationOpening(digitalClockAttributes.getId()))
View Full Code Here

            require(WidgetScriptModules.BASE_BB_REFRESH, protocol, attributes);

            if(delimited) {
                buffer.append(",");
            }
            RefreshAttributes refreshAttrs = ((BlockAttributes)attributes).getRefreshAttributes();
            buffer.append("refresh: new Widget.BlockRefresh({src: '");
            buffer.append(refreshAttrs.getSrc() + "'");
           
            if(refreshAttrs.getInterval() != null) {
                buffer.append(", interval: '");
                buffer.append(refreshAttrs.getInterval() + "'");               
            }
            buffer.append("})");                       
            delimited = true;
        }
               
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.widgets.attributes.RefreshAttributes

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.