Makes sure corresponding sitemap entries are loaded when the gallery tree is opened.<p>

@param parent the parent gallery tree item
434451
protected void ensureEntriesLoaded(CmsGalleryTreeItem parent) {

        CmsList<? extends I_CmsListItem> children = parent.getChildren();
        Set<String> parentPaths = new HashSet<String>();
        for (Widget listItem : children) {
            CmsGalleryTreeItem treeItem = (CmsGalleryTreeItem)listItem;
            CmsUUID entryId = treeItem.getEntryId();
            if (m_controller.getEntryById(entryId) == null) {
                parentPaths.add(CmsResource.getParentFolder(treeItem.getSitePath()));
            }
        }
        for (String parentPath : parentPaths) {
            m_controller.loadPath(parentPath);
        }
    }
483902
@Override
    public void setParent(View parent)
    {
        super.setParent(parent);
        if (parent != null)
        {
            transform = new AffineTransform();
            setPropertiesFromAttributes(getElement().getAttributes());
            refreshAttributes = true;
            refreshProperties = false;
            container = getContainer();
            /*if (parent instanceof ElementBoxView)
            {
                // avoid a RootView or any other non-SwingBox views
                Anchor parentAnchor = ((ElementBoxView) parent).getAnchor();
                if (parentAnchor.isActive())
                {
                    // share elementAttributes
                    anchor.setActive(true);
                    anchor.getProperties().putAll(parentAnchor.getProperties());
                }
            }*/
        }
        else
        {
            anchor = null;
            transform = null;
            container = null;
        }
    }
326547
public void updateSitePath(String sitePath) {

        String oldPath = getSitePath();
        getListItemWidget().setSubtitleLabel(sitePath);
        for (Widget child : getChildren()) {
            ((CmsGalleryTreeItem)child).updateParentPath(sitePath, oldPath);
        }
    }
308267
@Override
	public void setup(AbstractInvokable parent) {
		@SuppressWarnings("unchecked")
		final GenericCollectorMap<IT, OT> mapper =
			RegularPactTask.instantiateUserCode(this.config, userCodeClassLoader, GenericCollectorMap.class);
		this.mapper = mapper;
		mapper.setRuntimeContext(getUdfRuntimeContext());
	}
1285099
public void setSubEntries(List<CmsClientSitemapEntry> children, I_CmsSitemapController controller) {

        m_childrenLoadedInitially = true;

        m_subEntries.clear();
        if (children != null) {
            m_subEntries.addAll(children);
            for (CmsClientSitemapEntry child : children) {
                child.updateSitePath(CmsStringUtil.joinPaths(m_sitePath, child.getName()), controller);
            }
        }
    }
1336285
public void displayNewGallery(CmsGalleryFolderEntry galleryFolder) {

        String parent = CmsResource.getParentFolder(galleryFolder.getSitePath());
        CmsSitemapTreeItem parentItem = getTreeItem(parent);
        if (parentItem != null) {
            CmsUUID parentId = parentItem.getEntryId();
            m_controller.updateEntry(parentId);
        } else {
            m_controller.loadPath(parent);
        }
        CmsGalleryTreeItem typeItem = m_galleryTypeItems.get(galleryFolder.getResourceType());
        CmsGalleryTreeItem folderItem = createGalleryFolderItem(galleryFolder);
        if ((parentItem != null) && m_galleryTreeItems.containsKey(parentItem.getEntryId())) {
            CmsGalleryTreeItem galleryParent = m_galleryTreeItems.get(parentItem.getEntryId());
            galleryParent.addChild(folderItem);
            galleryParent.setOpen(true);
        } else {
            typeItem.addChild(folderItem);
        }
        m_galleryTreeItems.put(galleryFolder.getStructureId(), folderItem);
        typeItem.setOpen(true);
        // in case the type item had been hidden
        typeItem.getElement().getStyle().clearDisplay();
        m_noGalleriesLabel.getElement().getStyle().setDisplay(Display.NONE);
    }
537774
private List<CmsGalleryTreeEntry> galleryListToTree(List<CmsGalleryFolderBean> galleries) {

        List<CmsGalleryTreeEntry> result = new ArrayList<CmsGalleryTreeEntry>();
        Collections.sort(galleries, new CmsComparatorPath(true));
        CmsGalleryTreeEntry previous = null;
        for (CmsGalleryFolderBean folderBean : galleries) {
            CmsGalleryTreeEntry current = new CmsGalleryTreeEntry(folderBean);
            CmsGalleryTreeEntry parent = null;
            if (previous != null) {
                parent = lookForParent(previous, current.getPath());
            }
            if (parent != null) {
                parent.addChild(current);
            } else {
                result.add(current);
            }
            previous = current;
        }
        return result;
    }
983517
public void updateGalleryData(CmsContainerPageGalleryData galleryData, boolean viewChanged) {

        if (m_dialog != null) {
            if (viewChanged) {
                m_dialog.removeFromParent();
                m_dialog = null;
            } else {
                m_dialog.updateGalleryData(galleryData.getGalleryData());
            }
        }
        m_galleryData = galleryData.getGalleryData();
        m_search = galleryData.getGallerySearch();
    }
1364868
public void addTreeItem(CmsObject cms, CmsResource resource, CmsUUID parentId) {

        List<Container.Filter> filters = Lists.newArrayList(getContainerFilters());

        // getItem only finds an existing item if it isn't filtered out by the container
        // filters, so we temporarily remove the filters to access the complete data set
        removeAllContainerFilters();
        try {
            Item resourceItem = getItem(resource.getStructureId());
            if (resourceItem == null) {
                resourceItem = addItem(resource.getStructureId());
            }
            fillProperties(cms, resourceItem, resource, parentId);
            if (resource.isFile()) {
                setChildrenAllowed(resource.getStructureId(), false);
            }
            if (parentId != null) {
                setParent(resource.getStructureId(), parentId);
            }
        } finally {
            for (Container.Filter filter : filters) {
                addContainerFilter(filter);
            }
        }
    }
1313827
public void setParent(AstNode parent) {
        if (parent == this.parent) {
            return;
        }

        // Convert position back to absolute.
        if (this.parent != null) {
            setRelative(-this.parent.getAbsolutePosition());
        }

        this.parent = parent;
        if (parent != null) {
            setRelative(parent.getAbsolutePosition());
        }
    }
642213
public void setAndLinkChild(int index, AbstractPlanNode child) {
        assert(child != null);
        m_children.set(index, child);
        child.m_parents.add(this);
    }
421865
public final void setParent(ElementBase parent) {
        ElementBase oldParent = this.parent;
        
        if (oldParent == parent) {
            return;
        }
        
        if (oldParent != null) {
            oldParent.removeChild(this, false);
        }
        
        if (parent != null) {
            parent.addChild(this);
        }
    }
821103
public void init(Object parent, Object record)
    {
        super.init(parent, record);
        record = this.getFieldList();   // Created/set in JBaseScreen.init
        this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
        FieldTable table = ((FieldList)record).getTable();
        CalendarModel model = this.getCalendarModel(table);
        ImageIcon backgroundImage = null;
        if (this.getBaseApplet() != null)
        	backgroundImage = this.getBaseApplet().getBackgroundImage();	// Calendar panel is transparent, but this helps with rendering see-thru components 
        CalendarPanel panel = new CalendarPanel(model, true, backgroundImage);
        this.add(panel);
    }
853223
public void createSitemapSubEntry(final CmsClientSitemapEntry newEntry, CmsUUID parentId, String sitemapType) {

        CmsUUID structureId = m_data.getDefaultNewElementInfo().getCopyResourceId();
        newEntry.setResourceTypeName(sitemapType);
        create(newEntry, parentId, m_data.getDefaultNewElementInfo().getId(), structureId, null, true);
    }
854698
protected static void register(Class<?> parent, String cname) {
    Entry e = data.get(parent);
    if(e == null) {
      data.put(parent, e = new Entry());
    }
    e.addName(cname);
  }
1179297
public void setParent( IVarDef parent)
    {
    parent_ = parent;
    pathName_ = null;
    effCondition_ = null;
    position_ = null;
    }
41829
public void init(Object parent, Object strURL)
    {
        BaseApplet applet = null;
        if (parent instanceof BaseApplet)
            applet = (BaseApplet)parent;
        if (strURL instanceof BaseApplet)
            applet = (BaseApplet)strURL;
        if (applet == null)
            applet = this.getBaseApplet();

        if (strURL == null)
        	if (applet != null)
        		if (applet.getProperty(Params.URL) == null)
        			strURL = "?" + Params.HELP + "=";

        this.setOpaque(false);
        super.init(parent, strURL);

        if (parent instanceof BaseApplet)
        	((BaseApplet)parent).setHelpView(this.getHtmlEditor());
    }