Package com.volantis.mcs.protocols.separator

Examples of com.volantis.mcs.protocols.separator.SeparatorManager


                = UseDeferredSeparatorArbitrator.INSTANCE;

        SeparatorArbitrator orientationArbitrator
                = HTMLMenuOrientationSeparatorArbitrator.INSTANCE;

        SeparatorManager orientationManager = new DefaultSeparatorManager(
                outputBuffer, orientationArbitrator);

        return new MenuSeparatorManager(outputBuffer,
                                        groupArbitrator,
                                        orientationSeparator,
View Full Code Here


        return new OutputBufferMock("outputBuffer", sharedExpectations);
    }

    protected SeparatorManager createSeparatorManager(SeparatorArbitrator arbitrator) {
        OutputBuffer buffer = createOutputBuffer();
        SeparatorManager manager = new DefaultSeparatorManager(buffer, arbitrator);
        return manager;
    }
View Full Code Here

            // Get the SeparatorManager to use to render the separators.
            MenuBuffer menuBuffer = bufferLocator.getMenuBuffer(group);

            // This check is necessary in case the menuBuffer does not exist
            if (menuBuffer != null) {
                SeparatorManager separatorManager =
                        menuBuffer.getSeparatorManager();

                // Render the separator before.
                final SeparatorRenderer before =
                        separatorRendererSelector.selectMenuItemGroupSeparator(
                                group, true);
                if (before != null) {
                    separatorManager.queueSeparator(before);
                }

                // We always render the items in the menu group
                renderChildren(group);

                // Render the separator after.
                final SeparatorRenderer after =
                        separatorRendererSelector.selectMenuItemGroupSeparator(
                                group, false);
                if (after != null) {
                    separatorManager.queueSeparator(after);
                }
            }
        }
View Full Code Here

            // Render the menu item into the temporary buffer.
            MenuItemRenderedContent componentType
                    = renderer.render(temporaryBuffer, item);

            // Get the SeparatorManager from the MenuBuffer.
            SeparatorManager separatorManager
                    = menuBuffer.getSeparatorManager();

            // Notify the manager of the componentType of content that we are
            // about to write to its managed OutputBuffer.
            separatorManager.beforeContent(componentType);

            // Get the OutputBuffer.
            OutputBuffer outputBuffer = separatorManager.getOutputBuffer();

            // Append the contents of temporary OutputBuffer to the managed one.
            outputBuffer.transferContentsFrom(temporaryBuffer);
        }
    }
View Full Code Here

                "separator", sharedExpectations);

        SeparatorManagerMock mockManager = new SeparatorManagerMock(
                "manager", sharedExpectations);

        SeparatorManager manager = new MenuSeparatorManager(
                buffer, arbitrator, mockSeparator, mockManager);

        // The underlying mock manager can be called any number of times.
        mockManager.expects.queueSeparator(mockSeparator).any();
        mockManager.expects.beforeContent(mockSeparatedContent1).any();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.separator.SeparatorManager

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.