Package com.volantis.mcs.protocols.menu.shared.model

Examples of com.volantis.mcs.protocols.menu.shared.model.ConcreteMenuLabel


        ImageAssetReference overRef =
                new TestNormalImageAssetReference("the over url");
        icon.setNormalURL(normalRef);
        icon.setOverURL(overRef);
        ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), new ConcreteMenuLabel(
                        new ElementDetailsStub(), createMenuText(), icon));

        // Create the renderer we are to test.
        MenuItemComponentRenderer renderer = createImageMenuItemRenderer(
                new TestDeprecatedImageOutput(), false);
View Full Code Here


        menuText.appendEncoded(content);

        // Create the test text, label, and then the menu item
        final ConcreteMenuText text = new ConcreteMenuText(elementDetails);
        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"));
View Full Code Here

     * @param icon  The icon component of the label, if null, is not added.
     * @return A menu label
     */
    public MenuLabel createTestMenuLabel(ElementDetails elementDetails,
                                         MenuText text, MenuIcon icon) {
        ConcreteMenuLabel label = new ConcreteMenuLabel(elementDetails, text);
        if (icon != null) {
            label.setIcon(icon);
        }
        return label;
    }
View Full Code Here

        ConcreteMenuIcon icon = new ConcreteMenuIcon(elementDetails);
        ImageAssetReference imageRef =
                new TestNormalImageAssetReference("the normal url");
        icon.setNormalURL(imageRef);
        ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), new ConcreteMenuLabel(
                        new ElementDetailsStub(), createMenuText(),
                        icon));

        // Create the renderer we are to test.
        MenuItemComponentRenderer renderer = createImageMenuItemRenderer(
View Full Code Here

        // Create the menu item to test.
        ConcreteMenuIcon icon = new ConcreteMenuIcon(new ElementDetailsStub());
        icon.setNormalURL(new TestEmptyImageAssetReference());
        ConcreteMenuItem item = new ConcreteMenuItem(
                new ElementDetailsStub(), new ConcreteMenuLabel(
                        new ElementDetailsStub(), createMenuText(),
                        icon));

        // Create the renderer we are to test.
        MenuItemComponentRenderer renderer = createImageMenuItemRenderer(
View Full Code Here

        DOMOutputBuffer output = (DOMOutputBuffer)
                outputBufferFactory.createOutputBuffer();
        ConcreteMenuText text = new ConcreteMenuText(null);
        output.writeText(content);
        text.setText(output);
        MenuLabel label = new ConcreteMenuLabel(null, text);

        // Create the shard link attributes
        ShardLinkAttributes shardLinkAttrs = new ShardLinkAttributes();
        if (isNextLink) {
            shardLinkAttrs.setAction(ShardLinkAction.NEXT);
View Full Code Here

     * or null otherwise.
     *
     * @return the current entity or null if not of the required class
     */
    private ConcreteMenuLabel getCurrentMenuLabel() {
        ConcreteMenuLabel current = null;

        if (currentEntity instanceof ConcreteMenuLabel) {
            current = (ConcreteMenuLabel) currentEntity;
        }

View Full Code Here

        // May appear in menus or menu groups.
        // @todo later could use an interface common to the two target classes
        if (parentMenu != null) {
            ConcreteMenuItem item = new ConcreteMenuItem(
                    new ConcreteElementDetails(),
                    new ConcreteMenuLabel(
                            null,
                            new ConcreteMenuText()));
            parentMenu.add(item);
            push(item);
        } else {
            ConcreteMenuItemGroup parentGroup = getCurrentMenuItemGroup();

            if (parentGroup != null) {
                ConcreteMenuItem item = new ConcreteMenuItem(
                        new ConcreteElementDetails(),
                        new ConcreteMenuLabel(
                                null,
                                new ConcreteMenuText()));
                parentGroup.add(item);
                push(item);
            } else {
View Full Code Here

        ConcreteMenu parentMenu = getCurrentMenu();

        // May appear in menus or menu items (the latter always has one)
        // @todo later could use an interface common to the two target classes
        if (parentMenu != null) {
            ConcreteMenuLabel label = new ConcreteMenuLabel(
                    new ConcreteElementDetails(), new ConcreteMenuText());

            parentMenu.setLabel(label);
            push(label);
        } else {
View Full Code Here

        }
    }

    // javadoc inherited
    public void endLabel() throws BuilderException {
        ConcreteMenuLabel label = getCurrentMenuLabel();

        if (label != null) {
            // Note that the label is not checked here since we don't know the
            // context of the label's use
            pop();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.menu.shared.model.ConcreteMenuLabel

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.