Package com.day.cq.wcm.api.components

Examples of com.day.cq.wcm.api.components.DropTarget


            Map<String, DropTarget> dropTargets = (editConfig != null) ? editConfig.getDropTargets() : null;

            if (dropTargets != null && !dropTargets.isEmpty()) {
                // Auto generate images with drop-targets
                for (final Map.Entry<String, DropTarget> entry : dropTargets.entrySet()) {
                    final DropTarget dropTarget = entry.getValue();

                    html.append("<img src=\"/libs/cq/ui/resources/0.gif\" ");
                    html.append("class=\"").append(dropTarget.getId());
                    html.append(" ").append(getWCMEditType(dropTarget).getCssClass()).append("\" ");
                    html.append("alt=\"Drop Target: ").append(dropTarget.getName()).append("\" ");
                    html.append("title=\"Drop Target: ").append(dropTarget.getName()).append("\"/>");
                }
            }
        } else {
            final String title = StringUtils.capitalize(component.getTitle());
View Full Code Here


        ComponentEditConfig editConfig = component.getEditConfig();
        Map<String, DropTarget> dropTargets = (editConfig != null) ? editConfig.getDropTargets() : null;

        if (dropTargets != null && !dropTargets.isEmpty()) {
            DropTarget dropTarget = null;

            // Find the named Drop Target
            for (final Map.Entry<String, DropTarget> entry : dropTargets.entrySet()) {
                dropTarget = entry.getValue();
                if (StringUtils.equals(name, dropTarget.getName())) {
                    break;
                } else {
                    dropTarget = null;
                }
            }

            if (dropTarget != null) {
                // If editType has not been specified then intelligently determine the best match
                editType = (editType == null) ? getWCMEditType(dropTarget) : editType;

                String classNames = dropTarget.getId() + " " + editType.getCssClass();
                String placeholderTitle = "Drop Target: " + dropTarget.getName();

                html.append(generateClassicUIPlaceholder(classNames, placeholderTitle));
            }
        }
View Full Code Here

            Map<String, DropTarget> dropTargets = (editConfig != null) ? editConfig.getDropTargets() : null;

            if (dropTargets != null && !dropTargets.isEmpty()) {
                // Auto generate images with drop-targets
                for (String key : dropTargets.keySet()) {
                    final DropTarget dropTarget = (DropTarget) dropTargets.get(key);

                    html += "<img src=\"/libs/cq/ui/resources/0.gif\"" + " "
                            + "class=\"" + dropTarget.getId() + " " + getWCMEditType(dropTarget).getCssClass() + "\""
                            + " " + "alt=\"Drop Target: " + dropTarget.getName() + "\"" + " "
                            + "title=\"Drop Target: " + dropTarget.getName() + "\"" + "/>";
                }
            }
        } else {
            // Use specified EditType
            html += "<img src=\"/libs/cq/ui/resources/0.gif\"" + " "
View Full Code Here

        ComponentEditConfig editConfig = component.getEditConfig();
        Map<String, DropTarget> dropTargets = (editConfig != null) ? editConfig.getDropTargets() : null;

        if (dropTargets != null && !dropTargets.isEmpty()) {
            DropTarget dropTarget = null;

            // Find the named Drop Target
            for (String key : dropTargets.keySet()) {
                dropTarget = dropTargets.get(key);
                if (StringUtils.equals(name, dropTarget.getName())) {
                    break;
                } else {
                    dropTarget = null;
                }
            }

            if (dropTarget != null) {
                // If editType has not been specified then intelligently determine the best match
                editType = (editType == null) ? getWCMEditType(dropTarget) : editType;

                // Create the HTML img tag used for the edit icon
                html += "<img src=\"/libs/cq/ui/resources/0.gif\"" + " "
                        + "class=\"" + dropTarget.getId() + " " + editType.getCssClass() + "\""
                        + " " + "alt=\"Drop Target: " + dropTarget.getName() + "\"" + " "
                        + "title=\"Drop Target: " + dropTarget.getName() + "\"" + "/>";
            }
        }

        return html;
    }
View Full Code Here

TOP

Related Classes of com.day.cq.wcm.api.components.DropTarget

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.