Installs the specified component into Jaguar.
The component must be installed after Jaguar started.

@param component The component class to be installed.
347852
public static synchronized void install(Class<?> component) {
		Preconditions.checkState(container != null, 
				"Cannot install component until Jaguar starts");
		if (!installed(component)) {
			container.install(component);
		}
	}
1344215
public void remove(UIComponent component)
	{
		if (component.getParent() != this)
			return;

		content.components.remove(component);
		component.setParent(null);
		component.unregister(this);
		onContentUpdate();
	}
954708
@SuppressWarnings("unchecked")
    private static void injectInnerComponent(final Component<?> component, final Field field, final Object... keyParts) {

        final ParameterizedType innerComponentType = (ParameterizedType) field.getGenericType();
        final Class<?> componentType = (Class<?>) innerComponentType.getActualTypeArguments()[0];

        try {
            ClassUtility.setFieldValue(field, component, CBuilder.innerComponent((Class<Command>) componentType, keyParts).host(component));

        } catch (IllegalArgumentException | CoreException e) {
            LOGGER.error(COMPONENT_INJECTION_FAILURE, component.getClass(), e);
        }

    }
577779
public void installComponent(
      SdkComponent component, ProgressListener progressListener, ConsoleListener consoleListener)
      throws InterruptedException, CommandExitException, CommandExecutionException {

    progressListener.start("Installing " + component.toString(), ProgressListener.UNKNOWN);

    Map<String, String> environment = null;
    if (pythonCopier != null) {
      environment = pythonCopier.copyPython();
    }

    Path workingDirectory = gcloudPath.getRoot();
    List<String> command =
        Arrays.asList(
            gcloudPath.toString(), "components", "install", component.toString(), "--quiet");
    commandRunner.run(command, workingDirectory, environment, consoleListener);
    progressListener.done();
  }
176540
public void surveyComponents(Component component)
    {
        // First, climb up and get the title from the frame.
        Component frame = component;
        while (frame != null)
        {
            if (frame instanceof Frame)
            {
                title = ((Frame)frame).getTitle();
                break;
            }
            frame = frame.getParent();
        }
        if (title == null)
            title = BLANK;
        // Now go through the components and line the printable ones up.
        Vector<Component> vector = new Vector<Component>();
        this.addComponents(((Container)component), vector);
        if (vector.size() == 0)
            vector.add(component);
        this.componentList = new Component[vector.size()];
        for (int i = 0; i < vector.size(); i++)
        {
            componentList[i] = (Component)vector.get(i);
        }
        
        this.resetAll();
    }
886819
protected void register(final Class<? extends Component<?>> interfaceClass, final Class<? extends Component<?>> implClass) {
        register(interfaceClass, implClass, PriorityLevel.Normal, 0);
    }
16857
protected void onBeforeRender(final Component component) {
		final Response response = component.getResponse();
		response.write(onWriteBeforeRender());
	}
401887
private void installBean(JComponent bean) {
		try {
			componentPanel.removeAll();
			componentPanel.add(bean);

			BeanInfo beanInfo = Introspector.getBeanInfo(bean.getClass(), bean.getClass()
					.getSuperclass());
			PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();

			propertyPanel.removeAll();

			GridBagLayout gridbag = new GridBagLayout();
			GridBagConstraints c = new GridBagConstraints();
			c.fill = GridBagConstraints.BOTH;

			propertyPanel.setLayout(gridbag);

			int count = 0;

			String[] types = new String[] { "class java.util.Locale", "boolean", "int",
					"class java.awt.Color", "class java.util.Date", "class java.lang.String" };

			for (int t = 0; t < types.length; t++) {
				for (int i = 0; i < propertyDescriptors.length; i++) {
					if (propertyDescriptors[i].getWriteMethod() != null) {
						String type = propertyDescriptors[i].getPropertyType().toString();

						final PropertyDescriptor propertyDescriptor = propertyDescriptors[i];
						final JComponent currentBean = bean;
						final Method readMethod = propertyDescriptor.getReadMethod();
						final Method writeMethod = propertyDescriptor.getWriteMethod();

						if (type.equals(types[t])
								&& (((readMethod != null) && (writeMethod != null)) || ("class java.util.Locale"
										.equals(type)))) {
							if ("boolean".equals(type)) {
								boolean isSelected = false;

								try {
									Boolean booleanObj = ((Boolean) readMethod.invoke(bean, null));
									isSelected = booleanObj.booleanValue();
								} catch (Exception e) {
									e.printStackTrace();
								}

								final JCheckBox checkBox = new JCheckBox("", isSelected);
								checkBox.addActionListener(new ActionListener() {
									public void actionPerformed(ActionEvent event) {
										try {
											if (checkBox.isSelected()) {
												writeMethod.invoke(currentBean,
														new Object[] { new Boolean(true) });
											} else {
												writeMethod.invoke(currentBean,
														new Object[] { new Boolean(false) });
											}
										} catch (Exception e) {
											e.printStackTrace();
										}
									}
								});
								addProperty(propertyDescriptors[i], checkBox, gridbag);
								count += 1;
							} else if ("int".equals(type)) {
								JSpinField spinField = new JSpinField();
								spinField.addPropertyChangeListener(new PropertyChangeListener() {
									public void propertyChange(PropertyChangeEvent evt) {
										try {
											if (evt.getPropertyName().equals("value")) {
												writeMethod.invoke(currentBean, new Object[] { evt
														.getNewValue() });
											}
										} catch (Exception e) {
										}
									}
								});

								try {
									Integer integerObj = ((Integer) readMethod.invoke(bean, null));
									spinField.setValue(integerObj.intValue());
								} catch (Exception e) {
									e.printStackTrace();
								}

								addProperty(propertyDescriptors[i], spinField, gridbag);
								count += 1;
							} else if ("class java.lang.String".equals(type)) {
								String string = "";

								try {
									string = ((String) readMethod.invoke(bean, null));
								} catch (Exception e) {
									e.printStackTrace();
								}

								JTextField textField = new JTextField(string);
								ActionListener actionListener = new ActionListener() {
									public void actionPerformed(ActionEvent e) {
										try {
											writeMethod.invoke(currentBean, new Object[] { e
													.getActionCommand() });
										} catch (Exception ex) {
										}
									}
								};

								textField.addActionListener(actionListener);

								addProperty(propertyDescriptors[i], textField, gridbag);
								count += 1;
							} else if ("class java.util.Locale".equals(type)) {
								JLocaleChooser localeChooser = new JLocaleChooser(bean);
								localeChooser.setPreferredSize(new Dimension(200, localeChooser
										.getPreferredSize().height));
								addProperty(propertyDescriptors[i], localeChooser, gridbag);
								count += 1;
							} else if ("class java.util.Date".equals(type)) {
								Date date = null;

								try {
									date = ((Date) readMethod.invoke(bean, null));
								} catch (Exception e) {
									e.printStackTrace();
								}

								JDateChooser dateChooser = new JDateChooser(date);

								dateChooser.addPropertyChangeListener(new PropertyChangeListener() {
									public void propertyChange(PropertyChangeEvent evt) {
										try {
											if (evt.getPropertyName().equals("date")) {
												writeMethod.invoke(currentBean, new Object[] { evt
														.getNewValue() });
											}
										} catch (Exception e) {
										}
									}
								});

								addProperty(propertyDescriptors[i], dateChooser, gridbag);
								count += 1;
							} else if ("class java.awt.Color".equals(type)) {
								final JButton button = new JButton();

								try {
									final Color colorObj = ((Color) readMethod.invoke(bean, null));
									button.setText("...");
									button.setBackground(colorObj);

									ActionListener actionListener = new ActionListener() {
										public void actionPerformed(ActionEvent e) {
											Color newColor = JColorChooser.showDialog(
													JCalendarDemo.this, "Choose Color", colorObj);
											button.setBackground(newColor);

											try {
												writeMethod.invoke(currentBean,
														new Object[] { newColor });
											} catch (Exception e1) {
												e1.printStackTrace();
											}
										}
									};

									button.addActionListener(actionListener);
								} catch (Exception e) {
									e.printStackTrace();
								}

								addProperty(propertyDescriptors[i], button, gridbag);
								count += 1;
							}
						}
					}
				}
			}

			URL iconURL = bean.getClass().getResource("images/" + bean.getName() + "Color16.gif");
			ImageIcon icon = new ImageIcon(iconURL);

			componentTitlePanel.setTitle(bean.getName(), icon);
			bean.invalidate();
			propertyPanel.invalidate();
			componentPanel.invalidate();
			componentPanel.repaint();
		} catch (IntrospectionException e) {
			e.printStackTrace();
		}
	}
566038
public void deleteComponent(String componentName) throws IOException {
    String path = RegistryUtils.componentPath(
        user, jstormServiceClass, instanceName,
        componentName);
    registryOperations.delete(path, false);
  }
601334
public static void addTo(
        JTabbedPane tabbedPane, String title, JComponent component)
    {
        addTo(tabbedPane, title, component, false);
    }
956212
public void setComponentConstraints(JComponent component)
    {
        GridBagConstraints c = this.getGBConstraints();
        GridBagLayout gridbag = (GridBagLayout)this.getScreenLayout();
        gridbag.setConstraints(component, c);
        
        Application application = BaseApplet.getSharedInstance().getApplication();
        MuffinManager muffinManager = application.getMuffinManager();
        if (component instanceof JTextComponent)
            if (muffinManager != null)
        {
            muffinManager.replaceClipboardAction(component, "cut");
            muffinManager.replaceClipboardAction(component, "copy");
            muffinManager.replaceClipboardAction(component, "paste");
        }        
    }
239583
@SuppressWarnings("unchecked")
	public synchronized <T> void install(Class<T> component) {
		Preconditions.checkArgument(component != null, 
				"Parameter 'component' must not be [" + component + "]");
		
		if (installed(component)) {
			logger.debug("Installation ignored: Component [" + component + "] has already been installed");
			return;
		}
		
		int modifiers = component.getModifiers();
		
		if (component.isInterface() || Modifier.isAbstract(modifiers) || !Modifier.isPublic(modifiers)) {
			logger.warn("Interface, abstract and non-public class cannot be installed: " 
					+ "Component [" + component + "]");
			return;
		}
		
		try {
			Descriptor<T> descriptor = new Descriptor<T>(component);
			List<Class<?>> classes = Collections.emptyList();
			
			if (Provider.class.isAssignableFrom(component)) {
				for (Type type : component.getGenericInterfaces()) {
					if ((type instanceof ParameterizedType) && ((ParameterizedType) type).getRawType().equals(Provider.class)) {
						Type t = ((ParameterizedType) type).getActualTypeArguments()[0];
						Class<?> clazz = (Class<?>) ((t instanceof ParameterizedType) ? ((ParameterizedType) t).getRawType() : t);
						classes = (List<Class<?>>) ClassUtils.getAllInterfaces(clazz);
						classes.addAll(ClassUtils.getAllSuperclasses(clazz));
						classes.add(clazz);
					}
				}
				
			} else {
				classes = (List<Class<?>>) ClassUtils.getAllInterfaces(component);
				classes.addAll(ClassUtils.getAllSuperclasses(component));
				classes.add(component);
			}
			
			classes.remove(Object.class);
			ListMultimap<Class<?>, Descriptor<?>> components = ArrayListMultimap.create();
			
			for (Class<?> type : classes) {
				components.put(type, descriptor);
			}
			
			ListMultimap<Annotation, Descriptor<?>> pointcuts = ArrayListMultimap.create();
			
			if (descriptor.aspect()) {
				for (Annotation pointcut : descriptor.pointcuts()) {
					pointcuts.put(pointcut, descriptor);
				}
			}
			
			Annotation scope = descriptor.scope();
			Class<? extends Annotation> s = (scope == null) ? Prototype.class : scope.annotationType();
			
			if (s.equals(Singleton.class) && ((Singleton) descriptor.scope()).eager()) {
				component(descriptor);
			}
			
			installed.add(component);
			this.components.putAll(components);
			this.pointcuts.putAll(pointcuts);
			logger.info("Component has been installed: Provider descriptor [" + descriptor + "]");
		} catch (Exception e) {
			logger.warn("Component cannot be installed: Provider type [" + component + "]", e);
			return;
		}
	}
1304938
public function apply(ComponentInterface $component)
    {
        /**
         * isRootOfCustomizations property used in TargetSelector
         * @see TargetSelector::checkRootCondition
         */
        $component->isRootOfCustomizations = true;
        parent::apply($component);
        unset($component->isRootOfCustomizations);
    }
464644
public synchronized void addComponent(ComponentEvent event)
    {
        try
        {
            if(log.isDebugEnabled())log.debug("Component added "+event);
            Object o=event.getComponent();
            
            ModelMBean mbean=ModelMBeanImpl.mbeanFor(o);
            if (mbean==null)
                log.warn("No MBean for "+o);
            else
            {
                ObjectName oName=null;
                if (mbean instanceof ModelMBeanImpl)
                {
                    ((ModelMBeanImpl)mbean).setBaseObjectName(getObjectName().toString());
                    oName=
                        getMBeanServer().registerMBean(mbean,null).getObjectName();
                }
                else
                {
                    oName=uniqueObjectName(getMBeanServer(),
                                           o,
                                           getObjectName().toString());
                    oName=getMBeanServer().registerMBean(mbean,oName)
                        .getObjectName();
                }
                Holder holder = new Holder(oName,mbean);
                _mbeanMap.put(o,holder);
            }
        }
        catch(Exception e)
        {
            log.warn(LogSupport.EXCEPTION,e);
        }
    }
1025505
protected function injectDependencies($component)
    {
        if ($component instanceof StorageStackAwareInterface) {
            $component->setStorageStack($this->stack);
        }

        if ($component instanceof LoggerAwareInterface && $this->logger instanceof LoggerInterface) {
            $component->setLogger($this->logger);
        }
    }
91530
protected void onAfterRender(final Component component) {
		final Response response = component.getResponse();
		response.write(onWriteAfterRender());
	}
905714
protected void stop(MoleculerComponent component) {
		if (component == null) {
			return;
		}
		try {
			component.stopped();
			logger.info(nameOf(component, true) + " stopped.");
		} catch (Exception cause) {
			logger.warn("Unable to stop component!", cause);
		}
	}