Package com.volantis.mcs.protocols.ticker.attributes

Examples of com.volantis.mcs.protocols.ticker.attributes.UpdateStatusAttributes


        }

        // Require script module
        require(WIDGET_TICKER, protocol, attributes);               

        UpdateStatusAttributes updateStatusAttributes =
                (UpdateStatusAttributes) attributes;

        // Open span element enclosing the widget.
        SpanAttributes spanAttributes = new SpanAttributes();

        spanAttributes.copy(attributes);

        protocol.writeOpenSpan(spanAttributes);

        // Render four elements for each status value.
        Element normalElement = renderStatusElement(protocol,
                updateStatusAttributes, StatefulPseudoClasses.MCS_NORMAL);
        Element busyElement = renderStatusElement(protocol,
                updateStatusAttributes, StatefulPseudoClasses.MCS_BUSY);
        Element failedElement = renderStatusElement(protocol,
                updateStatusAttributes, StatefulPseudoClasses.MCS_FAILED);
        Element suspendedElement = renderStatusElement(protocol,
                updateStatusAttributes, StatefulPseudoClasses.MCS_SUSPENDED);

        // Close span element enclosing the widget.
        protocol.writeCloseSpan(spanAttributes);

        // Prepare Javascript content.
        StringWriter scriptWriter = new StringWriter();

        // Finally, render the JavaScript part.
        scriptWriter.write("Ticker.createUpdateStatus({");
        scriptWriter.write("normalId:" +
                createJavaScriptString(normalElement.getAttributeValue("id")));
        scriptWriter.write(",busyId:" +
                createJavaScriptString(busyElement.getAttributeValue("id")));
        scriptWriter.write(",failedId:" +
                createJavaScriptString(failedElement.getAttributeValue("id")));
        scriptWriter.write(",suspendedId:" + createJavaScriptString(
                suspendedElement.getAttributeValue("id")));
        scriptWriter.write(",displayStyle:"
                + createJavaScriptString(updateStatusAttributes.getStyles().
                getPropertyValues().getComputedValue(
                StylePropertyDetails.DISPLAY).getStandardCSS()));
        scriptWriter.write("})");

        addUsedFeedPollerId(protocol);
View Full Code Here


     * @param context
     */
    public UpdateStatusElement(XDIMEContextInternal context) {
        super(TickerElements.UPDATE_STATUS, context);
       
        protocolAttributes = new UpdateStatusAttributes();       
   
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.ticker.attributes.UpdateStatusAttributes

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.