Enables or disables the given component and all its children
recursively

@param component The component
@param enabled Whether the component tree should be enabled
174628
public static void setDeepEnabled(Component component, boolean enabled)
    {
        component.setEnabled(enabled);
        if (component instanceof Container)
        {
            Container container = (Container)component;
            for (Component c : container.getComponents())
            {
                setDeepEnabled(c, enabled);
            }
        }
    }
1344215
public void remove(UIComponent component)
	{
		if (component.getParent() != this)
			return;

		content.components.remove(component);
		component.setParent(null);
		component.unregister(this);
		onContentUpdate();
	}
984422
def is_enabled(self, cls):
        """"""
        if cls not in self.enabled:
            self.enabled[cls] = self.is_component_enabled(cls)
        return self.enabled[cls]
496906
public static void setEnabled(Element element, boolean enabled) {
        element.setPropertyBoolean("disabled", !enabled);
	setStyleName(element, "disabled", !enabled);
    }
496458
def enable(self):
        
        self._enabled = True
        for child in self.children:
            if isinstance(child, (Container, Widget)):
                child.enable()
960366
final void addChild(AbstractSimon simon) {
		children.add(simon);
		simon.setParent(this);
		simon.enabled = enabled;
	}
1279937
public void unbind(BaseUIComponent component) {
        if (componentBindings.remove(component)) {
            keyEventListener.registerComponent(component, false);
            CommandUtil.updateShortcuts(component, shortcutBindings, true);
            setCommandTarget(component, null);
        }
    }
766494
public static boolean shouldRenderChildren(UIComponent component) {
        for (int i = 0; i < component.getChildren().size(); i++) {
            if (component.getChildren().get(i).isRendered()) {
                return true;
            }
        }

        return false;
    }
304790
protected void deactivate(ComponentContext compcontext) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Deactivating " + this);
        }
        INSTANCE.compareAndSet(this, null);
    }
603477
void add(final WComponent component) {
		assertAddSupported(component);
		assertNotReparenting(component);

		if (!(this instanceof Container)) {
			throw new UnsupportedOperationException("Components can only be added to a container");
		}

		ComponentModel model = getOrCreateComponentModel();

		if (model.getChildren() == null) {
			model.setChildren(new ArrayList<WComponent>(1));
		}

		model.getChildren().add(component);

		if (isLocked()) {
			component.setLocked(true);
		}

		if (component instanceof AbstractWComponent) {
			((AbstractWComponent) component).getOrCreateComponentModel().setParent((Container) this);
			((AbstractWComponent) component).addNotify();
		}
	}
966598
public static void closeModal(Component component) {
	synchronized (modals) {
	  RootPaneContainer frame = null;
	  Modal modal = null;

	  Iterator<Entry<RootPaneContainer, Modal>> it =
		  modals.entrySet().iterator();
	  while (it.hasNext()) {
		Entry<RootPaneContainer, Modal> entry = it.next();
		modal = entry.getValue();
		frame = entry.getKey();
		if (frame != null && modal != null
			&& modal.components.contains(component)) {
		  break;
		} else {
		  frame = null;
		  modal = null;
		}
	  }
	  if (frame != null && modal != null) {
		modal.close(component);
		if (modal.getSize() == 0) {
		  modals.remove(frame);
		}
	  }
	}
  }
917685
private void hideTab(Component component) {
		if (hiddenTabs.contains(component)) {
			return;
		}
		hiddenTabs.add(component);

		int index = indexOfComponent(component);
		if (index != -1) {
			super.removeTabAt(index);
		}
		
		handleHiddenTabListTab();
	}
1076213
public void removeToolBarComponent(Component component) {
		validateComponentNonNull(component);

		getToolbar().remove(component);
		getToolbar().validate();
		getToolbar().repaint();
	}
491868
private function is_disabled( $component )
    {
        return 
            $component instanceof DisableableComponentInterface &&
            (
                true === $component->disabled ||
                true === $component->readonly
            );
    }
1248789
@Override
    public void setComponentEnabled(boolean enabled) {
        super.setComponentEnabled(enabled);

        addButton.setEnabled(enabled);
        removeWithoutConfirmationCheckBox.setEnabled(enabled);

        boolean enable = enabled && getTable().getSelectionModel().getMinSelectionIndex() >= 0;
        if (modifyButton != null) {
            modifyButton.setEnabled(enable);
        }
        removeButton.setEnabled(enable);
    }
1182667
protected boolean hasVisibleElements(BaseUIComponent component) {
        for (BaseUIComponent child : component.getChildren(BaseUIComponent.class)) {
            ElementUI ele = getAssociatedElement(child);
            
            if (ele != null && ele.isVisible()) {
                return true;
            }
            
            if (hasVisibleElements(child)) {
                return true;
            }
        }
        
        return false;
    }
340614
private void attach(JComponent componentToBeDecorated) {
        detach();

        decoratedComponent = componentToBeDecorated;

        if (decoratedComponent != null) {
            decoratedComponent.addComponentListener(decoratedComponentTracker);
            decoratedComponent.addAncestorListener(decoratedComponentTracker);
            decoratedComponent.addHierarchyBoundsListener(decoratedComponentTracker);
            decoratedComponent.addHierarchyListener(decoratedComponentTracker);
            decoratedComponent.addPropertyChangeListener("enabled", decoratedComponentTracker);
            decoratedComponent.addPropertyChangeListener("ancestor", decoratedComponentTracker);

            attachToLayeredPane();
        }
    }