Code this position and Anchor to add it to the LayoutManager.
@param position The location constant (see ScreenConstants).
@param setNewAnchor The anchor constant.
@return The new screen location object.
483421
public ScreenLocation getNextLocation(short position, short setNewAnchor)
    {
        if (position == ScreenConstants.ADD_VIEW_BUFFER)
            position = ScreenConstants.ADD_SCREEN_VIEW_BUFFER;
        if (position == ScreenConstants.FIRST_LOCATION)
            position = ScreenConstants.FIRST_INPUT_LOCATION;
        return super.getNextLocation(position, setNewAnchor);
    }
166334
public void setAnchors(int[] anchors) {
		super.anchors = new ArrayList<Anchor>();
		if (anchors != null) {
			for (int i = 0; i < anchors.length; i++) {
				if (anchors[i] >= 0) {
					addAnchor(i, anchors[i]);
				}
			}
		}
	}
267515
public void setPosition(int newIndex) {
    if (index != newIndex) {
      if (index == -1 || index > newIndex) {
        pos = 0;
        index = 0;
      } else {
        index++;
        if (length != NULL_LENGTH) {
          pos += length;
        }
      }

      for (; index <= newIndex; index++) {
        if (index != newIndex) {
          int type = this.buf[this.pos++] & 0xff;
          switch (type) {
            case 251:
              break;
            case 252:
              pos += 2 + (0xffff & (((buf[pos] & 0xff) + ((buf[pos + 1] & 0xff) << 8))));
              break;
            case 253:
              pos += 3 + (0xffffff & ((buf[pos] & 0xff)
                  + ((buf[pos + 1] & 0xff) << 8)
                  + ((buf[pos + 2] & 0xff) << 16)));
              break;
            case 254:
              pos += 8 + ((buf[pos] & 0xff)
                  + ((long) (buf[pos + 1] & 0xff) << 8)
                  + ((long) (buf[pos + 2] & 0xff) << 16)
                  + ((long) (buf[pos + 3] & 0xff) << 24)
                  + ((long) (buf[pos + 4] & 0xff) << 32)
                  + ((long) (buf[pos + 5] & 0xff) << 40)
                  + ((long) (buf[pos + 6] & 0xff) << 48)
                  + ((long) (buf[pos + 7] & 0xff) << 56));
              break;
            default:
              pos += type;
              break;
          }
        } else {
          int type = this.buf[this.pos++] & 0xff;
          switch (type) {
            case 251:
              length = NULL_LENGTH;
              this.lastValueNull = BIT_LAST_FIELD_NULL;
              return;
            case 252:
              length = 0xffff & ((buf[pos++] & 0xff)
                  + ((buf[pos++] & 0xff) << 8));
              break;
            case 253:
              length = 0xffffff & ((buf[pos++] & 0xff)
                  + ((buf[pos++] & 0xff) << 8)
                  + ((buf[pos++] & 0xff) << 16));
              break;
            case 254:
              length = (int) ((buf[pos++] & 0xff)
                  + ((long) (buf[pos++] & 0xff) << 8)
                  + ((long) (buf[pos++] & 0xff) << 16)
                  + ((long) (buf[pos++] & 0xff) << 24)
                  + ((long) (buf[pos++] & 0xff) << 32)
                  + ((long) (buf[pos++] & 0xff) << 40)
                  + ((long) (buf[pos++] & 0xff) << 48)
                  + ((long) (buf[pos++] & 0xff) << 56));
              break;
            default:
              length = type;
              break;
          }
          this.lastValueNull = BIT_LAST_FIELD_NOT_NULL;
          return;
        }
      }
    }
    this.lastValueNull = length == NULL_LENGTH ? BIT_LAST_FIELD_NULL : BIT_LAST_FIELD_NOT_NULL;
  }
770438
def __set_position(self):
        

        rectangle = hasattr(self.parent(), "viewport") and self.parent().viewport().rect() or self.parent().rect()
        if not rectangle:
            return

        self.adjustSize()

        if self.__anchor == 0:
            point_x = rectangle.width() / 2 - self.width() / 2
            point_y = self.__vertical_padding
        elif self.__anchor == 1:
            point_x = rectangle.width() - self.width() - self.__horizontal_padding
            point_y = self.__vertical_padding
        elif self.__anchor == 2:
            point_x = rectangle.width() - self.width() - self.__horizontal_padding
            point_y = rectangle.height() / 2 - self.height() / 2
        elif self.__anchor == 3:
            point_x = rectangle.width() - self.width() - self.__horizontal_padding
            point_y = rectangle.height() - self.height() - self.__vertical_padding
        elif self.__anchor == 4:
            point_x = rectangle.width() / 2 - self.width() / 2
            point_y = rectangle.height() - self.height() - self.__vertical_padding
        elif self.__anchor == 5:
            point_x = self.__horizontal_padding
            point_y = rectangle.height() - self.height() - self.__vertical_padding
        elif self.__anchor == 6:
            point_x = self.__horizontal_padding
            point_y = rectangle.height() / 2 - self.height() / 2
        elif self.__anchor == 7:
            point_x = self.__horizontal_padding
            point_y = self.__vertical_padding
        elif self.__anchor == 8:
            point_x = rectangle.width() / 2 - self.width() / 2
            point_y = rectangle.height() / 2 - self.height() / 2

        self.setGeometry(point_x + self.__horizontal_offset, point_y +
                                                             self.__vertical_offset, self.width(), self.height())
460392
void setPosition(Point2D<?, ?> position) {
		this.location = position == null ? null : new SoftReference<>(Point2d.convert(position));
	}
459586
public Node newOptionalParameterFromNode(Node n) {
    Node newParam = newParameterFromNode(n);
    if (!newParam.isVarArgs() && !newParam.isOptionalArg()) {
      newParam.setOptionalArg(true);
    }
    return newParam;
  }
44766
public ScreenLocation getNextLocation(short position, short setNewAnchor)
    {
        if (position == ScreenConstants.FIRST_LOCATION)
            position = ScreenConstants.FIRST_FIELD_BUTTON_LOCATION;
        if (position == ScreenConstants.NEXT_LOGICAL)
            position = ScreenConstants.RIGHT_OF_LAST_BUTTON;
        return super.getNextLocation(position, setNewAnchor);
    }
1230023
public void setRewindPosition(@NonNull String frameName, int position) {
        frames.get(frameName).setRewindPosition(position);
    }
1181698
public void setCurrentTab(int position) {
        if(mSelectedPosition != position){
            View v = mLayoutManager.findViewByPosition(mSelectedPosition);
            if(v != null)
                ((Checkable)v).setChecked(false);
        }

        mSelectedPosition = position;
        View v = mLayoutManager.findViewByPosition(mSelectedPosition);
        if(v != null)
            ((Checkable)v).setChecked(true);

        animateToTab(position);
    }
976880
public void addNavButtons()
    {
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, JCalendarPopup.CALENDAR_ICON, ProjectTask.PROJECT_TASK_CALENDAR_SCREEN, ProjectTask.PROJECT_TASK_CALENDAR_SCREEN);
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.FORMDETAIL, ProjectTask.PROJECT_PREDECESSOR_DETAIL_SCREEN, ProjectTask.PROJECT_PREDECESSOR_DETAIL_SCREEN);
        super.addNavButtons();
    }
674258
public function changeAbsolutePosition($newPosition)
    {
        // The current position
        $current_position = $this->getPosition();

        if ($newPosition != null && $newPosition > 0 && $newPosition != $current_position) {
            // Find categories to offset
            $search = $this->createQuery();

            $this->addCriteriaToPositionQuery($search);

            if ($newPosition > $current_position) {
                // The new position is after the current position -> we will offset + 1 all categories located between us and the new position
                $search->filterByPosition(array('min' => 1+$current_position, 'max' => $newPosition));

                $delta = -1;
            } else {
                // The new position is brefore the current position -> we will offset - 1 all categories located between us and the new position
                $search->filterByPosition(array('min' => $newPosition, 'max' => $current_position - 1));

                $delta = 1;
            }

            $results = $search->find();

            $cnx = Propel::getWriteConnection($this->getDatabaseName());

            $cnx->beginTransaction();

            try {
                foreach ($results as $result) {
                    $objNewPosition = $result->getPosition() + $delta;

                    // For BC
                    if (method_exists($result, 'setDispatcher') && method_exists($this, 'getDispatcher')) {
                        $result->setDispatcher($this->getDispatcher());
                    }

                    $result->setPosition($objNewPosition)->save($cnx);
                }

                $this
                    ->setPosition($newPosition)
                    ->save($cnx)
                ;

                $cnx->commit();
            } catch (\Exception $e) {
                $cnx->rollback();
            }
        }
    }
923329
private View configureHeader(WrapperView wv, final int position) {
		View header = wv.mHeader == null ? popHeader() : wv.mHeader;
		header = mDelegate.getHeaderView(position, header, wv);
		if (header == null) {
			throw new NullPointerException("Header view must not be null.");
		}
		//if the header isn't clickable, the listselector will be drawn on top of the header
		header.setClickable(true);
		header.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				if(mOnHeaderClickListener != null){
					long headerId = mDelegate.getHeaderId(position);
					mOnHeaderClickListener.onHeaderClick(v, position, headerId);
				}
			}
		});
		return header;
	}
1365598
public void setPosition(CmsPositionBean position) {

        setPosition(position.getHeight(), position.getWidth(), position.getLeft(), position.getTop());
    }
559265
public final Position ensureContinuous(Position lastPosition) {
        double lon = this.lon;
        if (abs(lon - lastPosition.lon) > 180) {
            if (lastPosition.lon < 0)
                lon -= 360;
            else
                lon += 360;
            return new Position(lat, lon);
        } else
            return this;

    }
1356855
public void setRewindPositionOnce(@NonNull String frameName, int position) {
        if (getRewindPosition(frameName) >= 0)
            return;

        frames.get(frameName).setRewindPosition(position);
    }
792503
private void setPosition(CmsPositionBean position) {

        m_currentPosition = position;
        setSelectPosition(position.getLeft(), position.getTop(), position.getHeight(), position.getWidth());
    }
486070
public void setViewHeight(int newHeight) {
    if (newHeight > 0) {
      originalHeight = newHeight;
      RelativeLayout.LayoutParams layoutParams =
          (RelativeLayout.LayoutParams) view.getLayoutParams();
      layoutParams.height = newHeight;
      view.setLayoutParams(layoutParams);
    }
  }