UICollectionViewDelegateFlowLayout
434568
def collectionView(_, layout: view_layout, sizeForItemAtIndexPath: index_path)
      if self.respond_to?(:size_at_index_path)
        self.size_at_index_path(index_path_to_section_index(index_path: index_path))
      elsif view_layout.itemSize
        view_layout.itemSize
      elsif view_layout.respond_to?(:estimatedItemSize) and view_layout.estimatedItemSize
        view_layout.estimatedItemSize
      else
        mp "Implement the size_at_index_path method in your PM::CollectionScreen or add item_size or estimated_item_size in the layout options to configure the size of your cells.", force_color: :yellow
      end
    end
825042
function getLayout(collection, name) {
  if (!name) return;
  if (collection instanceof Map) {
    for (const [key, view] of collection) {
      if (name === key) {
        return view;
      }
      if (!view.path) continue;
      if (!view.hasPath) {
        return getView(collection, name);
      }
      if (view.hasPath(name)) {
        return view;
      }
    }
    return;
  }

  for (const key of Object.keys(collection)) {
    const view = collection[key];
    if (name === key) {
      return view;
    }
    if (!view.path) continue;
    if (!view.hasPath) {
      return getView(collection, name);
    }
    if (view.hasPath(name)) {
      return view;
    }
  }
}
1283772
private synchronized void putDelegate(final List<Tasklet> tasklets, final VortexFutureDelegate delegate) {
    for (final Tasklet tasklet : tasklets) {
      taskletFutureMap.put(tasklet.getId(), delegate);
    }
  }
45023
private void defineLists(UIDefaults d) {
        String p = "List";

        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + ".opaque", Boolean.TRUE);

        d.put(p + ".background", d.get("seaGlassLightBackground"));
        d.put(p + ".dropLineColor", d.get("seaGlassFocus"));
        d.put(p + ".rendererUseListColors", Boolean.TRUE);
        d.put(p + ".rendererUseUIBorder", Boolean.TRUE);
        d.put(p + ".cellNoFocusBorder", new BorderUIResource(BorderFactory.createEmptyBorder(2, 5, 2, 5)));
        d.put(p + ".focusCellHighlightBorder",
              new BorderUIResource(new PainterBorder("Tree:TreeCell[Enabled+Focused].backgroundPainter",
                                                     new Insets(2, 5, 2, 5))));

        // TODO Why doesn't ColorUIResource work here?
        d.put(p + "[Selected].textForeground", Color.WHITE);
        d.put(p + "[Selected].textBackground", d.get("seaGlassSelection"));
        d.put(p + "[Disabled+Selected].textBackground", Color.WHITE);
        d.put(p + "[Disabled].textForeground", d.get("seaGlassDisabledText"));

        p = "List:\"List.cellRenderer\"";
        d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
        d.put(p + ".opaque", Boolean.TRUE);
        d.put(p + "[Disabled].textForeground", d.get("seaGlassDisabledText"));
        d.put(p + "[Disabled].background", d.get("seaGlassSelectionBackground"));
    }
1276758
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
    if (isInEditMode())
      super.onLayout(changed, left, top, right, bottom);
    else if (isDragViewAtTop()) {
      dragView.layout(left, top, right, transformer.getOriginalHeight());
      secondView.layout(left, transformer.getOriginalHeight(), right, bottom);
      ViewHelper.setY(dragView, top);
      ViewHelper.setY(secondView, transformer.getOriginalHeight());
    } else {
      secondView.layout(left, transformer.getOriginalHeight(), right, bottom);
    }
  }
854029
@Override
    public void layoutViews(RecyclerView.Recycler recycler, RecyclerView.State state,
                            VirtualLayoutManager.LayoutStateWrapper layoutState, LayoutChunkResult result,
                            LayoutManagerHelper helper) {
        // reach the end of this layout
        if (isOutOfRange(layoutState.getCurrentPosition())) {
            return;
        }
        int currentPosition = layoutState.getCurrentPosition();

        // find corresponding layout container
        View view = nextView(recycler, layoutState, helper, result);
        if (view == null) {
            return;
        }
        final boolean isOverLapMargin = helper.isEnableMarginOverLap();

        VirtualLayoutManager.LayoutParams params = (VirtualLayoutManager.LayoutParams) view.getLayoutParams();
        final boolean layoutInVertical = helper.getOrientation() == VERTICAL;

        int startSpace = 0, endSpace = 0, gap = 0;
        boolean isLayoutEnd = layoutState.getLayoutDirection() == VirtualLayoutManager.LayoutStateWrapper.LAYOUT_END;
        boolean isStartLine = isLayoutEnd
                ? currentPosition == getRange().getLower().intValue()
                : currentPosition == getRange().getUpper().intValue();
        boolean isEndLine = isLayoutEnd
                ? currentPosition == getRange().getUpper().intValue()
                : currentPosition == getRange().getLower().intValue();

        if (isStartLine) {
            startSpace = computeStartSpace(helper, layoutInVertical, isLayoutEnd, isOverLapMargin);
        }

        if (isEndLine) {
            endSpace = computeEndSpace(helper, layoutInVertical, isLayoutEnd, isOverLapMargin);
        }

        if (!isStartLine) {
            if (!isOverLapMargin) {
                gap = mLayoutWithAnchor ? 0 : mDividerHeight;
            } else {
                //TODO check layout with anchor
                if (isLayoutEnd) {
                    int marginTop = params.topMargin;
                    View sibling = helper.findViewByPosition(currentPosition - 1);
                    int lastMarginBottom = sibling != null ? ((LayoutParams) sibling.getLayoutParams()).bottomMargin : 0;
                    if (lastMarginBottom >= 0 && marginTop >= 0) {
                        gap = Math.max(lastMarginBottom, marginTop);
                    } else {
                        gap = lastMarginBottom + marginTop;
                    }
                } else {
                    int marginBottom = params.bottomMargin;
                    View sibling = helper.findViewByPosition(currentPosition + 1);
                    int lastMarginTop = sibling != null ? ((LayoutParams) sibling.getLayoutParams()).topMargin : 0;
                    if (marginBottom >= 0 && lastMarginTop >= 0) {
                        gap = Math.max(marginBottom, lastMarginTop);
                    } else {
                        gap = marginBottom + lastMarginTop;
                    }
                }
            }
        }

        final int widthSize = helper.getContentWidth() - helper.getPaddingLeft() - helper
                .getPaddingRight() - getHorizontalMargin() - getHorizontalPadding();
        int widthSpec = helper.getChildMeasureSpec(widthSize, params.width, !layoutInVertical);
        int heightSpec;
        float viewAspectRatio = params.mAspectRatio;
        if (!Float.isNaN(viewAspectRatio) && viewAspectRatio > 0) {
            heightSpec = View.MeasureSpec.makeMeasureSpec((int) (widthSize / viewAspectRatio + 0.5f),
                    View.MeasureSpec.EXACTLY);
        } else if (!Float.isNaN(mAspectRatio) && mAspectRatio > 0) {
            heightSpec = View.MeasureSpec.makeMeasureSpec((int) (widthSize / mAspectRatio + 0.5),
                    View.MeasureSpec.EXACTLY);
        } else {
            heightSpec = helper.getChildMeasureSpec(
                    helper.getContentHeight() - helper.getPaddingTop() - helper.getPaddingBottom()
                            - getVerticalMargin() - getVerticalPadding(), params.height,
                    layoutInVertical);
        }

        if (!isOverLapMargin) {
            helper.measureChildWithMargins(view, widthSpec, heightSpec);
        } else {
            helper.measureChild(view, widthSpec, heightSpec);
        }

        OrientationHelperEx orientationHelper = helper.getMainOrientationHelper();
        result.mConsumed = orientationHelper.getDecoratedMeasurement(view) + startSpace + endSpace + gap;
        int left, top, right, bottom;
        if (helper.getOrientation() == VERTICAL) {
            // not support RTL now
            if (helper.isDoLayoutRTL()) {
                right = helper.getContentWidth() - helper.getPaddingRight() - mMarginRight - mPaddingRight;
                left = right - orientationHelper.getDecoratedMeasurementInOther(view);
            } else {
                left = helper.getPaddingLeft() + mMarginLeft + mPaddingLeft;
                right = left + orientationHelper.getDecoratedMeasurementInOther(view);
            }

            // whether this layout pass is layout to start or to end
            if (layoutState.getLayoutDirection() == VirtualLayoutManager.LayoutStateWrapper.LAYOUT_START) {
                // fill start, from bottom to top
                bottom = layoutState.getOffset() - startSpace - (isStartLine ? 0 : gap);
                top = bottom - orientationHelper.getDecoratedMeasurement(view);
            } else {
                // fill end, from top to bottom
                top = layoutState.getOffset() + startSpace + (isStartLine ? 0 : gap);
                bottom = top + orientationHelper.getDecoratedMeasurement(view);
            }
        } else {
            top = helper.getPaddingTop() + mMarginTop + mPaddingTop;
            bottom = top + orientationHelper.getDecoratedMeasurementInOther(view);

            if (layoutState.getLayoutDirection() == VirtualLayoutManager.LayoutStateWrapper.LAYOUT_START) {
                // fill left, from right to left
                right = layoutState.getOffset() - startSpace - (isStartLine ? 0 : gap);
                left = right - orientationHelper.getDecoratedMeasurement(view);
            } else {
                // fill right, from left to right
                left = layoutState.getOffset() + startSpace + (isStartLine ? 0 : gap);
                right = left + orientationHelper.getDecoratedMeasurement(view);
            }
        }
        // We calculate everything with View's bounding box (which includes decor and margins)
        // To calculate correct layout position, we subtract margins.
        layoutChildWithMargin(view, left, top, right, bottom, helper);

        if (DEBUG) {
            Log.d(TAG, "laid out child at position " + helper.getPosition(view) + ", with l:"
                    + (left + params.leftMargin) + ", t:" + (top + params.topMargin) + ", r:"
                    + (right - params.rightMargin) + ", b:" + (bottom - params.bottomMargin));
        }

        handleStateOnResult(result, view);
        mLayoutWithAnchor = false;
    }
289864
@PostConstruct
    public void init() {
        Objects.requireNonNull(context, "context");
        FlowHandler contentFlowHandler = (FlowHandler) context.getRegisteredObject("ContentFlowHandler");
        sideList.propagateMouseEventsToParent();
        sideList.getSelectionModel().selectedItemProperty().addListener((o, oldVal, newVal) -> {
            new Thread(()->{
                Platform.runLater(()->{
                    if (newVal != null) {
                        try {
                            contentFlowHandler.handle(newVal.getId());
                        } catch (VetoException exc) {
                            exc.printStackTrace();
                        } catch (FlowException exc) {
                            exc.printStackTrace();
                        }
                    }
                });
            }).start();
        });
        Flow contentFlow = (Flow) context.getRegisteredObject("ContentFlow");
        bindNodeToController(button, ButtonController.class, contentFlow, contentFlowHandler);
        bindNodeToController(checkbox, CheckboxController.class, contentFlow, contentFlowHandler);
        bindNodeToController(combobox, ComboBoxController.class, contentFlow, contentFlowHandler);
        bindNodeToController(dialogs, DialogController.class, contentFlow, contentFlowHandler);
        bindNodeToController(icons, IconsController.class, contentFlow, contentFlowHandler);
        bindNodeToController(listview, ListViewController.class, contentFlow, contentFlowHandler);
        bindNodeToController(treetableview, TreeTableViewController.class, contentFlow, contentFlowHandler);
        bindNodeToController(progressbar, ProgressBarController.class, contentFlow, contentFlowHandler);
        bindNodeToController(radiobutton, RadioButtonController.class, contentFlow, contentFlowHandler);
        bindNodeToController(slider, SliderController.class, contentFlow, contentFlowHandler);
        bindNodeToController(spinner, SpinnerController.class, contentFlow, contentFlowHandler);
        bindNodeToController(textfield, TextFieldController.class, contentFlow, contentFlowHandler);
        bindNodeToController(highlighter, HighlighterController.class, contentFlow, contentFlowHandler);
        bindNodeToController(chipview, ChipViewController.class, contentFlow, contentFlowHandler);
        bindNodeToController(togglebutton, ToggleButtonController.class, contentFlow, contentFlowHandler);
        bindNodeToController(popup, PopupController.class, contentFlow, contentFlowHandler);
        bindNodeToController(svgLoader, SVGLoaderController.class, contentFlow, contentFlowHandler);
        bindNodeToController(pickers, PickersController.class, contentFlow, contentFlowHandler);
        bindNodeToController(masonry, MasonryPaneController.class, contentFlow, contentFlowHandler);
        bindNodeToController(scrollpane, ScrollPaneController.class, contentFlow, contentFlowHandler);
        bindNodeToController(nodesList, NodesListController.class, contentFlow, contentFlowHandler);
    }
642379
private CommonTree render(TokenStream tokens, CommonTree tree, QueryRendererDelegate rendererDelegate) throws RecognitionException {
      CommonTreeNodeStream treeNodeStream = new CommonTreeNodeStream(tree);
      treeNodeStream.setTokenStream(tokens);
      return (CommonTree) new QueryRenderer(treeNodeStream, rendererDelegate).statement().getTree();
   }
227083
function (options) {
            var collections = {};

            if (_.size(this.collections)) {
                for (var i = 0; i < this.collections.length; i++) {
                    collections[this.collections[i]] = options.ctl.ctx.collections[this.collections[i]];
                    if (!collections[this.collections[i]]) {
                        throw new Error('Could not resolve collection ' + this.collections[i] + ' for collection view ' + options.name);
                    }
                }
                this.collections = collections;
            } else if (_.isString(this.collection)) {
                this.collection = options.ctl.ctx.collections[this.collection];
                if (!this.collection) {
                    throw new Error('Could not resolve collection ' + this.collection + ' for collection view ' + options.name);
                }
            } else {
                throw new Error('No collection associated with collection view ' + options.name);
            }
            flexo.CollectionView.call(this, options);
        }
126463
public static void leaveDelegate(DelegateExecution delegateExecution,
                                     String sequenceFlowId) {
        String processDefinitionId = delegateExecution.getProcessDefinitionId();
        Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
        FlowElement flowElement = process.getFlowElement(sequenceFlowId);
        if (flowElement instanceof SequenceFlow) {
            delegateExecution.setCurrentFlowElement(flowElement);
            Context.getAgenda().planTakeOutgoingSequenceFlowsOperation((ExecutionEntity) delegateExecution,
                                                                       false);
        } else {
            throw new ActivitiException(sequenceFlowId + " does not match a sequence flow");
        }
    }
1236118
private void drawDividerDrawable(Canvas c, RecyclerView parent) {
        int headersCount = 0;
        int footerCount = 0;
        int itemViewCount;

        FamiliarRecyclerView curFamiliarRecyclerView = null;
        if (parent instanceof FamiliarRecyclerView) {
            curFamiliarRecyclerView = (FamiliarRecyclerView) parent;
            headersCount = curFamiliarRecyclerView.getHeaderViewsCount();
            footerCount = curFamiliarRecyclerView.getFooterViewsCount();
            itemViewCount = curFamiliarRecyclerView.getAdapter().getItemCount() - headersCount - footerCount;
        } else {
            itemViewCount = parent.getAdapter().getItemCount();
        }

        final int parentLeft = parent.getPaddingLeft();
        final int parentRight = parent.getWidth() - parent.getPaddingRight();
        final int parentTop = parent.getPaddingTop();
        final int parentBottom = parent.getHeight() - parent.getPaddingBottom();
        boolean isGridItemLayoutLastRow, isGridItemLayoutFirstRow, isGridItemLayoutLastColumn;
        boolean isGridLayoutLastNum = false;

        for (int i = 0; i < parent.getChildCount(); i++) {
            View childView = parent.getChildAt(i);
            RecyclerView.LayoutParams childViewParams = (RecyclerView.LayoutParams) childView.getLayoutParams();
            int position = childViewParams.getViewAdapterPosition();

            // intercept filter
            if (position < 0 || isInterceptFilter(position, headersCount, footerCount, itemViewCount)) {
                continue;
            }

            if (mLayoutManagerType == FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_LINEAR
                    && (!isHeaderDividersEnabled || headersCount == 0) && position - headersCount == 0) {
                continue;
            }

            int traX = (int) (childView.getTranslationX());
            int traY = (int) (childView.getTranslationY());

            boolean isEmptyView = isEmptyView(curFamiliarRecyclerView, position, headersCount);

            // head or footer or empty
            if (isHeadViewPos(headersCount, position) || isFooterViewPos(headersCount, footerCount, itemViewCount, position) || isEmptyView) {
                if (isEmptyView && (!isHeaderDividersEnabled || headersCount == 0)) {
                    continue;
                }

                if (mOrientation == OrientationHelper.HORIZONTAL) {
                    final int left = childView.getLeft() - childViewParams.leftMargin - mVerticalDividerDrawableHeight;
                    final int right = left + mVerticalDividerDrawableHeight;
                    mVerticalDividerDrawable.setBounds(left + traX, parentTop + traY, right + traX, parentBottom + traY);
                    mVerticalDividerDrawable.draw(c);
                } else {
                    final int top = childView.getTop() - childViewParams.topMargin - mHorizontalDividerDrawableHeight;
                    final int bottom = top + mHorizontalDividerDrawableHeight;
                    mHorizontalDividerDrawable.setBounds(parentLeft + traX, top + traY, parentRight + traX, bottom + traY);
                    mHorizontalDividerDrawable.draw(c);
                }
                continue;
            }

            boolean isHeaderView = position - headersCount <= 0;
            switch (mLayoutManagerType) {
                case FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_LINEAR:
                    // LinearLayoutManager
                    if (mOrientation == OrientationHelper.VERTICAL) {
                        int left = parentLeft;
                        int right = parentRight;
                        if (mItemViewBothSidesMargin > 0 && position - headersCount > 0) {
                            left += mItemViewBothSidesMargin;
                            right -= mItemViewBothSidesMargin;
                        }
                        final int top = childView.getTop() - childViewParams.topMargin - mHorizontalDividerDrawableHeight;
                        final int bottom = top + mHorizontalDividerDrawableHeight;
                        int tempLeftMargin = isHeaderView ? 0 : mHorizontalDividerLeftMargin;
                        int tempRightMargin = isHeaderView ? 0 : mHorizontalDividerRightMargin;
                        mHorizontalDividerDrawable.setBounds(left + traX + tempLeftMargin, top + traY, right + traX - tempRightMargin, bottom + traY);
                        mHorizontalDividerDrawable.draw(c);
                    } else {
                        int top = parentTop;
                        int bottom = parentBottom;
                        if (mItemViewBothSidesMargin > 0 && position - headersCount > 0) {
                            top += mItemViewBothSidesMargin;
                            bottom -= mItemViewBothSidesMargin;
                        }

                        final int left = childView.getLeft() - childViewParams.leftMargin - mVerticalDividerDrawableHeight;
                        final int right = left + mVerticalDividerDrawableHeight;
                        int tempTopMargin = isHeaderView ? 0 : mVerticalDividerTopMargin;
                        int tempBottomMargin = isHeaderView ? 0 : mVerticalDividerBottomMargin;
                        mVerticalDividerDrawable.setBounds(left + traX, top + traY + tempTopMargin, right + traX, bottom + traY - tempBottomMargin);
                        mVerticalDividerDrawable.draw(c);
                    }
                    break;
                case FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_GRID:
                case FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_STAGGERED_GRID:
                    // GridLayoutManager or StaggeredGridLayoutManager
                    isGridItemLayoutLastRow = isGridItemLayoutLastRow(position, itemViewCount, headersCount);
                    isGridItemLayoutLastColumn = isGridItemLayoutLastColumn(position, headersCount, childView);
                    isGridItemLayoutFirstRow = isGridItemLayoutFirstRow(position, headersCount);

                    if (mLayoutManagerType == FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_GRID && position == (itemViewCount + headersCount - 1)) {
                        isGridLayoutLastNum = true;
                    }

                    if (mOrientation == OrientationHelper.HORIZONTAL) {
                        // horizontal draw divider
                        if (!isNotShowGridEndDivider || (!isGridLayoutLastNum && !isGridItemLayoutLastColumn)) {
                            int horizontalLeft = childView.getLeft() - childViewParams.leftMargin;
                            int horizontalTop = childView.getBottom() + childViewParams.bottomMargin;
                            int horizontalRight = childView.getRight() + childViewParams.rightMargin;
                            int horizontalBottom = horizontalTop + mHorizontalDividerDrawableHeight;
                            if (mLayoutManagerType == FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_STAGGERED_GRID && !isGridItemLayoutLastRow && mHorizontalDividerRightMargin <= 0) {
                                horizontalRight += mVerticalDividerDrawableHeight;
                            }
                            mHorizontalDividerDrawable.setBounds(horizontalLeft + traX + mHorizontalDividerLeftMargin, horizontalTop + traY, horizontalRight + traX - mHorizontalDividerRightMargin, horizontalBottom + traY);
                            mHorizontalDividerDrawable.draw(c);
                        }

                        if ((!isHeaderDividersEnabled || headersCount == 0) && isGridItemLayoutFirstRow) {
                            continue;
                        }

                        int verticalTop;
                        int verticalBottom;
                        if (isGridItemLayoutFirstRow) {
                            // Only draw the first line of the first grid
                            if (position - headersCount == 0) {
                                verticalTop = parent.getTop();
                                verticalBottom = parent.getBottom();
                            } else {
                                continue;
                            }
                        } else {
                            verticalTop = childView.getTop() - childViewParams.topMargin;
                            verticalBottom = childView.getBottom() + childViewParams.bottomMargin;
                            if (mLayoutManagerType == FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_GRID && !isGridItemLayoutLastColumn && mVerticalDividerBottomMargin <= 0) {
                                verticalBottom += mHorizontalDividerDrawableHeight;
                            }
                        }

                        int verticalLeft = childView.getLeft() - childViewParams.leftMargin - mVerticalDividerDrawableHeight;
                        int verticalRight = verticalLeft + mVerticalDividerDrawableHeight;

                        int tempTopMargin = isHeaderView ? 0 : mVerticalDividerTopMargin;
                        int tempBottomMargin = isHeaderView ? 0 : mVerticalDividerBottomMargin;
                        mVerticalDividerDrawable.setBounds(verticalLeft + traX, verticalTop + traY + tempTopMargin, verticalRight + traX, verticalBottom + traY - tempBottomMargin);
                        mVerticalDividerDrawable.draw(c);
                    } else {
                        // draw vertical divider
                        if (!isNotShowGridEndDivider || (!isGridItemLayoutLastColumn
                                && ((mLayoutManagerType == FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_GRID && !isGridLayoutLastNum)
                                || mLayoutManagerType == FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_STAGGERED_GRID))) {
                            int verticalLeft = childView.getRight() + childViewParams.rightMargin;
                            int verticalTop = childView.getTop() - childViewParams.topMargin;
                            int verticalRight = verticalLeft + mVerticalDividerDrawableHeight;
                            int verticalBottom = childView.getBottom() + childViewParams.bottomMargin;
                            if (mLayoutManagerType == FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_STAGGERED_GRID && !isGridItemLayoutLastRow && mVerticalDividerBottomMargin <= 0) {
                                verticalBottom += mHorizontalDividerDrawableHeight;
                            }
                            mVerticalDividerDrawable.setBounds(verticalLeft + traX, verticalTop + traY + mVerticalDividerTopMargin, verticalRight + traX, verticalBottom + traY - mVerticalDividerBottomMargin);
                            mVerticalDividerDrawable.draw(c);
                        }

                        if ((!isHeaderDividersEnabled || headersCount == 0) && isGridItemLayoutFirstRow) {
                            continue;
                        }

                        int horizontalLeft;
                        int horizontalRight;

                        if (isGridItemLayoutFirstRow) {
                            // Only draw the first line of the first grid
                            if (position - headersCount == 0) {
                                horizontalLeft = parent.getLeft();
                                horizontalRight = parent.getRight();
                            } else {
                                continue;
                            }
                        } else {
                            horizontalLeft = childView.getLeft() - childViewParams.leftMargin;
                            horizontalRight = childView.getRight() + childViewParams.rightMargin;
                            if (mLayoutManagerType == FamiliarRecyclerView.LAYOUT_MANAGER_TYPE_GRID && !isGridItemLayoutLastColumn && mHorizontalDividerRightMargin <= 0) {
                                horizontalRight += mVerticalDividerDrawableHeight;
                            }
                        }

                        int horizontalTop = childView.getTop() - childViewParams.topMargin - mHorizontalDividerDrawableHeight;
                        int horizontalBottom = horizontalTop + mHorizontalDividerDrawableHeight;
                        int tempLeftMargin = isHeaderView ? 0 : mHorizontalDividerLeftMargin;
                        int tempRightMargin = isHeaderView ? 0 : mHorizontalDividerRightMargin;
                        mHorizontalDividerDrawable.setBounds(horizontalLeft + traX + tempLeftMargin, horizontalTop + traY, horizontalRight + traX - tempRightMargin, horizontalBottom + traY);
                        mHorizontalDividerDrawable.draw(c);
                    }
                    break;
            }
        }
    }
9694
public void setHeader(@NonNull View view, boolean padding, boolean divider, DimenHolder height) {
        mDrawerBuilder.getHeaderAdapter().clear();
        if (padding) {
            mDrawerBuilder.getHeaderAdapter().add(new ContainerDrawerItem().withView(view).withDivider(divider).withHeight(height).withViewPosition(ContainerDrawerItem.Position.TOP));
        } else {
            mDrawerBuilder.getHeaderAdapter().add(new ContainerDrawerItem().withView(view).withDivider(divider).withHeight(height).withViewPosition(ContainerDrawerItem.Position.NONE));
        }
        //we need to set the padding so the header starts on top
        mDrawerBuilder.mRecyclerView.setPadding(mDrawerBuilder.mRecyclerView.getPaddingLeft(), 0, mDrawerBuilder.mRecyclerView.getPaddingRight(), mDrawerBuilder.mRecyclerView.getPaddingBottom());
    }
268053
private DrawerLayout inflateDrawerLayout(ViewGroup parent){
        DrawerLayout drawer = (DrawerLayout) mActivity.getLayoutInflater()
                .inflate(R.layout.material_drawer, parent, false);

        // Find the associated views
        mDrawerPane = ButterKnife.findById(drawer, R.id.navdrawer);
        mDrawerContentFrame = ButterKnife.findById(drawer, R.id.drawer_content_frame);
        mDrawerHeaderFrame = ButterKnife.findById(mDrawerPane, R.id.header_container);
        mDrawerFooterFrame = ButterKnife.findById(mDrawerPane, R.id.footer);
        mDrawerItemsListContainer = ButterKnife.findById(mDrawerPane, R.id.navdrawer_items_list);

        // Return the drawer
        return drawer;
    }
905711
function buildStack(app, name, view) {
    var layoutExists = false;
    var registered = 0;
    var layouts = {};

    // get all collections with `viewType` layout
    var collections = app.viewTypes.layout;
    var len = collections.length;
    var idx = -1;

    while (++idx < len) {
      var collection = app[collections[idx]];

      // detect if at least one of the collections has
      // our starting layout
      if (!layoutExists && collection.getView(name)) {
        layoutExists = true;
      }

      // add the collection views to the layouts object
      for (var key in collection.views) {
        layouts[key] = collection.views[key];
        registered++;
      }
    }

    if (registered === 0) {
      throw app.formatError('layouts', 'registered', name, view);
    }

    if (layoutExists === false) {
      throw app.formatError('layouts', 'notfound', name, view);
    }
    return layouts;
  }
59026
public synchronized void setDelegateMap(PropertyMap delegateMap)
    {
        if (!isCompatibleClass(delegateMap.getMapClass()))
            throw new IllegalArgumentException("The delegate map type (" + delegateMap.getMapClass() + " is an incompatible type with " + _mapClass);

        _delegateMap = delegateMap;
    }
975191
private void delegateChanged(Observable<T> oldDelegate, Observable<T> newDelegate)
	{
		removeObservableListeners(oldDelegate);
		
		addObservableListeners(newDelegate);

		support.fireValueChanged(oldDelegate.getValue(), newDelegate.getValue());
	}
1186194
def showGridColumns( self ):
        
        delegate = self.itemDelegate()
        if ( isinstance(delegate, XTreeWidgetDelegate) ):
            return delegate.showGridColumns()
        return False