Set the viewport's coordinates from the data stored in the specified parcel. To write a viewport to a parcel,
call writeToParcel().

@param in The parcel to read the viewport's coordinates from
511591
public void readFromParcel(Parcel in) {
        left = in.readFloat();
        top = in.readFloat();
        right = in.readFloat();
        bottom = in.readFloat();
    }
304925
protected void setLayoutToPrimary(int segmentLength,
                                     int priority,
                                     boolean isPooled,
                                     boolean isExchange,
                                     int packetNumber,
                                     int segmentType,
                                     SendListener sendListener)
   {
      if (tc.isEntryEnabled()) SibTr.entry(this, tc, "setLayoutToPrimary", new Object[] {""+segmentLength, ""+priority, ""+isPooled, ""+isExchange, ""+packetNumber, ""+segmentType, sendListener});
      primaryHeaderFields.segmentLength = segmentLength;
      primaryHeaderFields.priority = priority;
      primaryHeaderFields.isPooled = isPooled;
      primaryHeaderFields.isExchange = isExchange;
      primaryHeaderFields.packetNumber = packetNumber;
      primaryHeaderFields.segmentType = segmentType;
      this.sendListener = sendListener;
      transmissionRemaining = segmentLength;
      layout = JFapChannelConstants.XMIT_PRIMARY_ONLY;
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "setLayoutToPrimary");
   }
1027760
@Deprecated
    public void writeToParcel(Parcel out, int flags) {
        out.writeInt(mIdentifiers.size());
        for (Identifier identifier: mIdentifiers) {
            out.writeString(identifier == null ? null : identifier.toString());
        }
        out.writeDouble(getDistance());
        out.writeInt(mRssi);
        out.writeInt(mTxPower);
        out.writeString(mBluetoothAddress);
        out.writeInt(mBeaconTypeCode);
        out.writeInt(mServiceUuid);
        out.writeInt(mDataFields.size());
        for (Long dataField: mDataFields) {
            out.writeLong(dataField);
        }
        out.writeInt(mExtraDataFields.size());
        for (Long dataField: mExtraDataFields) {
            out.writeLong(dataField);
        }
        out.writeInt(mManufacturer);
        out.writeString(mBluetoothName);
        out.writeString(mParserIdentifier);
        out.writeByte((byte) (mMultiFrameBeacon ? 1: 0));
        out.writeValue(mRunningAverageRssi);
        out.writeInt(mRssiMeasurementCount);
        out.writeInt(mPacketCount);
    }
1190578
void initializeFromRectIsotropic(Envelope2D src, Envelope2D dest) {

		if (src.isEmpty() || dest.isEmpty() || 0 == src.getWidth()
				|| 0 == src.getHeight())
			setZero();
		else {
			yx = 0;
			xy = 0;
			xx = dest.getWidth() / src.getWidth();
			yy = dest.getHeight() / src.getHeight();
			if (xx > yy)
				xx = yy;
			else
				yy = xx;

			Point2D destCenter = dest.getCenter();
			Point2D srcCenter = src.getCenter();
			xd = destCenter.x - srcCenter.x * xx;
			yd = destCenter.y - srcCenter.y * yy;
		}
	}
779082
public void setCurrentViewport(float left, float top, float right, float bottom) {
        constrainViewport(left, top, right, bottom);
    }
148494
private void  viewportFill()
   {
      int    col;
      if (state.style.viewportFill instanceof SVG.Colour) {
         col = ((SVG.Colour) state.style.viewportFill).colour;
      } else if (state.style.viewportFill instanceof CurrentColor) {
         col = state.style.color.colour;
      } else {
         return;
      }
      if (state.style.viewportFillOpacity != null)
         col = colourWithOpacity(col, state.style.viewportFillOpacity);

      canvas.drawColor(col);
   }
614434
public void setViewBox(final int westE6, final int northE6, final int eastE6, final int southE6) {
        this.viewBox = new BoundingBox();
        this.viewBox.setWestE6(westE6);
        this.viewBox.setNorthE6(northE6);
        this.viewBox.setEastE6(eastE6);
        this.viewBox.setSouthE6(southE6);
    }
221955
public final void setGeoidheight(StringBuilder contentBuffer) {
        ptValues[GpxMetadata.PTGEOIDWEIGHT] = Double.parseDouble(contentBuffer.toString());
    }
629879
public void set(Vector3D v, double width, double height) {
        this.x = v.getX();
        this.y = v.getY();
        this.width = width;
        this.height = height;
    }
185094
public void setPosition(final Object targetObj, final CellPosition position) {
        
        ArgUtils.notNull(targetObj, "targetObj");
        ArgUtils.notNull(position, "position");
        
        positionSetter.ifPresent(setter -> setter.set(targetObj, position));
    }
300984
public void addCell(Cell aCell, Point aLocation) throws BadElementException {
        if (aCell == null) throw new NullPointerException("addCell - cell has null-value");
        if (aLocation == null) throw new NullPointerException("addCell - point has null-value");
        if (aCell.isTable()) insertTable((Table)aCell.getElements().next(), aLocation);
        
        if (aLocation.x < 0) throw new BadElementException("row coordinate of location must be >= 0");
        if ((aLocation.y <= 0) && (aLocation.y > columns)) throw new BadElementException("column coordinate of location must be >= 0 and < nr of columns");
        if (!isValidLocation(aCell, aLocation)) throw new BadElementException("Adding a cell at the location (" + aLocation.x + "," + aLocation.y + ") with a colspan of " + aCell.getColspan() + " and a rowspan of " + aCell.getRowspan() + " is illegal (beyond boundaries/overlapping).");
        
        if (aCell.getBorder() == UNDEFINED) aCell.setBorder(defaultCell.getBorder());
        aCell.fill();
        placeCell(rows, aCell, aLocation);
        setCurrentLocationToNextValidPosition(aLocation);
    }
1276848
private void setContentOffset(int startX, int startY, Translation translation, int movementAmount) {

        if (translation == Translation.VERTICAL) {

            // center the X around the start point
            int originalStartX = startX;
            startX -= contentParams.width / 2;

            // if Y is in the lower half, we want it to go up, otherwise, leave it the same
            boolean moveDown = true;
            if (startY + contentParams.height + FINGER_SIZE > screenHeight) {
                startY -= contentParams.height;
                moveDown = false;

                if (movementAmount > 0) {
                    movementAmount *= -1;
                }
            }

            // when moving the peek view below the finger location, we want to offset it a bit to the right
            // or left as well, just so the hand doesn't cover it up.
            int extraXOffset = 0;
            if (moveDown) {
                extraXOffset = DensityUtils.toPx(getContext(), 200);
                if (originalStartX > screenWidth / 2) {
                    extraXOffset = extraXOffset * -1; // move it a bit to the left
                }
            }

            // make sure they aren't outside of the layout bounds and move them with the movementAmount
            // I move the x just a bit to the right or left here as well, because it just makes things look better
            startX = ensureWithinBounds(startX + extraXOffset, screenWidth, contentParams.width);
            startY = ensureWithinBounds(startY + movementAmount, screenHeight, contentParams.height);

        } else {

            // center the Y around the start point
            startY -= contentParams.height / 2;

            // if X is in the right half, we want it to go left
            if (startX + contentParams.width + FINGER_SIZE > screenWidth) {
                startX -= contentParams.width;
                if (movementAmount > 0) {
                    movementAmount *= -1;
                }
            }

            // make sure they aren't outside of the layout bounds and move them with the movementAmount
            startX = ensureWithinBounds(startX + movementAmount, screenWidth, contentParams.width);
            startY = ensureWithinBounds(startY, screenHeight, contentParams.height);
        }

        // check to see if the system bars are covering anything

        int statusBar = NavigationUtils.getStatusBarHeight(getContext());
        if (startY < statusBar) { // if it is above the status bar and action bar
            startY = statusBar + 10;
        } else if (NavigationUtils.hasNavBar(getContext()) &&
                startY + contentParams.height > screenHeight - NavigationUtils.getNavBarHeight(getContext())) {
            // if there is a nav bar and the popup is underneath it
            startY = screenHeight - contentParams.height - NavigationUtils.getNavBarHeight(getContext()) - DensityUtils.toDp(getContext(), 10);
        } else if (!NavigationUtils.hasNavBar(getContext()) && startY + contentParams.height > screenHeight) {
            startY = screenHeight - contentParams.height - DensityUtils.toDp(getContext(), 10);
        }

        // set the newly computed distances from the start and top sides
        setDistanceFromLeft(startX);
        setDistanceFromTop(startY);
    }
242662
public void set(Vector2f start, Vector2f end) {
		super.pointsDirty = true;
		if (this.start == null) {
			this.start = new Vector2f();
		}
		this.start.set(start);

		if (this.end == null) {
			this.end = new Vector2f();
		}
		this.end.set(end);

		vec = new Vector2f(end);
		vec.sub(start);

		lenSquared = vec.lengthSquared();
	}
1344830
void setCoordinator(LocalTranCoordImpl ltc)
    {
        _coord = ltc;
        if (tc.isDebugEnabled()) Tr.debug(tc, "setCoordinator: LTC="+ltc);
    }
58995
public void setCurrentViewport(Viewport viewport) {
        constrainViewport(viewport.left, viewport.top, viewport.right, viewport.bottom);
    }
3564
public Coordinate viewToPan(Coordinate coordinate) {
		if (coordinate != null) {
			Vector2D position = new Vector2D(coordinate);
			double scale = mapView.getCurrentScale();
			Coordinate panOrigin = mapView.getPanOrigin();
			
			double translateX = (mapView.getViewState().getX() - panOrigin.getX()) * scale - (mapView.getWidth() / 2);
			double translateY = -(mapView.getViewState().getY() - panOrigin.getY()) * scale - (mapView.getHeight() / 2);
			position.translate(translateX , translateY);
				// TODO: implement rotation support.
			return new Coordinate(position.getX(), position.getY());
		}
		return null;
	}
1308768
public void readFields(DataInput in) throws IOException {
        t.readFields(in);
        position = in.readInt();
    }