Applies this selector to the given view, selecting all descendants of the
view that match this selector.
@return the ordered set of views that matches this selector
338805
public ViewSelection selectViews(View view) {
        ViewSelection result = new ViewSelection();
        for (List<Selector> selectorParts : selectorGroups) {
            result.addAll(selectViewsForGroup(selectorParts, view));
        }
        return result;
    }
632542
protected Map<CmsUUID, CmsElementView> loadElementViews() {

        List<CmsElementView> views = new ArrayList<CmsElementView>();
        if (m_cms.existsResource("/")) {
            views.add(CmsElementView.DEFAULT_ELEMENT_VIEW);
            try {
                @SuppressWarnings("deprecation")
                CmsResourceFilter filter = CmsResourceFilter.ONLY_VISIBLE_NO_DELETED.addRequireType(
                    m_elementViewType.getTypeId());
                List<CmsResource> groups = m_cms.readResources("/", filter);
                for (CmsResource res : groups) {
                    try {
                        views.add(new CmsElementView(m_cms, res));
                    } catch (Exception e) {
                        LOG.error(e.getMessage(), e);
                    }
                }
            } catch (CmsException e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
            Collections.sort(views, new CmsElementView.ElementViewComparator());
            Map<CmsUUID, CmsElementView> elementViews = new LinkedHashMap<CmsUUID, CmsElementView>();
            for (CmsElementView view : views) {
                elementViews.put(view.getId(), view);
            }
            return elementViews;
        }
        return null;
    }
434488
private static void applyAllRecursively(ViewGroup viewGroup, AssetManager assets) {
        for (int i = 0, size = viewGroup.getChildCount(); i < size; i++) {
            final View childView = viewGroup.getChildAt(i);
            if (childView instanceof TextView) {
                setTypeface((TextView) childView, assets, false);
            } else if (childView instanceof ViewGroup) {
                applyAllRecursively((ViewGroup) childView, assets);
            }
        }
    }
1214407
@SuppressWarnings(UNUSED)
    public static List<ViewDescriptor> getViewDescriptors() {
        return Collections.singletonList(
                (ViewDescriptor) Jenkins.getActiveInstance().getDescriptorByType(BranchListView.DescriptorImpl.class));
    }
1367126
@SuppressWarnings("unchecked")
  public static <T extends View> T findViewById(View containerView, int viewId) {
    View foundView = containerView.findViewById(viewId);
    return (T) foundView;
  }
1251102
Motion selectCoordinateBase(View view ) {
		double bestScore = 0;
		Motion best = null;

		if( verbose != null )
			verbose.println("selectCoordinateBase");
		for (int i = 0; i < view.connections.size(); i++) {
			Motion e = view.connections.get(i);

			double s = e.scoreTriangulation();
			if( verbose != null )
				verbose.printf("  [%2d] score = %s\n",i,s);
			if( s > bestScore ) {
				bestScore = s;
				best = e;
			}
		}
		return best;
	}
205444
public <T extends View> boolean searchFor(View view) {
		ArrayList<View> views = viewFetcher.getAllViews(true);
		for(View v : views){
			if(v.equals(view)){
				return true;
			}
		}
		return false;
	}
1197074
public Set<?> getSelectedRows() {
		Set<?> keys = getComponentModel().selectedRows;
		if (keys == null) {
			return Collections.emptySet();
		} else {
			return Collections.unmodifiableSet(keys);
		}
	}
914892
public Set<Integer> getSelections() {
        if (mOriginalItems != null) {
            Set<Integer> selections = new HashSet<>();
            int adapterOffset = mItemAdapter.getFastAdapter().getPreItemCountByOrder(mItemAdapter.getOrder());
            for (int i = 0, size = mOriginalItems.size(); i < size; i++) {
                Item item = mOriginalItems.get(i);
                if (item.isSelected()) {
                    selections.add(i + adapterOffset);
                }
            }
            return selections;
        } else {
            return mItemAdapter.getFastAdapter().getSelections();
        }
    }
537796
public List<FacesConfigFlowDefinitionViewType<FacesConfigFlowDefinitionType<T>>> getAllView()
   {
      List<FacesConfigFlowDefinitionViewType<FacesConfigFlowDefinitionType<T>>> list = new ArrayList<FacesConfigFlowDefinitionViewType<FacesConfigFlowDefinitionType<T>>>();
      List<Node> nodeList = childNode.get("view");
      for(Node node: nodeList)
      {
         FacesConfigFlowDefinitionViewType<FacesConfigFlowDefinitionType<T>>  type = new FacesConfigFlowDefinitionViewTypeImpl<FacesConfigFlowDefinitionType<T>>(this, "view", childNode, node);
         list.add(type);
      }
      return list;
   }
609720
public CmsAttributeValueView getParentView() {

        Widget ancestor = getParent();
        while ((ancestor != null) && !(ancestor instanceof CmsAttributeValueView)) {
            ancestor = ancestor.getParent();
        }
        return (CmsAttributeValueView)ancestor;
    }
1144118
public static DescriptorExtensionList<View,ViewDescriptor> all() {
        return Jenkins.getInstance().<View,ViewDescriptor>getDescriptorList(View.class);
    }
397589
public DrawerBuilder withRootView(@IdRes int rootViewRes) {
        if (mActivity == null) {
            throw new RuntimeException("please pass an activity first to use this call");
        }

        return withRootView((ViewGroup) mActivity.findViewById(rootViewRes));
    }
275827
@Deprecated
	@NonNull
	public SparseArray<ViewState> getViewStates() {
		final SparseArray<ViewState> list = new SparseArray<>();

		final Iterator<Map.Entry<Integer, ViewState>> iterator = getStates().entrySet().iterator();
		while (iterator.hasNext()) {
			final Map.Entry<Integer, ViewState> next = iterator.next();
			list.put(next.getKey(), next.getValue());
		}

		return list;
	}
503624
private boolean findListView(@NonNull final View view) {
        if (view instanceof AbsListView) {
            this.listView = (AbsListView) view;
            this.listView.setOnScrollListener(createListViewScrollListener());
            return true;
        } else if (view instanceof ViewGroup) {
            ViewGroup viewGroup = (ViewGroup) view;

            for (int i = 0; i < viewGroup.getChildCount(); i++) {
                if (findListView(viewGroup.getChildAt(i))) {
                    return true;
                }
            }
        }

        return false;
    }
992522
private float[] getClickCoordinates(View view){
		int[] xyLocation = new int[2];
		float[] xyToClick = new float[2];
		int trialCount = 0;

		view.getLocationOnScreen(xyLocation);
		while(xyLocation[0] == 0 && xyLocation[1] == 0 && trialCount < 10) {
			sleeper.sleep(300);
			view.getLocationOnScreen(xyLocation);
			trialCount++;
		}

		final int viewWidth = view.getWidth();
		final int viewHeight = view.getHeight();
		final float x = xyLocation[0] + (viewWidth / 2.0f);
		float y = xyLocation[1] + (viewHeight / 2.0f);

		xyToClick[0] = x;
		xyToClick[1] = y;

		return xyToClick;
	}
149747
private boolean shouldIgnore(CmsElementView view, Map<CmsUUID, CmsElementView> views, String myPath) {

        if (isSelectParent()) {
            for (CmsElementView otherView : views.values()) {
                CmsUUID parentViewId = otherView.getParentViewId();
                if (parentViewId != null) {
                    CmsElementView parentOfOther = views.get(parentViewId);
                    if ((parentOfOther != null)
                        && (parentOfOther.getResource() != null)
                        && parentOfOther.getResource().getRootPath().equals(myPath)) {
                        // can't have "grandparents"
                        return true;
                    }
                }
            }
            boolean isStandardView = (view.getResource() != null) || view.getId().isNullUUID();
            if ((view.getParentViewId() != null) || !isStandardView) {
                // synthetic view, or already a sub-view of something else
                return true;
            }
            if ((view.getResource() != null) && view.getResource().getRootPath().equals(myPath)) {
                // can't make a view its own parent
                return true;
            }
        }
        return false;
    }