Calculates the width required by the layout components.<p>

@param items the layout

@return the width
488627
private int estimateRequiredWidth(AbstractOrderedLayout items) {

        int result = 0;
        if (items != null) {
            for (Component comp : items) {
                if (comp == m_foldedButtonsMenu) {
                    continue;
                } else if ((comp instanceof Button) || (comp instanceof PopupView) || (comp instanceof MenuBar)) {
                    // assume all buttons have a with of 50px
                    result += 50;
                } else if (comp == m_appIndicator) {
                    // assume app indicator requires 150px
                    result += 50;
                } else {
                    float compWidth = comp.getWidth();
                    if ((compWidth > 0) && (comp.getWidthUnits() == Unit.PIXELS)) {
                        // also add 10px margin
                        result += compWidth + 10;
                    } else {
                        result += 200;
                    }
                }
            }
        }
        return result;
    }
94538
public final void setWidth(String width) {
        this.width = width;
        this.dynamicWidth = width != null && width.contains("%");
    }
256523
public int getWidth(ViewNode node) {
		int width = node.getDepth();
		ViewNode children[] = node.findChildren();
		for (int i = 0; i < children.length; i++) {
			int current = getWidth(children[i]);
			if (current > width)
				width = current;
		}
		return (width);
	}
1238169
protected double getWidth (Rectangle2D laybounds)
    {
        double width = Math.max(laybounds.getX(), 0) + laybounds.getWidth();
        if ((_style & OUTLINE) != 0) {
            width += 2;
        } else if ((_style & SHADOW) != 0) {
            width += 1;
        } else if ((_style & BOLD) != 0) {
            width += 1;
        }
        return width;
    }
860432
public int[] colWidths() {
        int cols = columnCount();
        int[] widths = new int[cols];

        for (int i = 0; i < columnCount(); i++) {
            widths[i] = columns().get(i).columnWidth();
        }
        return widths;
    }
805165
@Override
  public int width() {
    return calledNextStartPosition ? (noMorePositions ? 0
        : spans1.spans.endPosition() - spans1.spans.startPosition()) : 0;
  }
485723
public boolean addAll(DoubleArray items) {
    ensureCapacity(size + items.size);
    for (int i = 0; i < items.size; i++) {
      elements[size++] = items.elements[i];
    }
    return items.size > 0;
  }
326216
public static <T> T max(T[] items) {
        return max((Iterable<T>)Arrays.asList(items));
    }
1153219
private List<Integer> getColumnMaxWidths() {
    int numCols = data.get(0).size();
    int[] widths = new int[numCols];

    if (this.labels != null) {
      for (int i=0; i<numCols; i++) {
        widths[i] = this.labels.get(i).length();
      }
    }

    for (List<String> row : this.data) {
      for (int i=0;i<row.size(); i++) {
        if (row.get(i) == null) {
          widths[i] = Math.max(widths[i], 4);
        } else {
          widths[i] = Math.max(widths[i], row.get(i).length());
        }
      }
    }

    return Ints.asList(widths);
  }
256160
public static List<Item> toItemList(List<Map<String, AttributeValue>> items) {
        if (items == null) {
            return Collections.emptyList();
        }
        List<Item> result = new ArrayList<Item>(items.size());
        for (Map<String, AttributeValue> item : items) {
            result.add(toItem(item));
        }
        return result;
    }
351611
public static int eepromSizeForItem(MenuItem item) {
        return MenuItemHelper.visitWithResult(item, new AbstractMenuItemVisitor<Integer>() {
            @Override
            public void visit(AnalogMenuItem item) {
                setResult(2);
            }

            @Override
            public void visit(BooleanMenuItem item) {
                setResult(1);
            }

            @Override
            public void visit(EnumMenuItem item) {
                setResult(2);
            }

            @Override
            public void visit(TextMenuItem item) {
                setResult(item.getTextLength());
            }

            @Override
            public void anyItem(MenuItem item) {
                setResult(0);
            }
        }).orElse(0);
    }
1170694
function( splitter ) {
		var items = this._getItemsForSplitter( splitter ),
			minSize = this.layoutManager.config.dimensions[ this._isColumn ? 'minItemHeight' : 'minItemWidth' ];

		var beforeMinDim = this._getMinimumDimensions( items.before.config.content );
		var beforeMinSize = this._isColumn ? beforeMinDim.vertical : beforeMinDim.horizontal;

		var afterMinDim = this._getMinimumDimensions( items.after.config.content );
		var afterMinSize = this._isColumn ? afterMinDim.vertical : afterMinDim.horizontal;

		this._splitterPosition = 0;
		this._splitterMinPosition = -1 * ( items.before.element[ this._dimension ]() - (beforeMinSize || minSize) );
		this._splitterMaxPosition = items.after.element[ this._dimension ]() - (afterMinSize || minSize);
	}
916358
def centerOnItems(self, items = None):
        
        if not items:
            rect = self.scene().visibleItemsBoundingRect()
            if not rect.width():
                rect = self.scene().sceneRect()
            
            self.centerOn(rect.center())
        else:
            self.centerOn(self.scene().calculateBoundingRect(items).center())
1144163
public void setItems(java.util.Collection<Resource> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<Resource>(items);
    }
827185
def OnMeasureItemWidth(self, item):
        """"""

        item_name = self.GetItems()[item]
        return icons[item_name].GetWidth()
950130
public void setItems(java.util.Collection<RequestValidator> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<RequestValidator>(items);
    }
1272408
public final void setWidth(final int width) {
        if (style == Style.LIST_COLUMNS && (getDeviceType(context) == DeviceType.TABLET ||
                getOrientation(context) == Orientation.LANDSCAPE)) {
            columnCount = 2;
        } else if (style == Style.GRID) {
            int padding = context.getResources()
                    .getDimensionPixelSize(R.dimen.bottom_sheet_grid_item_horizontal_padding);
            int itemSize = context.getResources()
                    .getDimensionPixelSize(R.dimen.bottom_sheet_grid_item_size);
            columnCount = ((getDeviceType(context) != DeviceType.TABLET &&
                    context.getResources().getConfiguration().orientation ==
                            Configuration.ORIENTATION_PORTRAIT ?
                    context.getResources().getDisplayMetrics().widthPixels : width) - 2 * padding) /
                    itemSize;
        } else {
            columnCount = 1;
        }

        rawItems = null;
        notifyDataSetChanged();
    }