Examples of ConcreteMenuLabel


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

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

        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

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

     * @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

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

        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

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

        // 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

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

        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

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

     * 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

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

        // 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

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

        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

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

        }
    }

    // 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
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.