Package com.vaadin.server

Examples of com.vaadin.server.Resource


     * @param itemId
     *            the id of the item to be assigned an icon.
     * @return the icon for the item or null, if not specified.
     */
    public Resource getItemIcon(Object itemId) {
        final Resource explicit = itemIcons.get(itemId);
        if (explicit != null) {
            return explicit;
        }

        if (getItemIconPropertyId() == null) {
View Full Code Here


    public void moveComponentsFrom(ComponentContainer source) {
        for (final Iterator<Component> i = source.getComponentIterator(); i
                .hasNext();) {
            final Component c = i.next();
            String caption = null;
            Resource icon = null;
            if (TabSheet.class.isAssignableFrom(source.getClass())) {
                Tab tab = ((TabSheet) source).getTab(c);
                caption = tab.getCaption();
                icon = tab.getIcon();
            }
View Full Code Here

                target.addAttribute("closable", true);
            }

            // tab icon, caption and description, but used via
            // VCaption.updateCaption(uidl)
            final Resource icon = tab.getIcon();
            if (icon != null) {
                target.addAttribute(TabsheetBaseConstants.ATTRIBUTE_TAB_ICON,
                        icon);
            }
            final String caption = tab.getCaption();
View Full Code Here

            Command command = item.getCommand();
            if (command != null) {
                target.addAttribute("command", true);
            }

            Resource icon = item.getIcon();
            if (icon != null) {
                target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_ICON, icon);
            }

            if (!item.isEnabled()) {
View Full Code Here

                }

                // Adds the attributes
                target.addAttribute(TreeConstants.ATTRIBUTE_NODE_CAPTION,
                        getItemCaption(itemId));
                final Resource icon = getItemIcon(itemId);
                if (icon != null) {
                    target.addAttribute(TreeConstants.ATTRIBUTE_NODE_ICON,
                            getItemIcon(itemId));
                    target.addAttribute(TreeConstants.ATTRIBUTE_NODE_ICON_ALT,
                            getItemIconAlternateText(itemId));
View Full Code Here

                }

                // Gets the option attribute values
                final String key = itemIdMapper.key(id);
                final String caption = getItemCaption(id);
                final Resource icon = getItemIcon(id);
                getCaptionChangeListener().addNotifierForItem(id);

                // Paints the option
                target.startTag("so");
                if (icon != null) {
View Full Code Here

            Command command = item.getCommand();
            if (command != null) {
                target.addAttribute("command", true);
            }

            Resource icon = item.getIcon();
            if (icon != null) {
                target.addAttribute(MenuBarConstants.ATTRIBUTE_ITEM_ICON, icon);
            }

            if (!item.isEnabled()) {
View Full Code Here

                }

                // Adds the attributes
                target.addAttribute(TreeConstants.ATTRIBUTE_NODE_CAPTION,
                        getItemCaption(itemId));
                final Resource icon = getItemIcon(itemId);
                if (icon != null) {
                    target.addAttribute(TreeConstants.ATTRIBUTE_NODE_ICON,
                            getItemIcon(itemId));
                }
                final String key = itemIdMapper.key(itemId);
View Full Code Here

                }

                // Gets the option attribute values
                final String key = itemIdMapper.key(id);
                final String caption = getItemCaption(id);
                final Resource icon = getItemIcon(id);
                getCaptionChangeListener().addNotifierForItem(id);

                // Paints the option
                target.startTag("so");
                if (icon != null) {
View Full Code Here

TOP

Related Classes of com.vaadin.server.Resource

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.