DEPRECATED 

 Combobox Helpers, now separate component, like grid
517933
def select_combobox(values, combo_label)
      warn "[DEPRECATED] use netzke_find('#{combo_label}', 'combobox').select_values(values)"
      run_js <<-JS
      var values = #{values.split(/,\s*/)};
      #{ext_combo(combo_label)}

      var arr = new Array();
      for(var i=0; i < values.length; i++) {
        arr[i] = combo.findRecordByDisplay(values[i]);
      }
      combo.select(arr);
      if (combo.isExpanded) {
        combo.onTriggerClick();
        return true;
      };
    JS
    end
693380
function Grid(props) {
  const grid = new contrib.grid({...props, screen: { append: () => {} }});
  const children = props.children instanceof Array ? props.children : [props.children];
  return React.createElement(props.component || 'element', {}, children.map((child, key) => {
    const props = child.props;
    const options = grid.set(props.row, props.col, props.rowSpan || 1, props.colSpan || 1, x => x, props.options);
    options.key = key;
    return React.cloneElement(child, options);
  }));
}
557341
def combobox_activated(self):
        """"""
        sender = self.sender()
        data = sender.itemData(sender.currentIndex())

        if isinstance(data, FoldScopeHelper):
            self.editor.go_to_line(data.line + 1)
538976
def define_simple_grid_template(self, template_id, nrows, ncols):
        """"""
        template = GridTemplate(template_id, nrows, ncols)
        [template.define_frame('%s,%s' % (i, j), template[i, j]) for i in range(nrows) for j in range(ncols)]
        template.register(self)
        return self
817724
public static void prepareComboBox(ComboBox box, Map<?, String> options) {

        IndexedContainer container = new IndexedContainer();
        container.addContainerProperty(PROPERTY_VALUE, Object.class, null);
        container.addContainerProperty(PROPERTY_LABEL, String.class, "");
        for (Entry<?, String> entry : options.entrySet()) {
            Item item = container.addItem(entry.getKey());
            item.getItemProperty(PROPERTY_VALUE).setValue(entry.getKey());
            item.getItemProperty(PROPERTY_LABEL).setValue(entry.getValue());
        }
        box.setContainerDataSource(container);
        box.setItemCaptionPropertyId(PROPERTY_LABEL);
    }
670211
function SingleLineGridList() {
  const classes = useStyles();

  return (
    <div className={classes.root}>
      <GridList className={classes.gridList} cols={2.5}>
        {tileData.map(tile => (
          <GridListTile key={tile.img}>
            <img src={tile.img} alt={tile.title} />
            <GridListTileBar
              title={tile.title}
              classes={{
                root: classes.titleBar,
                title: classes.title,
              }}
              actionIcon={
                <IconButton>
                  <StarBorderIcon className={classes.title} />
                </IconButton>
              }
            />
          </GridListTile>
        ))}
      </GridList>
    </div>
  );
}
674453
function handleRowColSelectionChange(rowOrCol) {
        var decoratorsField = ('_' + rowOrCol + 'SelectionClasses');
        model[decoratorsField].forEach(function (selectionDecorator) {
            grid.cellClasses.remove(selectionDecorator);
        });
        model[decoratorsField] = [];

        if (grid[rowOrCol + 'Model'].allSelected()) {
            var top = rowOrCol === 'row' ? Infinity : 0;
            var left = rowOrCol === 'col' ? Infinity : 0;
            var decorator = grid.cellClasses.create(top, left, 'selected', 1, 1, 'virtual');
            grid.cellClasses.add(decorator);
            model[decoratorsField].push(decorator);
        } else {
            grid[rowOrCol + 'Model'].getSelected().forEach(function (index) {
                var virtualIndex = grid[rowOrCol + 'Model'].toVirtual(index);
                var top = rowOrCol === 'row' ? virtualIndex : 0;
                var left = rowOrCol === 'col' ? virtualIndex : 0;
                var decorator = grid.cellClasses.create(top, left, 'selected', 1, 1, 'virtual');
                grid.cellClasses.add(decorator);
                model[decoratorsField].push(decorator);
            });
        }
    }
622228
def grid_widgets(self):
        """"""
        sticky = {"sticky": "nswe"}
        self.label.grid(row=1, column=1, columnspan=2, **sticky)
        self.dropdown.grid(row=2, column=1, **sticky)
        self.entry.grid(row=2, column=2, **sticky)
        self.button.grid(row=3, column=1, columnspan=2, **sticky)
        self.radio_one.grid(row=4, column=1, **sticky)
        self.radio_two.grid(row=4, column=2, **sticky)
        self.checked.grid(row=5, column=1, **sticky)
        self.unchecked.grid(row=5, column=2, **sticky)
        self.scroll.grid(row=1, column=3, rowspan=8, padx=5, **sticky)
        self.tree.grid(row=6, column=1, columnspan=2, **sticky)
        self.scale_entry.grid(row=7, column=1, columnspan=2, **sticky)
        self.combo.grid(row=8, column=1, columnspan=2, **sticky)
        self.progress.grid(row=9, column=1, columnspan=2, padx=5, pady=5, **sticky)
824791
function genComponentContextCode(component, componentIdInContext) {
    var code = ['var componentCtx = {'];

    // proto
    code.push('proto: ' + componentIdInContext + 'Proto,');

    // sourceSlots
    code.push('sourceSlots: sourceSlots,');

    // data
    var defaultData = component.data.get();
    code.push('data: data || ' + stringifier.any(defaultData) + ',');

    // parentCtx
    code.push('owner: parentCtx,');

    // slotRenderers
    code.push('slotRenderers: {}');

    code.push('};');

    return code.join('\n');
}
27790
private void replaceItems(Map<String, String> items) {

        String oldValue = m_selectBox.getFormValueAsString();
        //set value and option to the combo box.
        m_selectBox.setItems(items);
        if (items.containsKey(oldValue)) {
            m_selectBox.setFormValueAsString(oldValue);
        }
    }
437610
private void comboYActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboYActionPerformed
        JComboBox cb = (JComboBox)evt.getSource();
        int dim = cb.getSelectedIndex();
        streamPanel0.setActiveYDim(dim);
        streamPanel1.setActiveYDim(dim);
        if(visualizer!=null)
            visualizer.redraw();
    }
875450
function Dropdown(props) {
  const {
    children,
    isOpen,
    selectedItem,
    selectedItems,
    highlightedIndex,
    inputValue,
    onSelect,
    onStateChange,
    downshiftProps
  } = props;
  // Refs used to handle custom Garden keyboard nav
  const itemIndexRef = useRef(0);
  const previousItemRef = useRef(undefined);
  const previousIndexRef = useRef(undefined);
  const nextItemsHashRef = useRef({});

  // Used to inform Menu (Popper) that a full-width menu is needed
  const popperReferenceElementRef = useRef(null);

  /**
   * Add additional keyboard nav to the basics provided by Downshift
   **/
  const customGetInputProps = ({ onKeyDown, ...other }, downshift, rtl) => {
    return {
      onKeyDown: composeEventHandlers(onKeyDown, e => {
        const PREVIOUS_KEY = rtl ? KEY_CODES.RIGHT : KEY_CODES.LEFT;
        const NEXT_KEY = rtl ? KEY_CODES.LEFT : KEY_CODES.RIGHT;

        if (downshift.isOpen) {
          // Select highlighted item on TAB
          if (e.keyCode === KEY_CODES.TAB) {
            e.preventDefault();
            e.stopPropagation();

            downshift.selectHighlightedItem();
          }

          // Select previous item if available
          if (
            e.keyCode === PREVIOUS_KEY &&
            previousIndexRef.current !== null &&
            !downshift.inputValue
          ) {
            e.preventDefault();
            e.stopPropagation();

            downshift.selectItemAtIndex(previousIndexRef.current);
          }

          // Select current next item if available
          if (e.keyCode === NEXT_KEY) {
            const nextItemIndexes = Object.values(nextItemsHashRef.current);

            if (nextItemIndexes.includes(downshift.highlightedIndex)) {
              e.preventDefault();
              e.stopPropagation();

              downshift.selectItemAtIndex(downshift.highlightedIndex);
            }
          }
        } else if (
          (e.keyCode === KEY_CODES.ENTER || e.keyCode === KEY_CODES.SPACE) &&
          !downshift.isOpen
        ) {
          e.preventDefault();
          e.stopPropagation();

          downshift.openMenu();
        }
      }),
      ...other
    };
  };

  const transformDownshift = ({ getInputProps, getToggleButtonProps, ...downshift }) => {
    return {
      getInputProps: p => getInputProps(customGetInputProps(p, downshift, isRtl(props))),
      // The default aria-label provided by Downshift is invalid due to our DOM structure
      getToggleButtonProps: p => getToggleButtonProps({ 'aria-label': undefined, ...p }),
      ...downshift
    };
  };

  return (
    <Manager>
      <Downshift
        suppressRefError // https://github.com/downshift-js/downshift/issues/529 Allows us to provide props through context
        isOpen={isOpen}
        highlightedIndex={highlightedIndex}
        selectedItem={selectedItem || null} // Ensures that selectedItem never becomes controlled internally by Downshift
        inputValue={inputValue}
        onStateChange={(changes, stateAndHelpers) => {
          if (
            Object.prototype.hasOwnProperty.call(changes, 'selectedItem') &&
            changes.selectedItem !== null
          ) {
            if (selectedItems) {
              const { itemToString } = stateAndHelpers;
              const existingItemIndex = selectedItems.findIndex(item => {
                return itemToString(item) === itemToString(changes.selectedItem);
              });
              const updatedSelectedItems = Array.from(selectedItems);

              if (existingItemIndex === -1) {
                updatedSelectedItems.splice(updatedSelectedItems.length, 0, changes.selectedItem);
              } else {
                updatedSelectedItems.splice(existingItemIndex, 1);
              }

              /**
               * Customize the changes returned from `onStateChange` as
               * Downshift has no concept of a "multiselect".
               **/
              changes.selectedItems = updatedSelectedItems;
              delete changes.selectedItem;

              onSelect && onSelect(updatedSelectedItems, stateAndHelpers);
            } else {
              onSelect && onSelect(changes.selectedItem, stateAndHelpers);
            }
          }

          onStateChange && onStateChange(changes, stateAndHelpers);
        }}
        stateReducer={(_state, changes) => {
          /**
           * Set inputValue to an empty string during any event that updates the inputValue
           */
          switch (changes.type) {
            case Downshift.stateChangeTypes.controlledPropUpdatedSelectedItem:
            case Downshift.stateChangeTypes.mouseUp:
            case Downshift.stateChangeTypes.keyDownEnter:
            case Downshift.stateChangeTypes.clickItem:
            case Downshift.stateChangeTypes.clickButton:
            case Downshift.stateChangeTypes.keyDownSpaceButton:
            case Downshift.stateChangeTypes.blurButton:
              return {
                ...changes,
                inputValue: ''
              };
            default:
              return changes;
          }
        }}
        {...downshiftProps}
      >
        {downshift => (
          <DropdownContext.Provider
            value={{
              itemIndexRef,
              previousItemRef,
              previousIndexRef,
              nextItemsHashRef,
              popperReferenceElementRef,
              selectedItems,
              downshift: transformDownshift(downshift)
            }}
          >
            {children}
          </DropdownContext.Provider>
        )}
      </Downshift>
    </Manager>
  );
}
1250707
function Checkbox(props) {
  warnAboutDeprecatedProp(props.mods, 'mods', 'className');

  const {
    checked,
    children,
    className,
    dataAttrs = {},
    disabled,
    inputDataAttrs = {},
    name,
    onChange,
  } = props;

  const dataAttributes = getDataAttributes(dataAttrs);
  const inputDataAttributes = getDataAttributes(inputDataAttrs);
  const mods = props.mods ? props.mods.slice() : [];
  disabled && mods.push('is-disabled');
  const classNames = classnames(getClassNamesWithMods('ui-checkbox', mods), className);

  return (
    <label
      {...dataAttributes}
      className={classNames}
      htmlFor={name}
    >
      <input
        {...inputDataAttributes}
        aria-checked={checked}
        checked={checked}
        disabled={disabled}
        id={name}
        onChange={onChange}
        readOnly={!onChange}
        role="radio"
        type="checkbox"
      />
      <span className="ui-checkbox__text">
        {children}
      </span>
    </label>
  );
}
836191
def _grid_widgets(self):
        """"""
        scrollbar_column = 0 if self.__compound is tk.LEFT else 2
        self.listbox.grid(row=0, column=1, sticky="nswe")
        self.scrollbar.grid(row=0, column=scrollbar_column, sticky="ns")
466369
@Deprecated
    public static void markForDeletion(UIComponent component)
    {
        // flag this component as deleted
        component.getAttributes().put(MARK_DELETED, Boolean.TRUE);

        Iterator<UIComponent> iter = component.getFacetsAndChildren();
        while (iter.hasNext())
        {
            UIComponent child = iter.next();
            if (child.getAttributes().containsKey(MARK_CREATED))
            {
                child.getAttributes().put(MARK_DELETED, Boolean.TRUE);
            }
        }
    }
325323
@Deprecated
    public static UIComponent findParentForm(FacesContext context, UIComponent component) {
        return ComponentTraversalUtils.closestForm(context, component);
    }
1327143
function autoplaceGridItems (decl, result, gap, autoflowValue = 'row') {
  let { parent } = decl

  let rowDecl = parent.nodes.find(i => i.prop === 'grid-template-rows')
  let rows = normalizeRowColumn(rowDecl.value)
  let columns = normalizeRowColumn(decl.value)

  // Build array of area names with dummy values. If we have 3 columns and
  // 2 rows, filledRows will be equal to ['1 2 3', '4 5 6']
  let filledRows = rows.map((_, rowIndex) => {
    return Array.from({ length: columns.length }, (v, k) =>
      k + (rowIndex * columns.length) + 1).join(' ')
  })

  let areas = parseGridAreas({ rows: filledRows, gap })
  let keys = Object.keys(areas)
  let items = keys.map(i => areas[i])

  // Change the order of cells if grid-auto-flow value is 'column'
  if (autoflowValue.includes('column')) {
    items = items.sort((a, b) => a.column.start - b.column.start)
  }

  // Insert new rules
  items.reverse().forEach((item, index) => {
    let { column, row } = item
    let nodeSelector = parent.selectors.map(sel =>
      sel + ` > *:nth-child(${ keys.length - index })`).join(', ')

    // create new rule
    let node = parent.clone().removeAll()

    // change rule selector
    node.selector = nodeSelector

    // insert prefixed row/column values
    node.append({ prop: '-ms-grid-row', value: row.start })
    node.append({ prop: '-ms-grid-column', value: column.start })

    // insert rule
    parent.after(node)
  })

  return undefined
}