Package com.volantis.mcs.protocols

Examples of com.volantis.mcs.protocols.SlideAttributes


                }

                elements = cellConstraint.getConstrained(cells);
            }

            SlideAttributes attributes = factory.createSlideAttributes();
            String timeValues = (String) temporal.getAttribute(
                    TemporalFormatIterator.TEMPORAL_ITERATOR_CLOCK_VALUES);

            // If this is a space or (for backwards-compatibility) a comma
            // separated list of time values stick 'em into an array
            String timeValueArray[];
            String separator = null;

            if (timeValues.indexOf(',') > -1) {
                separator = ",";
            } else if (timeValues.indexOf(' ') > -1) {
                separator = " ";
            }

            if (separator != null) {
                StringTokenizer st = new StringTokenizer(timeValues,
                                                         separator);
                int index = 0;
                timeValueArray = new String[st.countTokens()];
                while (st.hasMoreTokens()) {
                    timeValueArray[index++] = st.nextToken();
                }
            } else {
                timeValueArray = new String[]{timeValues};
            }

            NDimensionalIndex childIndex = parentIndex.addDimension();

            // Get the module.
            LayoutModule module = context.getLayoutModule();

            // Retrieve the TemporalIterator's child and ensure that it
            // only has a single child.
            int numChildren = temporal.getNumChildren();
            if (numChildren != 1) {
                throw new RendererException(exceptionLocalizer.format(
                        "render-temporal-iterator-multiple-children"));
            }
            Format child = temporal.getChildAt(0);

            // Use the open/closeSlide method in the protocols to create
            // the slide. Visit each child and then close the slide. Do
            // this temporal.TEMPORAL_ITERATOR_CELL_COUNT times to generate
            // the slides
            for (int rowLoop = 0, index = 0; rowLoop < elements;
                 rowLoop++) {

                context.setCurrentFormatIndex(childIndex);
                attributes.setDuration(timeValueArray[index]);
                module.writeOpenSlide(attributes);

                FormatInstance childInstance = context.getFormatInstance(
                        child, childIndex);
                context.renderFormat(childInstance);
View Full Code Here


    /**
     * This method tests the method public void writeOpenSlide ( SlideAttributes )
     * for the com.volantis.mcs.protocols.VolantisProtocol class.
     */
    public void testWriteOpenSlide() throws Exception {
        final SlideAttributes attributes =
                (SlideAttributes) ProtocolIntegrationTestHelper.
                provideAttributes(SlideAttributes.class);

        final VolantisProtocol protocol = getProtocol();

View Full Code Here

        return new FormAttributes();
    }

    // Javadoc inherited.
    public SlideAttributes createSlideAttributes() {
        return new SlideAttributes();
    }
View Full Code Here

TOP

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

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.