Maximize or minimize the DraggableView using the draggableView position and the y axis
velocity.
341201
private void triggerOnReleaseActionsWhileVerticalDrag(float yVel) {
    if (yVel < 0 && yVel <= -Y_MIN_VELOCITY) {
      draggableView.maximize();
    } else if (yVel > 0 && yVel >= Y_MIN_VELOCITY) {
      draggableView.minimize();
    } else {
      if (draggableView.isDragViewAboveTheMiddle()) {
        draggableView.maximize();
      } else {
        draggableView.minimize();
      }
    }
  }
343285
private void hookDraggablePanelListeners() {
    draggablePanel.setDraggableListener(new DraggableListener() {
      @Override public void onMaximized() {
        playVideo();
      }

      @Override public void onMinimized() {
        //Empty
      }

      @Override public void onClosedToLeft() {
        pauseVideo();
      }

      @Override public void onClosedToRight() {
        pauseVideo();
      }
    });
  }
219362
@Override public void onViewPositionChanged(View changedView, int left, int top, int dx, int dy) {
    if (draggableView.isDragViewAtBottom()) {
      draggableView.changeDragViewViewAlpha();
    } else {
      draggableView.restoreAlpha();
      draggableView.changeDragViewScale();
      draggableView.changeDragViewPosition();
      draggableView.changeSecondViewAlpha();
      draggableView.changeSecondViewPosition();
      draggableView.changeBackgroundAlpha();
    }
  }
859035
public void setVelocityRange( final Vector3f minV, final Vector3f maxV )
    {
        if (null != mGVRContext) {
            mGVRContext.runOnGlThread(new Runnable() {

                @Override
                public void run() {
                    minVelocity = minV;
                    maxVelocity = maxV;
                }
            });
        }
    }
857777
function(xy) {
        if(this.panned) {
            var res = null;
            if (this.kinetic) {
                res = this.kinetic.end(xy);
            }
            this.map.pan(
                this.handler.last.x - xy.x,
                this.handler.last.y - xy.y,
                {dragging: !!res, animate: false}
            );
            if (res) {
                var self = this;
                this.kinetic.move(res, function(x, y, end) {
                    self.map.pan(x, y, {dragging: !end, animate: false});
                });
            }
            this.panned = false;
        }
    }
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);
    }
  }
1225688
private void triggerOnReleaseActionsWhileHorizontalDrag(float xVel) {
    if (xVel < 0 && xVel <= -X_MIN_VELOCITY) {
      draggableView.closeToLeft();
    } else if (xVel > 0 && xVel >= X_MIN_VELOCITY) {
      draggableView.closeToRight();
    } else {
      if (draggableView.isNextToLeftBound()) {
        draggableView.closeToLeft();
      } else if (draggableView.isNextToRightBound()) {
        draggableView.closeToRight();
      } else {
        draggableView.minimize();
      }
    }
  }
361068
public final boolean isViewSufficientlyShown(View view){
		final int[] xyView = new int[2];
		final int[] xyParent = new int[2];

		if(view == null)
			return false;

		final float viewHeight = view.getHeight();
		final View parent = getScrollOrListParent(view);
		view.getLocationOnScreen(xyView);

		if(parent == null){
			xyParent[1] = 0;
		}
		else{
			parent.getLocationOnScreen(xyParent);
		}

		if(xyView[1] + (viewHeight/2.0f) > getScrollListWindowHeight(view))
			return false;

		else if(xyView[1] + (viewHeight/2.0f) < xyParent[1])
			return false;

		return true;
	}
1052967
def on_touch_move(self, touch):
        
        if not self.dragging:
            touch.ungrab(self)
            return
        self.pos = (
            touch.x - self.collide_x,
            touch.y - self.collide_y
        )
1222996
def drag_by_coordinates(self,sx, sy, ex, ey, steps=10):
        
        self.device.drag(sx, sy, ex, ey, steps)
764871
def position_to_value(self, y):
        """"""
        vsb = self.editor.verticalScrollBar()
        return vsb.minimum()+max([0, (y-self.offset)/self.get_scale_factor()])
535905
def on_mouse_drag(self, x, y, dx, dy, buttons, modifiers):
        
        self.view['ball'].drag(np.array([x, y]))
        self.scene.camera.transform = self.view['ball'].pose
782114
function () {
		
		// Call uber method		
		axisProto.setAxisTranslation.call(this);
			
		// Set transA and minPixelPadding
		if (this.center) { // it's not defined the first time
			if (this.isCircular) {
				
				this.transA = (this.endAngleRad - this.startAngleRad) / 
					((this.max - this.min) || 1);
					
				
			} else { 
				this.transA = (this.center[2] / 2) / ((this.max - this.min) || 1);
			}
			
			if (this.isXAxis) {
				this.minPixelPadding = this.transA * this.minPointOffset;
			} else {
				// This is a workaround for regression #2593, but categories still don't position correctly.
				// TODO: Implement true handling of Y axis categories on gauges.
				this.minPixelPadding = 0; 
			}
		}
	}
267606
function(xy) {
        if(this.kinetic) {
            this.kinetic.update(xy);
        }
        this.panned = true;
        this.map.pan(
            this.handler.last.x - xy.x,
            this.handler.last.y - xy.y,
            {dragging: true, animate: false}
        );
    }
116386
public void setSliderPosition(float x, float y) {

        if (x > 255) {
            x = 255;
        }
        if (x < 0) {
            x = 0;
        }
        if (y > 255) {
            y = 255;
        }
        if (y < 0) {
            y = 0;
        }
        x -= 7;
        y -= 7;
        m_slider.getElement().getStyle().setLeft(x, Unit.PX);
        m_slider.getElement().getStyle().setTop(y, Unit.PX);
    }
435049
public void onTentativeMove(GeometryEditTentativeMoveEvent event) {
		try {
			Coordinate[] vertices = editService.getIndexService().getSiblingVertices(editService.getGeometry(),
					editService.getInsertIndex());
			String geometryType = editService.getIndexService().getGeometryType(editService.getGeometry(),
					editService.getInsertIndex());

			if (vertices != null
					&& (Geometry.LINE_STRING.equals(geometryType) || Geometry.LINEAR_RING.equals(geometryType))) {
				Coordinate temp1 = event.getOrigin();
				Coordinate temp2 = event.getCurrentPosition();
				Coordinate c1 = mapPresenter.getViewPort().getTransformationService()
						.transform(temp1, RenderSpace.WORLD, RenderSpace.SCREEN);
				Coordinate c2 = mapPresenter.getViewPort().getTransformationService()
						.transform(temp2, RenderSpace.WORLD, RenderSpace.SCREEN);

				tentativeMoveLine.setStep(0, new MoveTo(false, c1.getX(), c1.getY()));
				tentativeMoveLine.setStep(1, new LineTo(false, c2.getX(), c2.getY()));
			} else if (vertices != null && Geometry.LINEAR_RING.equals(geometryType)) {
				// Draw the second line (as an option...)
			}
		} catch (GeometryIndexNotFoundException e) {
			throw new IllegalStateException(e);
		}
	}
925525
private void setParentMaximum(boolean maximize) {
        if (rootParent instanceof JFrame) {
            JFrame frame = (JFrame) rootParent;
            int    state = frame.getExtendedState();

            if (maximize) {
                GraphicsConfiguration gc = frame.getGraphicsConfiguration();
                Insets                i  = Toolkit.getDefaultToolkit().getScreenInsets(gc);
                Rectangle             r  = gc.getBounds();

                r.x      = 0;
                r.y      = 0;
                r.width  -= i.left + i.right;
                r.height -= i.top + i.bottom;
                frame.setMaximizedBounds(r);
            }

            frame.setExtendedState(maximize ? state | Frame.MAXIMIZED_BOTH : state & ~Frame.MAXIMIZED_BOTH);
        }
    }