Sets the parent of this element, subject to the parent/child constraints applicable to each.

@param parent The new parent.
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);
        }
    }
576418
public void init(Object parent, Object objURL)
    {
        super.init(parent, objURL);

        this.setLayout(new BorderLayout());

        String strURL = this.getBaseApplet().getProperty(Params.URL);
        if (strURL != null)
            if (strURL.indexOf(':') != -1)
                strURL = strURL.substring(strURL.indexOf(':') + 1);
        this.displayURL(strURL);
    }
810168
void setParent(JMFMessageData parent) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.entry(this, tc, "setParent", new Object[] { parent });

        synchronized (getMessageLockArtefact()) {

            // If the parent is a JSMessageData then this is straight forward
            if (parent instanceof JSMessageData) {
                parentMessage = (JSMessageData) parent;
                master = ((JSMessageData) parent).master;
                containingMessage = ((JSMessageData) parent).compatibilityWrapperOrSelf;
            }

            // ... if not, it must be a JSCompatibleMessageImpl, and its encoding must
            // be a JSMessageData, because if it was a JMFEncapsulation it couldn't be our parent
            else {
                JSMessageData msg = (JSMessageData) ((JSCompatibleMessageImpl) parent).getEncodingMessage();
                parentMessage = msg;
                master = msg.master;
                containingMessage = parent;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.exit(this, tc, "setParent");
    }
375828
protected function set_parent($element) {
        parent::set_parent($element);
        // Force condition param calculation in all children
        foreach ($this->get_children() as $child) {
            $child->set_condition($child->get_condition_param(), $child->get_condition_value());
        }
    }
1108361
public void setParentId(String parentId)
   {
      this.parentId = (parentId == null || parentId.equals("") ? null : parentId);
      setGroupName(groupName);
   }
1139582
public void setParentGroupNames(java.util.Collection<String> parentGroupNames) {
        if (parentGroupNames == null) {
            this.parentGroupNames = null;
            return;
        }

        this.parentGroupNames = new java.util.ArrayList<String>(parentGroupNames);
    }
1335309
public function setParent(self $parent = null)
    {
        $this->parent = $parent;
        if ($parent && !($this instanceof VirtualBusinessPage)) {
            $parent->addChild($this);
        }
    }
909824
def add_parent(self, parent):
        
        parent.add_child(self)
        self.parent = parent
        return parent
145594
private function setParent(&$parent)
    {
        if (! is_null($parent)) {
            $this->parent = $parent;

            $this->parent->elements->add($this);
        }

        return $this;
    }
1144964
def set_parent(self, child, parent):
        
        parents = cmds.listConnections("%s.parent" % child, plugs=True, source=True)
        if parents:
            # there is only one parent at a time
            cmds.disconnectAttr("%s.parent" % child, "%s" % parents[0])
        if parent:
            cmds.connectAttr("%s.parent" % child, "%s.children" % parent, force=True, nextAvailable=True)
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);
			}
		}
	}
1093973
private void internalSetParent(CommandRegistry parentRegistry) {
        
        if (!ObjectUtils.nullSafeEquals(this.parent, parentRegistry)) {
            
            if (this.parent != null) {
                this.parent.removeCommandRegistryListener(this);
            }
            
            this.parent = parentRegistry;
            
            if (this.parent != null) {
                this.parent.addCommandRegistryListener(this);
            }
            
        }
        
    }
520669
public void init(Object parent, Object record)
    {
        m_parent = parent;
        this.setOpaque(false);
        
        if (this.getBaseApplet() != null)
        {
            String strScreenDesc = this.getScreenDesc();
            this.getBaseApplet().setStatusText(strScreenDesc);   // Display screen desc or clear screen desc.
            if (strScreenDesc != null)
                if (this.getTargetScreen(JBaseFrame.class) != null)
                    ((JBaseFrame)this.getTargetScreen(JBaseFrame.class)).setTitle(strScreenDesc);
        }
    }
388425
public void init(Object parent, Object record)
    {
    	super.init(parent, record);
    	
        this.setOpaque(false);
        this.setBorder(new EtchedBorder());
        
        this.setLayout(new BorderLayout());
        this.add(m_helpView = new JHelpView(this, null), BorderLayout.CENTER);
        this.add(m_iconArea = new JBaseToolbar(this, null)
	        {
	            private static final long serialVersionUID = 1L;
	            /**
	             * Add the buttons to this window.
	             * Override this to include buttons other than the default buttons.
	             */
	            public void addButtons()
	            {
	               //super.addButtons();
	               //addButton(ThinMenuConstants.HOME);
	               JButton button = addButton(null, ThinMenuConstants.CLOSE, ThinMenuConstants.CLOSE);
	               button.setOpaque(false);
	               button.setBorder(new LineBorder(Color.black, 1));
	             }
	        }, BorderLayout.NORTH);
        m_iconArea.setOpaque(false);
        
        m_helpView.getHtmlEditor().setHelpPane(this);
    }
723481
public void init(Object parent, Object record)
    {
        if (parent instanceof BaseApplet)
            m_strInitParam = ((BaseApplet)parent).getProperty(Params.MENU);
        super.init(parent, record);
    }
1223103
def setparents(self):
        """"""
        for c in self:
            if isinstance(c, AbstractElement):
                c.parent = self
                c.setparents()
809827
public static void setParents(final Parse p) {
    final Parse[] children = p.getChildren();
    for (final Parse element : children) {
      element.setParent(p);
      setParents(element);
    }
  }