Examples of LiteralLinkAssetReference


Examples of com.volantis.mcs.protocols.assets.implementation.LiteralLinkAssetReference

   
            builder.startMenu();
   
            builder.startMenuItem();
            builder.setTitle(title);
            builder.setHref(new LiteralLinkAssetReference(href));

            builder.startLabel();
   
            builder.startText();
            DOMOutputBuffer dom = new TestDOMOutputBuffer();
View Full Code Here

Examples of com.volantis.mcs.protocols.assets.implementation.LiteralLinkAssetReference

        // Set the style.
        builder.setElementDetails("menuitem", null,
                StylesBuilder.getInitialValueStyles());

        // Set the href.
        builder.setHref(new LiteralLinkAssetReference("href1.xml"));

        // Set the pane.
        builder.setPane(ITEM1_PANE);

        // Create a plain text label.
        builder.startLabel();
        builder.startText();

        // Set the text.
        buffer = new TestDOMOutputBuffer();
        buffer.writeText("item 1");
        builder.setText(buffer);

        builder.endText();
        builder.endLabel();

        builder.endMenuItem();

        // Create the second menu item explicitly targeted at a different pane.
        builder.startMenuItem();

        // Set the style.
        builder.setElementDetails("menuitem", null,
                StylesBuilder.getInitialValueStyles());

        // Set the href.
        builder.setHref(new LiteralLinkAssetReference("href2.xml"));

        // Set the pane.
        builder.setPane(ITEM2_PANE);

        // Create a plain text label.
View Full Code Here

Examples of com.volantis.mcs.protocols.assets.implementation.LiteralLinkAssetReference

        builder.setElementDetails("menu", null, menuStyles);
        builder.setTitle(menuTitle);

        builder.startMenuItem();
        builder.setTitle(itemTitle);
        builder.setHref(new LiteralLinkAssetReference(href));

        builder.startLabel();

        builder.startText();
        DOMOutputBuffer dom = new TestDOMOutputBuffer();
View Full Code Here

Examples of com.volantis.mcs.protocols.assets.implementation.LiteralLinkAssetReference

        buffer.writeText("text");

        builder.setText(buffer);
        builder.endText();
        builder.endLabel();
        builder.setHref(new LiteralLinkAssetReference("href.xml"));
        builder.endMenuItem();
        builder.endMenu();

        return builder.getCompletedMenuModel();
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.assets.implementation.LiteralLinkAssetReference

        // Create the menu item to test.
        final ConcreteElementDetails elementDetails =
                createTestElementDetails();
        final ConcreteMenuItem item = new ConcreteMenuItem(
                elementDetails, new MenuLabelStub());
        item.setHref(new LiteralLinkAssetReference("the href"));
        item.setShortcut(new LiteralTextAssetReference("the shortcut"));

        // Create the renderer we are to test.
        final TestDeprecatedExternalLinkOutput externalLinkOutput =
                new TestDeprecatedExternalLinkOutput();
View Full Code Here

Examples of com.volantis.mcs.protocols.assets.implementation.LiteralLinkAssetReference

    public void testNullHref() throws Exception {

        // Create the menu item to test.
        ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), new MenuLabelStub());
        item.setHref(new LiteralLinkAssetReference(null));
        item.setShortcut(new LiteralTextAssetReference("the shortcut"));

        // Check that the renderer did not open any output.
        checkUnopened(item);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.assets.implementation.LiteralLinkAssetReference

    public void testNullShortcut() throws Exception {

        // Create the menu item to test.
        ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), new MenuLabelStub());
        item.setHref(new LiteralLinkAssetReference("the href"));
        item.setShortcut(null);

        // Check that the renderer did not open any output.
        checkUnopened(item);
View Full Code Here

Examples of com.volantis.mcs.protocols.assets.implementation.LiteralLinkAssetReference

        text.setText(menuText);
        final ConcreteMenuLabel label = new ConcreteMenuLabel(
                new ElementDetailsStub(), text);
        final ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), label);
        item.setHref(new LiteralLinkAssetReference("the href"));
        item.setShortcut(new LiteralTextAssetReference("the shortcut"));

        String expectedContent = createExpectedContent(item);
        String expected = null;
        if (withStyle) {
View Full Code Here

Examples of com.volantis.mcs.protocols.assets.implementation.LiteralLinkAssetReference

        // Test getting a null href
        LinkAssetReference testHref = item.getHref();
        assertNull("Should be no prompt", testHref);

        // Test setting a href
        LinkAssetReference href = new LiteralLinkAssetReference(
                "relative/url/to/something");
        item.setHref(href);

        // Test getting a non-null href
        testHref = item.getHref();
View Full Code Here

Examples of com.volantis.mcs.protocols.assets.implementation.LiteralLinkAssetReference

        // Test getting true
        boolean isSubMenu = item.isSubMenuItem();
        assertTrue("Should be a menu representation", isSubMenu);

        // Set a href value as this is part of the submenu check
        item.setHref(new LiteralLinkAssetReference("/href/to/something"));

        // Test getting false
        isSubMenu = item.isSubMenuItem();
        assertFalse("Should be a normal menu item", isSubMenu);
    }
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.