Package com.volantis.mcs.protocols.layouts

Examples of com.volantis.mcs.protocols.layouts.FragmentInstance


        Iterator i = fragmentInstances.entrySet().iterator();

        while (i.hasNext()) {
            Map.Entry entry = (Map.Entry) i.next();
            FragmentInstance fi = (FragmentInstance) (entry.getValue());
            fragmentsList.add(PAPIInternals.createFragment(fi));
        }

        fragments = Collections.unmodifiableList(fragmentsList);
View Full Code Here


        if (fragmentInstances == null) {
            return null;
        }

        FragmentInstance fi = (FragmentInstance) (fragmentInstances.get(name));

        if (fi != null) {
            fragment = PAPIInternals.createFragment(fi);
        }
View Full Code Here

        // Javadoc inherited from super class.
        public boolean visit(Fragment format, Object object)
                throws FormatVisitorException {

            FormatInstance formatInstance = new FragmentInstance(index);
            initialiseFormatInstance(formatInstance, format);
            // Only visit the topmost format.
            return true;
        }
View Full Code Here

        fragmentMock = LayoutTestHelper.createFragmentMock(
            "fragmentMock", expectations, canvasLayoutMock);
        final DeviceLayoutContextMock deviceLayoutContextMock =
            new DeviceLayoutContextMock("deviceLayoutContextMock", expectations);
        fragmentInstance =
            new FragmentInstance(NDimensionalIndex.ZERO_DIMENSIONS);
        final RuntimeDeviceLayoutMock runtimeDeviceLayoutMock =
            new RuntimeDeviceLayoutMock("runtimeDeviceLayoutMock", expectations);

        pageContextMock.expects.getDeviceLayoutContext().
            returns(deviceLayoutContextMock).any();
View Full Code Here

     */
    OutputBuffer getLinkBuffer(final Fragment fragment,
                               final boolean toEnclosing) {
        String linkText = null;
        OutputBuffer linkBuffer = null;
        FragmentInstance fragmentContext = (FragmentInstance) pageContext.
            getDeviceLayoutContext().getCurrentFormatInstance(fragment);

        // Check whether to use linkText or backLinkText.
        if (null != fragmentContext) {
            if (toEnclosing) {
                linkBuffer = fragmentContext.getLinkFromBuffer();
                if (linkBuffer == null) {
                    linkText = fragmentContext.getLinkFromText();
                }

                // To maintain backwards compabillity get linkToText
                // if not back link text is specified.
                if ((linkBuffer == null || linkBuffer.isEmpty()) &&
                     (linkText == null || linkText.length() == 0)) {
                    linkBuffer = fragmentContext.getLinkToBuffer();
                    if (linkBuffer == null) {
                        linkText = fragmentContext.getLinkToText();
                    }
                }
            } else {
                linkBuffer = fragmentContext.getLinkToBuffer();
                if (linkBuffer == null) {
                    linkText = fragmentContext.getLinkToText();
                }
            }
        }

        // Extract project to resolve policy expressions against.
View Full Code Here

                    if (dimensions > 0) {
                        index = new NDimensionalIndex(new int[dimensions]);
                    } else {
                        index = NDimensionalIndex.ZERO_DIMENSIONS;
                    }
                    final FragmentInstance fragmentInstance =
                            (FragmentInstance)
                            pageContext.getFormatInstance(fragment, index);

                    // set the linkTo/linkFrom buffer
                    final int containerIndex = position.getIndex();
                    if (linkToLabel != null) {
                        fragmentInstance.setLinkToBuffer(linkToLabel,
                                containerIndex);
                    }
                    if (linkFromLabel != null) {
                        fragmentInstance.setLinkFromBuffer(linkFromLabel,
                                containerIndex);
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.layouts.FragmentInstance

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.