Exemplo n.º 1
0
  /** Return all the components with the designated nameID */
  public final int getComponentsByNameID(
      final int _nameID, final ArrayList<Component> _components) {
    for (Component component : components) {
      if (component.isNameID(_nameID) == true) {
        _components.add(component);
      }
    }

    return _components.size();
  }
Exemplo n.º 2
0
  /**
   * Get a Component with the designated name. If there is more than one component with that name,
   * then it will return the first one it finds.
   */
  public final Component getComponentByNameID(final int _nameID) {
    final int size = components.size();
    Component component = null;

    for (int i = 0; i < size; ++i) {
      component = components.get(i);
      if (component.isNameID(_nameID) == true) {
        return component;
      }
    }

    return null;
  }