Either removes the locally configured element or hides the inherited element.<p>

@param elementWidget the element widget
768063
public void removeElement(CmsContainerPageElementPanel elementWidget) {

        if (elementWidget.getInheritanceInfo().isNew()) {
            getHandler().removeElement(elementWidget, ElementRemoveMode.saveAndCheckReferences);
        } else {
            elementWidget.getInheritanceInfo().setVisible(false);
            elementWidget.addStyleName(HIDDEN_ELEMENT_CLASS);
            Element elementOverlay = DOM.createDiv();
            elementOverlay.setClassName(HIDDEN_ELEMENT_OVERLAY_CLASS);
            elementWidget.getElement().appendChild(elementOverlay);
            getGroupContainerWidget().add(elementWidget);
            updateButtonVisibility(elementWidget);
            m_showElementsButton.enable();
            getGroupContainerWidget().refreshHighlighting();
        }
        m_changedInheritanceInfo = true;
    }
344406
public static void removeDisablingOverlay(Element element) {

        List<Element> overlays = CmsDomUtil.getElementsByClass(
            I_CmsLayoutBundle.INSTANCE.generalCss().disablingOverlay(),
            Tag.div,
            element);
        if (overlays == null) {
            return;
        }
        for (Element overlay : overlays) {
            overlay.getParentElement().getStyle().clearPosition();
            overlay.removeFromParent();
        }
        element.removeClassName(I_CmsLayoutBundle.INSTANCE.generalCss().hideOverlay());
    }
355911
protected void replaceWithChildren(Element element)
    {
        Element parent = (Element) element.getParentNode();
        while (element.getFirstChild() != null) {
            parent.insertBefore(element.removeChild(element.getFirstChild()), element);
        }
        parent.removeChild(element);
    }
1299551
private void overButtonBar(Widget buttonBar) {

        if ((m_buttonBar == null) || (buttonBar.getElement() != m_buttonBar.getElement())) {
            closeAll();
            m_buttonBar = buttonBar;
            setButtonBarVisibility(m_buttonBar, true);
        }
    }
233048
@Override
    public boolean remove(Widget w) {
        // Validate.
        if (w.getParent() != this) {
            return false;
        }
        // Orphan.
        try {
            orphan(w);
        } finally {
            // Physical detach.
            Element elem = w.getElement();
            // NOTE (issue #486): DO NOT call DOM.getParent() to correctly handle
            // text node removing. Calling DOM.getParent(TEXT_NODE) will throw a
            // NPE exception.
            //DOM.getParent(elem).removeChild(elem);
            elem.removeFromParent();

            // Logical detach.
            getChildren().remove(w);
        }
        return true;
    }
1293401
public void setContent(Widget content) {

        if (m_content != null) {
            m_content.removeFromParent();
        }
        if (m_isFrame) {
            m_contentPanel.setWidget(content);
        } else {
            m_popup.setMainContent(content);
        }
        m_content = content;
    }
508428
public void removeButton(Widget button) {

        if (m_isFrame) {
            if (m_buttonPanel != null) {
                m_buttonPanel.remove(button);
            }
        } else {
            m_popup.removeButton(button);
        }
    }
751765
protected void removeAllChildren() {

        for (int i = getGroupContainerWidget().getWidgetCount() - 1; i >= 0; i--) {
            Widget widget = getGroupContainerWidget().getWidget(i);
            if (widget instanceof CmsContainerPageElementPanel) {
                widget.removeFromParent();
            }
        }
    }
1026875
public void setElementOptionBar(CmsElementOptionBar elementOptionBar) {

        if ((m_elementOptionBar != null) && (getWidgetIndex(m_elementOptionBar) >= 0)) {
            m_elementOptionBar.removeFromParent();
        }
        m_elementOptionBar = elementOptionBar;
        if (m_elementOptionBar != null) {
            getElement().addClassName(I_CmsLayoutBundle.INSTANCE.dragdropCss().dragElement());
            insert(m_elementOptionBar, 0);
            updateOptionBarPosition();
        } else {
            getElement().removeClassName(I_CmsLayoutBundle.INSTANCE.dragdropCss().dragElement());
        }
    }
792798
protected void breakUpContainer(
        List<CmsContainerElement> elements,
        Map<String, CmsContainerElementData> elementsData) {

        int index = getIndexPosition();
        for (CmsContainerElement element : elements) {
            try {
                CmsContainerPageElementPanel containerElement = getController().getContainerpageUtil().createElement(
                    elementsData.get(element.getClientId()),
                    getParentContainer(),
                    false);
                getParentContainer().insert(containerElement, index);
                index++;
            } catch (Exception e) {
                CmsDebugLog.getInstance().printLine(e.getMessage());
            }
        }
        getController().addToRecentList(m_groupContainerBean.getClientId(), null);
        closeDialog(true);
        getController().unlockResource(
            new CmsUUID(CmsContainerpageController.getServerId(m_groupContainerBean.getClientId())));
        getController().setPageChanged();
    }
1042456
public void remove (T element)
    {
        DependencyNode<T> node = _nodes.remove(element);
        _orphans.remove(element);

        // Remove ourselves as a child of our parents.
        for (DependencyNode<T> parent : node.parents) {
            parent.children.remove(node);
        }

        // Remove ourselves as a parent of our children, possibly orphaning them.
        for (DependencyNode<T> child : node.children) {
            child.parents.remove(node);
            if (child.parents.isEmpty()) {
                _orphans.add(child.content);
            }
        }
    }
788586
public static void removeChildrenFrom(Element element) {
        if (element != null) {
            while (element.firstChild != null) {
                element.removeChild(element.firstChild);
            }
        }
    }
10367
protected void removeContainerElements(String resourceId) {

        boolean changed = false;
        Iterator<org.opencms.ade.containerpage.client.ui.CmsContainerPageElementPanel> it = getAllDragElements().iterator();
        while (it.hasNext()) {
            org.opencms.ade.containerpage.client.ui.CmsContainerPageElementPanel containerElement = it.next();
            if (resourceId.startsWith(containerElement.getId())) {
                containerElement.removeFromParent();
                changed = true;
            }
        }
        for (String elementId : m_elements.keySet()) {
            if (elementId.startsWith(resourceId)) {
                m_elements.remove(elementId);
            }
        }
        if (changed) {
            setPageChanged();
        }
    }
1163990
private void clearDrag() {

        CmsDomUtil.removeDisablingOverlay(getElement());
        m_elementOptionBar.getElement().removeClassName(
            org.opencms.gwt.client.ui.css.I_CmsLayoutBundle.INSTANCE.stateCss().cmsHovering());
        getElement().getStyle().clearOpacity();
        getElement().getStyle().clearDisplay();
        updateOptionBarPosition();
        if (m_provisionalParent != null) {
            m_provisionalParent.removeFromParent();
            m_provisionalParent = null;
        }
    }
554388
public void deleteElement(Object parent, String name) {
		Element element = getElement(parent, name);
		if (element != null) {
			Element group = (Element) element.getParentElement();
			if (group != null) {
				deleteRecursively(group, element);
			}
		}
	}
1306921
public static void hideAndAfter(Element e, Widget widget) {
    assert e != null && widget != null;
    if ($(e).widget() != null && $(e).widget().isAttached()) {
      replaceWidget($(e).widget(), widget, false);
    } else {
      detachWidget(widget);
      hideAndAfter(e, widget.getElement());
      attachWidget(widget, getFirstParentWidget(widget));
    }
  }
556342
public void remove(T element) {
      lock.writeLock().lock();
      try {
         if (outgoingEdges.remove(element) != null) {
            for (Set<T> values : outgoingEdges.values()) {
               values.remove(element);
            }
         }
         if (incomingEdges.remove(element) != null) {
            for (Set<T> values : incomingEdges.values()) {
               values.remove(element);
            }
         }
      } finally {
         lock.writeLock().unlock();
      }
   }