Returns the selected components in an array.
160095
public int[] getSelectedComponents ()
    {
        int[] values = new int[_selected.size()];
        Iterator<Integer> iter = _selected.values().iterator();
        for (int ii = 0; iter.hasNext(); ii++) {
            values[ii] = iter.next().intValue();
        }
        return values;
    }
95769
public Components getComponents() {
        if (this.components == null) {
            // This is idempotent, so no need to synchronize ...

            // Calculate how many seconds, and don't lose any information ...
            BigDecimal bigSeconds = new BigDecimal(this.durationInNanos).divide(new BigDecimal(1000000000));
            // Calculate the minutes, and round to lose the seconds
            int minutes = bigSeconds.intValue() / 60;
            // Remove the minutes from the seconds, to just have the remainder of seconds
            double dMinutes = minutes;
            double seconds = bigSeconds.doubleValue() - dMinutes * 60;
            // Now compute the number of full hours, and change 'minutes' to hold the remainding minutes
            int hours = minutes / 60;
            minutes = minutes - (hours * 60);
            this.components = new Components(hours, minutes, seconds);
        }
        return this.components;
    }
732104
public function componentsList()
    {
        $function = function () {

            $widgets = app('antares.widget')->make('menu.top.right')->items();

            if (!isset($widgets["ui-components-selector"])) {
                return [];
            }
            $childs = $widgets["ui-components-selector"]->childs;
            if (empty($childs)) {
                return [];
            }
            $disabled = Registry::get('ui-components.disabled');
            $viewed   = Registry::get('ui-components.viewed');

            foreach ($childs as $index => $child) {
                $classname = array_get($child->attributes, 'classname');
                if (!is_null($viewed) and ! $viewed->contains($classname)) {
                    unset($childs[$index]);
                }
                if (!is_null($disabled) and $disabled->contains($classname)) {
                    unset($childs[$index]);
                }
            }
            return $childs;
        };
        return new Twig_SimpleFunction(
                'components_list', $function
        );
    }
1152689
public function getComponents()
    {
        $components = [];

        foreach ($this->indexReverse[self::COMPONENT] as $index) {
            $components[] = $this->getChild($index);
        }

        return $components;
    }
1336812
def selected(self):
        
        selected = self._selected
        if len(self._selected) == 0 and self.required:
            # nothing has been selected yet BUT the component is required
            selected = self.defaults
        return selected
970030
function() {
                        var values = [],
                            children = this.element[0].childNodes;

                        can.each(children, function(child) {
                            if (child.selected && child.value) {
                                values.push(child.value);
                            }
                        });

                        return values;
                    }
1289529
public function getIndex ()
  {
    if (!isset($this->parent))
      throw new ComponentException($this, "The component is not attached to a parent.");
    if (!$this->parent->children)
      throw new ComponentException($this, "The parent component has no children.");

    return array_search ($this, $this->parent->children, true);
  }
615517
@Override
    public Set<Class<?>> getComponents() {
        Set<Class<?>> set = new HashSet<>();
        ClassLoader cl = Thread.currentThread().getContextClassLoader();

        Consumer<JsonArray> reader = array -> {
            if (array != null && array.size() > 0) {
                for (int i = 0; i < array.size(); i++) {
                    try {
                        set.add(cl.loadClass(array.getString(i)));
                    } catch (ClassNotFoundException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
        };

        JsonArray features = config.getJsonArray(CONFIG_FEATURES, null);
        JsonArray components = config.getJsonArray(CONFIG_COMPONENTS, null);

        reader.accept(features);
        reader.accept(components);

        return set;
    }
894729
def _selectionParameters(self, param):
        """"""
        components = param['selection']
        if len(components) == 0:
            return []
        # extract the selected component names
        editable_sets = []
        for comp in components:
            # all the keys (component names) for the auto details for components in selection
            details = comp.auto_details()
            editable_sets.append(set(details.keys()))
        editable_paramters = set.intersection(*editable_sets)
        # do not allow selecting of filename from here
        return list(editable_paramters)
1206702
def get_components(self):
        
        components = []
        for app_id in self.components:
            components.append(self.components[app_id])
        return components
27811
def selected_attributes(self):
        
        array = javabridge.call(self.jobject, "selectedAttributes", "()[I")
        if array is None:
            return None
        else:
            return javabridge.get_env().get_int_array_elements(array)
63357
def _get_selected_items(self):
        """"""
        selection = self.get_selection()
        if selection.get_mode() != gtk.SELECTION_MULTIPLE:
            raise AttributeError('selected_items only valid for '
                                 'select_multiple')
        model, selected_paths = selection.get_selected_rows()
        result = []
        for path in selected_paths:
            result.append(model[path][0])
        return result
62343
public static function &getComponents(): array
    {
        if (empty(self::$runtimeComponents)) {
            foreach (self::getAddons() as $addon) {
                self::$runtimeComponents = array_merge(self::$runtimeComponents, $addon->getComponents());
            }
        }
        
        return self::$runtimeComponents;
    }
443814
def componentSelection(self, comp):
        """"""
        # current row which is selected in auto parameters to all component selection to
        indexes = self.selectedIndexes()
        index = indexes[0]
        self.model().toggleSelection(index, comp)
1113706
function _getSelected(select) {
    const arr = [];

    _slice.call(select.options).map((el) => {
        if (el.selected) {
            arr.push(el.value);
        }
    });

    return arr;
}
638870
public List<T> getSelectedValues() {
        Object[] curVal = (Object[]) $(listbox.getElement()).val();

        List<T> selectedValues = new ArrayList<>();
        if (curVal == null || curVal.length < 1) {
            return selectedValues;
        }

        List<String> keyIndex = getValuesKeyIndex();
        for (Object val : curVal) {
            if (val instanceof String) {
                int selectedIndex = keyIndex.indexOf(val);
                if (selectedIndex != -1) {
                    selectedValues.add(values.get(selectedIndex));
                } else {
                    if (isTags() && val instanceof String) {
                        selectedValues.add((T) val);
                    }
                }
            }
        }
        return selectedValues;
    }
647131
function() {
      var results = [];
      _.each(this.relations, (constructor, key) => {
        if (this.has(key)) {
          var value = this.get(key);
          // Pull out component models
          if (value && value.type === 'Widget' && value.model) {
            value = value.model;
          }
          results.push(value);
        }
      });
      return results;
    }