Examples of OutputBuffer


Examples of com.volantis.mcs.protocols.OutputBuffer

    protected OutputBuffer createOutputBuffer() {
        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

Examples of com.volantis.mcs.protocols.OutputBuffer

    // Javadoc inherited.
    protected void writeMenuTextToBuffer(OutputBuffer output, MenuItem item) {

        // Extract the text from the menu item.
        OutputBuffer text = item.getLabel().getText().getText();

        // Write it into the output buffer.
        output.transferContentsFrom(text);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.OutputBuffer

        // Get a visitor for rendering the object.
        RendererMenuModelVisitor rendererVisitor = new RendererVisitor();

        // The output buffer for menu markup. This will be null if the
        // menu should not have any markup rendered for it
        OutputBuffer buffer = null;

        // Only render the mender if we have a renderer i.e. one of
        // MCS_MENU_TEXT_STYLE or MCS_MENU_IMAGE_STYLE is not "none".
        if (menuItemRenderer != null) {
            // If the menu is not using pane iteration, then it should be
View Full Code Here

Examples of com.volantis.mcs.protocols.OutputBuffer

                // as it is outside the markup of it's parent menu.
                MenuBuffer menuBuffer = bufferLocator.getMenuBuffer(item);

                // This check is necessary in case the menuBuffer does not exist
                if (menuBuffer != null) {
                    OutputBuffer buffer = menuBuffer.getOutputBuffer();
                    menuBracketingRenderer.open(buffer, item.getMenu());
                    menuItemRenderer.render(bufferLocator, item);
                    menuBracketingRenderer.close(buffer, item.getMenu());
                }
            } else {
View Full Code Here

Examples of com.volantis.mcs.protocols.OutputBuffer

    // JavaDoc inherited
    public MenuItemRenderedContent render(OutputBuffer buffer, MenuItem item)
            throws RendererException {

        // Get the information from the menu item to output
        OutputBuffer text = item.getLabel().getText().getText();

        // Render the information using the writer
        buffer.transferContentsFrom(text);

        return MenuItemRenderedContent.TEXT;
View Full Code Here

Examples of com.volantis.mcs.protocols.OutputBuffer

        checkTextValue(linkBuffer, "backwardFormatLink");
    }

    public void testFragmentLinkTextForwardLinkBuffer() throws Exception {

        final OutputBuffer buffer = new DOMOutputBuffer();
        buffer.writeText("forwardLinkBuffer");
        fragmentInstance.setLinkToBuffer(buffer, 0);

        // forward check
        DOMOutputBuffer linkBuffer =
            (DOMOutputBuffer) writer.getLinkBuffer(fragmentMock, false);
View Full Code Here

Examples of com.volantis.mcs.protocols.OutputBuffer

        checkTextValue(linkBuffer, "forwardLinkBuffer");
    }

    public void testFragmentLinkTextBackwardLinkBuffer() throws Exception {

        final OutputBuffer buffer = new DOMOutputBuffer();
        buffer.writeText("backwardLinkBuffer");
        fragmentInstance.setLinkFromBuffer(buffer, 0);

        // forward check
        DOMOutputBuffer linkBuffer =
            (DOMOutputBuffer) writer.getLinkBuffer(fragmentMock, false);
View Full Code Here

Examples of com.volantis.mcs.protocols.OutputBuffer

        checkTextValue(linkBuffer, "backwardLinkBuffer");
    }

    public void testFragmentLinkTextBothLinksBuffer() throws Exception {

        OutputBuffer buffer = new DOMOutputBuffer();
        buffer.writeText("forwardLinkBuffer");
        fragmentInstance.setLinkToBuffer(buffer, 0);
        buffer = new DOMOutputBuffer();
        buffer.writeText("backwardLinkBuffer");
        fragmentInstance.setLinkFromBuffer(buffer, 0);

        // forward check
        DOMOutputBuffer linkBuffer =
            (DOMOutputBuffer) writer.getLinkBuffer(fragmentMock, false);
View Full Code Here

Examples of com.volantis.mcs.protocols.OutputBuffer

        checkTextValue(linkBuffer, "backwardLinkBuffer");
    }

    public void testFragmentLinkTextBothLinksBufferAndText() throws Exception {

        OutputBuffer buffer = new DOMOutputBuffer();
        buffer.writeText("forwardLinkBuffer");
        fragmentInstance.setLinkToBuffer(buffer, 0);
        fragmentInstance.setLinkToText("forwardLinkText");
        buffer = new DOMOutputBuffer();
        buffer.writeText("backwardLinkBuffer");
        fragmentInstance.setLinkFromBuffer(buffer, 0);
        fragmentInstance.setLinkFromText("backwardLinkText");

        // forward check
        DOMOutputBuffer linkBuffer =
View Full Code Here

Examples of com.volantis.mcs.protocols.OutputBuffer

        checkTextValue(linkBuffer, "backwardLinkBuffer");
    }

    public void testFragmentLinkTextPriority1() throws Exception {

        OutputBuffer buffer = new DOMOutputBuffer();
        buffer.writeText("forwardLinkBuffer0");
        fragmentInstance.setLinkToBuffer(buffer, 0);
        buffer = new DOMOutputBuffer();
        buffer.writeText("forwardLinkBuffer1");
        fragmentInstance.setLinkToBuffer(buffer, 1);
        fragmentInstance.setLinkToText("forwardLinkText");

        buffer = new DOMOutputBuffer();
        buffer.writeText("backwardLinkBuffer0");
        fragmentInstance.setLinkFromBuffer(buffer, 0);
        buffer = new DOMOutputBuffer();
        buffer.writeText("backwardLinkBuffer1");
        fragmentInstance.setLinkFromBuffer(buffer, 1);
        fragmentInstance.setLinkFromText("backwardLinkText");

        // forward check
        DOMOutputBuffer linkBuffer =
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.