Package com.volantis.mcs.layouts

Examples of com.volantis.mcs.layouts.Format


            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
View Full Code Here


        // Get the protocol specific output buffer factory object.
        outputBufferFactory = protocol.getOutputBufferFactory();

        // Recurse through the entire layout creating the required context objects.
        // This is only required for those formats which are accessible via PAPI.
        Format root = deviceLayout.getRootFormat();
        if (root != null) {
            try {
                root.visit(formatInstanceCollector, this);
            } catch (FormatVisitorException e) {
                // We don't expect any exceptions, but just in case...
                throw new ExtendedRuntimeException(
                        exceptionLocalizer.format("unexpected-exception"),
                        e);
View Full Code Here

     * @param name      the name of the format to retrieve
     * @param namespace the namespace of format to retreive
     * @return the format.
     */
    public Format getFormat(String name, FormatNamespace namespace) {
        Format format = null;
        // Get the format scope.
        FormatScope formatScope = null;
        // Attempt to get it from the fragment first
        final Fragment currentFragment = getCurrentFragment();
        if (currentFragment != null) {
View Full Code Here

     * @return int the number of dimensions that this format has
     */
    private static int getFormatDimensions(String stem,
                                         FormatNamespace namespace,
                                         MarinerPageContext pageContext) {
        Format format = pageContext.getFormat(stem, namespace);

        if (format == null) {
            // Format does not exist so it can't have any dimensions.
            return -1;
        }
       
        return format.getDimensions();       
    }
View Full Code Here

    }

    public void renderFormat(FormatInstance instance)
            throws RendererException {

        Format format = instance.getFormat();
        FormatRenderer renderer =
                formatRendererSelector.selectFormatRenderer(format);
        renderer.render(this, instance);
    }
View Full Code Here

                if (cachingDirectives != null) {
                    cachingDirectives.disable();
                }

                FormFragment fragment = (FormFragment)instance.getFormat();
                Format child = fragment.getChildAt(0);

                // If there is no child then there is nothing to write, not
                // even a link.
                if (child == null) {
                    return;
View Full Code Here

    protected boolean isEmptyImpl() {

        Fragment currentFragment = context.getCurrentFragment();
        Fragment fragment = (Fragment) format;

        Format child = fragment.getChildAt(0);

        if (child != null) {
            if (currentFragment == null || fragment == currentFragment) {
                return context.isFormatEmpty(child);
            } else {
View Full Code Here

        }

        boolean empty = true;

        for (int i = 0; empty && i < children; i++) {
            Format child = format.getChildAt(i);
            if (child != null) {
                ContentFinderVisitor contentFinderVisitor =
                        new ContentFinderVisitor();
                try {
                    // Visit the child format searching for content.
                    // The visitation will return true if content is found
                   empty = !child.visit(contentFinderVisitor, null);
                } catch (FormatVisitorException e) {
                    // We don't expect any exceptions, but just in case...
                    throw new RuntimeException(
                            exceptionLocalizer.format("unexpected-exception"),
                            e);
View Full Code Here

        NDimensionalIndex childIndex =
                formatInstance.getIndex().addDimension();

        // Retrieve the (must be) single SpatialIterator's child
        int numChildren = spatial.getNumChildren();
        final Format child = spatial.getChildAt(0);
        if (numChildren != 1) {
            throw new IllegalStateException(exceptionLocalizer.format(
                    "render-spatial-iterator-multiple-children"));
        }
View Full Code Here

        dom.addElement("root-layout");

        // Search down the layout heirarchy, looking for Panes, and
        // generate a <region> tag for each one.
        visitor = new HeadFormatVisitor();
        Format rootFormat = getMarinerPageContext().getDeviceLayout().
                getRootFormat();
        try {
            rootFormat.visit(visitor, dom);
        } catch (FormatVisitorException e) {           
            throw new ProtocolException(
                        exceptionLocalizer.format("error-rendering-regions"),
                        e);
        }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.layouts.Format

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.