Survey the components.
@param component The top-level parent.
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();
    }
995503
@Override
  public void componentResized(ComponentEvent e) {
    if (e.getComponent() == component) {
      double newRatio = getCurrentRatio();
      if (Math.abs(newRatio - activeRatio) > threshold) {
        activeRatio = newRatio;
        executeResize(newRatio);
      }
    }
  }
1334900
private void updateCustomComponentBounds()
    {
        if (customComponents == null)
        {
            return;
        }
        if (table == null)
        {
            return;
        }
        for (int i = 0; i < customComponents.size(); i++)
        {
            JComponent component = customComponents.get(i);
            Rectangle rect = getHeaderRect(i);
            rect.height = customComponentHeight;
            component.setBounds(rect);
        }
        revalidate();
    }
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);
		}
	}
9221
function Component(parent, context, id, scope) {
    this.parent = parent;
    this.context = context;
    this.id = id;
    this._scope = scope;
  }
316782
public void add(Component component, boolean addRelationships) {
        if (component != null) {
            if (!component.getContainer().equals(getContainer())) {
                throw new IllegalArgumentException("Only components belonging to " + container.getName() + " can be added to this view.");
            }

            addElement(component, addRelationships);
        }
    }
476026
public static void centerOnParent(Window window, Component parent) {
		if (parent == null || !parent.isShowing()) {
			// call our own centerOnScreen so we work around bug in
			// setLocationRelativeTo(null)
			centerOnScreen(window);
		}
		else {
			window.setLocationRelativeTo(parent);
		}
	}
4801
protected void visitChildren(ParentNode<? extends N> node) {
    List<? extends N> children = node.getChildren();
    int size = children.size();
    for (int i = 0; i < size; i++) {
      visit(children.get(i));
    }
  }
347852
public static synchronized void install(Class<?> component) {
		Preconditions.checkState(container != null, 
				"Cannot install component until Jaguar starts");
		if (!installed(component)) {
			container.install(component);
		}
	}
740019
public void updateAllComponents(final AbstractField<?> component) {

        allComponents.add(component);
        component.addValueChangeListener(new ChangeListener(component));
    }
1133035
function collectComponent(component) {
    var name = component.constructor.name;
    (components[name] || (components[name] = [])).push(component);
  }
1283699
@Override
    protected void processComponent(final Object component) {
        injectFields(component);
        if (component instanceof Initiated) {
            try {
                ((Initiated) component).initiate();
            } catch (final Exception exception) {
                throw new RuntimeException("Unable to initiate component: " + component, exception);
            }
        }
        if (component instanceof Destructible) {
            destructibles.add((Destructible) component);
        }
    }
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);
		}
	  }
	}
  }
879213
function (component) {
    var callbacks = this.callbacks;
    if (component.beforeStep) callbacks.beforeStep.push(component);
    if (component.step)       callbacks.step.push(component);
    if (component.afterStep)  callbacks.afterStep.push(component);
  }
235250
@Override
    public void componentResized(final ComponentEvent EVENT) {
        final Container PARENT = getParent();
        if ((PARENT != null) && (PARENT.getLayout() == null)) {
            setSize(getWidth(), getHeight());
        } else {
            //setSize(new Dimension(getWidth(), getHeight()));
            setPreferredSize(new Dimension(getWidth(), getHeight()));
        }

        calcInnerBounds();

        if (getWidth() >= getHeight()) {
            // Horizontal
            setOrientation(Orientation.HORIZONTAL);
            recreateLedImages(getInnerBounds().height);
            recreateUserLedImages(getInnerBounds().height);

            if (isLedOn()) {
                setCurrentLedImage(getLedImageOn());
            } else {
                setCurrentLedImage(getLedImageOff());
            }
            setLedPosition((getInnerBounds().width - 20.0 - 16.0) / getInnerBounds().width, 0.453271028);

            if (isUserLedOn()) {
                setCurrentUserLedImage(getUserLedImageOn());
            } else {
                setCurrentUserLedImage(getUserLedImageOff());
            }
            setUserLedPosition(18.0 / getInnerBounds().width, 0.453271028);
        } else {
            // Vertical
            setOrientation(Orientation.VERTICAL);
            recreateLedImages(getInnerBounds().width);
            recreateUserLedImages(getInnerBounds().width);

            if (isLedOn()) {
                setCurrentLedImage(getLedImageOn());
            } else {
                setCurrentLedImage(getLedImageOff());
            }
            setLedPosition(0.453271028, (20.0 / getInnerBounds().height));

            if (isUserLedOn()) {
                setCurrentUserLedImage(getUserLedImageOn());
            } else {
                setCurrentUserLedImage(getUserLedImageOff());
            }
            setUserLedPosition((getInnerBounds().width - 18.0 - 16.0) / getInnerBounds().width, 0.453271028);
        }
        getModel().setSize(getLocation().x, getLocation().y, getWidth(), getHeight());
        init(getInnerBounds().width, getInnerBounds().height);
        revalidate();
        //repaint();
    }
492704
@Override
    public void processComponent(String propertyName, JComponent component) {

        if (component instanceof JComboBox) {
            this.installSearchable((JComboBox) component);
        } else if (component instanceof JList) {
            this.installSearchable((JList) component);
        } else if (component instanceof JTable) {
            this.installSearchable((JTable) component);
        } else if (component instanceof JTextComponent) {
            this.installSearchable((JTextComponent) component);
        }
    }
654491
public void add(Collection<PluginComponent> components)
    {
        for(PluginComponent component : components)
            this.components.put(component.getId(), component);
    }