Package com.volantis.mcs.layouts

Examples of com.volantis.mcs.layouts.Fragment


            // device layout and store it in the context. If the fragment
            // was set but could not be found then throw an exception.

        }

        Fragment fragment = null;
        if (fragmentName != null) {
            fragment =
                    (Fragment) getDeviceLayout().retrieveFormat(fragmentName,
                                                                FormatType.FRAGMENT);
            if (fragment == null) {
View Full Code Here


                final List fragments =
                        deviceLayout.getEnclosingFragments(containerName);
                for (Iterator iter = fragments.iterator(); iter.hasNext();) {
                    final LayoutContentActivator.ContainerPosition position =
                            (LayoutContentActivator.ContainerPosition) iter.next();
                    final Fragment fragment = position.getFragment();

                    // get the associated fragment instance
                    final int dimensions = fragment.getDimensions();
                    final NDimensionalIndex index;
                    if (dimensions > 0) {
                        index = new NDimensionalIndex(new int[dimensions]);
                    } else {
                        index = NDimensionalIndex.ZERO_DIMENSIONS;
View Full Code Here

        if (!foundPanes) {
            foundPanes = true;
            VDXMLSpecialPaneVisitor visitor = new VDXMLSpecialPaneVisitor();

            try {
                Fragment currentFragment = context.getCurrentFragment();

                if (currentFragment != null) {
                    // Check the children of this fragment
                    currentFragment.visitChildren(visitor, null);
                } else {
                    // This is not a fragmented layout so use the layout root
                    RuntimeDeviceLayout layout = context.getDeviceLayout();
                    layout.getRootFormat().visit(visitor, null);
                }
View Full Code Here

            module.beginNestedInclusion();
        }

        module.writeOpenLayout(attributes);

        Fragment fragment = formatRendererContext.getCurrentFragment();
        if (fragment == null) {
            if (logger.isDebugEnabled()) {
                String name =
                        deviceLayout != null ? deviceLayout.getName():null;
                logger.debug("Writing out the Layout named "
                             + name + " to the page");

                // Write the format tree

            }
            Format root = deviceLayout.getRootFormat();
            if (root != null) {
                FormatInstance rootInstance =
                        formatRendererContext.getFormatInstance(
                                root, index);
                formatRendererContext.renderFormat(rootInstance);
            } else {
                if (logger.isDebugEnabled()) {
                    logger.debug("Empty layout");
                }
            }

        } else {
            if (logger.isDebugEnabled()) {
                logger.debug("Writing out the fragment named "
                             + fragment.getName() + " to the page");
            }
            // Write out the fragment and the fragment link list which contains
            // links to the fragment's parent and peer fragments.
            if (!module.getSupportsFragmentLinkListTargetting()) {
                // Write out parent/peer fragment link list *after* the fragment.
View Full Code Here

     */
    private void writeFragmentLinkList(Fragment fragment,
                                       FormatRendererContext context)
            throws IOException, RendererException {

        Fragment enclosingFragment = fragment.getEnclosingFragment();
        if (logger.isDebugEnabled()) {
            logger.debug("Fragment is " + fragment);
            logger.debug("Enclosing fragment is " + enclosingFragment);
        }

View Full Code Here

                if (logger.isDebugEnabled()) {
                    logger.debug("Found peer " + peer);
                }
                if ((peer != null)
                        && peer.getFormatType().equals(FormatType.FRAGMENT)) {
                    Fragment peerFragment = (Fragment) peer;
                    // Dont write to ourselves
                    if (!peerFragment.getName().equals(fragment.getName())) {
                        if (logger.isDebugEnabled()) {
                            logger.debug("Adding link to peer fragment"
                                         + peerFragment.getName());
                        }
                        fragmentLinkWriter.writeFragmentLink(
                                context, fragment, peerFragment, true, false);
                    }
                }
View Full Code Here

        final Map fragmentToCounter = new HashMap();
        FormatVisitorAdapter visitor = new FormatVisitorAdapter() {
            public boolean visitFormat(final Format format, final Object object) {
                if (format instanceof Pane || format instanceof Region) {
                    final Fragment fragment = format.getEnclosingFragment();
                    if (fragment != null) {
                        final String containerName = format.getName();

                        Counter counter =
                            (Counter) fragmentToCounter.get(fragment);
View Full Code Here

TOP

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

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.