Examples of ConcreteMenuIcon


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

        // Create the menu item to test.
        ConcreteElementDetails elementDetails = new ConcreteElementDetails();
        elementDetails.setElementName("the tag name");
        elementDetails.setStyles(StylesBuilder.getEmptyStyles());
        ConcreteMenuIcon icon = new ConcreteMenuIcon(elementDetails);
        ImageAssetReference normalRef =
                new TestNormalImageAssetReference("the normal url");
        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.
View Full Code Here

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

     * @return A menu icon
     */
    public MenuIcon createTestMenuIcon(ElementDetails elementDetails,
                                       ImageAssetReference normalURL,
                                       ImageAssetReference overURL) {
        ConcreteMenuIcon icon = new ConcreteMenuIcon(elementDetails);
        icon.setNormalURL(normalURL);
        icon.setOverURL(overURL);
        return icon;
    }
View Full Code Here

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

        // Create the menu item to test.
        ConcreteElementDetails elementDetails = new ConcreteElementDetails();
        elementDetails.setElementName("the tag name");
        elementDetails.setId("the id");
        elementDetails.setStyles(StylesBuilder.getEmptyStyles());
        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));
View Full Code Here

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

     * @throws Exception
     */
    public void testNone() throws Exception {

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

View Full Code Here

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

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

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

View Full Code Here

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

        if (parent != null) {
            MenuIcon icon = parent.getIcon();

            if (icon == null) {
                icon = new ConcreteMenuIcon();

                parent.setIcon(icon);
            }

            push(icon);
View Full Code Here

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

        }
    }

    // javadoc inherited
    public void endIcon() throws BuilderException {
        ConcreteMenuIcon icon = getCurrentMenuIcon();

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

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

    }

    // javadoc inherited
    public void setNormalImageURL(ImageAssetReference url)
            throws BuilderException {
        ConcreteMenuIcon icon = getCurrentMenuIcon();

        if (icon != null) {
            try {
                icon.setNormalURL(url);
            } catch (Exception e) {
                throw new BuilderException(e);
            }
        } else {
            reportBadParent("normal URL");
View Full Code Here

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

    }

    // javadoc inherited
    public void setOverImageURL(ImageAssetReference url)
            throws BuilderException {
        ConcreteMenuIcon icon = getCurrentMenuIcon();

        if (icon != null) {
            try {
                icon.setOverURL(url);
            } catch (Exception e) {
                throw new BuilderException(e);
            }
        } else {
            reportBadParent("over URL");
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.