Called when the user scrolls in the color bar viewer.
        Pan up or down to show additional bars.
13489
def scroll_cb(self, viewer, direction, amt, data_x, data_y):
        
        bd = viewer.get_bindings()
        direction = bd.get_direction(direction)
        pan_x, pan_y = viewer.get_pan()[:2]
        qty = self._cmsep * amt * self.settings.get('cbar_pan_accel', 1.0)
        if direction == 'up':
            pan_y -= qty
        else:
            pan_y += qty

        pan_y = min(max(pan_y, 0), self._max_y)

        viewer.set_pan(pan_x, pan_y)
1354315
private void onScrollImpl(final Vector3Axis offset, final LayoutScroller.OnScrollListener listener) {
        if (!isScrolling()) {
            mScroller = new ScrollingProcessor(offset, listener);
            mScroller.scroll();
        }
    }
525395
function updateScrollbars(cm) {
    var d = cm.display, docHeight = cm.doc.height;
    var totalHeight = docHeight + paddingVert(d);
    d.sizer.style.minHeight = d.heightForcer.style.top = totalHeight + "px";
    d.gutters.style.height = Math.max(totalHeight, d.scroller.clientHeight - scrollerCutOff) + "px";
    var scrollHeight = Math.max(totalHeight, d.scroller.scrollHeight);
    var needsH = d.scroller.scrollWidth > (d.scroller.clientWidth + 1);
    var needsV = scrollHeight > (d.scroller.clientHeight + 1);
    if (needsV) {
      d.scrollbarV.style.display = "block";
      d.scrollbarV.style.bottom = needsH ? scrollbarWidth(d.measure) + "px" : "0";
      d.scrollbarV.firstChild.style.height =
        (scrollHeight - d.scroller.clientHeight + d.scrollbarV.clientHeight) + "px";
    } else d.scrollbarV.style.display = "";
    if (needsH) {
      d.scrollbarH.style.display = "block";
      d.scrollbarH.style.right = needsV ? scrollbarWidth(d.measure) + "px" : "0";
      d.scrollbarH.firstChild.style.width =
        (d.scroller.scrollWidth - d.scroller.clientWidth + d.scrollbarH.clientWidth) + "px";
    } else d.scrollbarH.style.display = "";
    if (needsH && needsV) {
      d.scrollbarFiller.style.display = "block";
      d.scrollbarFiller.style.height = d.scrollbarFiller.style.width = scrollbarWidth(d.measure) + "px";
    } else d.scrollbarFiller.style.display = "";
    if (needsH && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
      d.gutterFiller.style.display = "block";
      d.gutterFiller.style.height = scrollbarWidth(d.measure) + "px";
      d.gutterFiller.style.width = d.gutters.offsetWidth + "px";
    } else d.gutterFiller.style.display = "";

    if (mac_geLion && scrollbarWidth(d.measure) === 0)
      d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = mac_geMountainLion ? "18px" : "12px";
  }
902905
public void showRerouteState() {
    if (rerouteLayout.getVisibility() == INVISIBLE) {
      rerouteLayout.startAnimation(rerouteSlideDownTop);
      rerouteLayout.setVisibility(VISIBLE);
    }
  }
488981
function initOverlayScrollbarsStatics() {
                if(!_pluginsGlobals)
                    _pluginsGlobals = new OverlayScrollbarsGlobals(_pluginsOptions._defaults);
                if(!_pluginsAutoUpdateLoop)
                    _pluginsAutoUpdateLoop = new OverlayScrollbarsAutoUpdateLoop(_pluginsGlobals);
            }
317908
def render(self, display):
        """"""

        # the bar
        bar_rect = pygame.Rect(0, 0, self.width, self.height // 3)
        bar_rect.center = self.center
        display.fill(self.bg_color, bar_rect)

        # the cursor
        circle(display, (self.value_px, self.centery), self.height // 2, self.color)

        # the value
        if self.show_val:
            self.text_val.render(display)
811523
function cacheScrollState(paneId) {
        _forEachPaneOrPanes(paneId, function (pane) {
            _paneScrollStates[pane.id] = pane.getScrollState();
        });
    }
594797
void scrollByInternal(int x, int y) {
        int overscrollX = 0, overscrollY = 0;
        consumePendingUpdateOperations();
        if (mAdapter != null) {
            eatRequestLayout();
            if (x != 0) {
                final int hresult = mLayout.scrollHorizontallyBy(x, mRecycler, mState);
                overscrollX = x - hresult;
            }
            if (y != 0) {
                final int vresult = mLayout.scrollVerticallyBy(y, mRecycler, mState);
                overscrollY = y - vresult;
            }
            resumeRequestLayout(false);
        }

        if (!mItemDecorations.isEmpty()) {
            invalidate();
        }
        if (ViewCompat.getOverScrollMode(this) != ViewCompat.OVER_SCROLL_NEVER) {
            pullGlows(overscrollX, overscrollY);
        }
        if (mScrollListener != null && (x != 0 || y != 0)) {
            mScrollListener.onScrolled(x, y);
        }
        if (!awakenScrollBars()) {
            invalidate();
        }
    }
943081
private void checkScrollBar(AdjustmentEvent e) {
        //  The scroll bar listModel contains information needed to determine
        //  whether the viewport should be repositioned or not.
        JScrollBar jsb = (JScrollBar) e.getSource();
        BoundedRangeModel listModel = jsb.getModel();
        int value = listModel.getValue();
        int extent = listModel.getExtent();
        int maximum = listModel.getMaximum();
        boolean valueChanged = previousValue != value;
        boolean maximumChanged = previousMaximum != maximum;
        //  Check if the user has manually repositioned the scrollbar
        if (valueChanged && !maximumChanged) {
            if (viewportPosition == START) {
                adjustScrollBar = value != 0;
            } else {
                adjustScrollBar = value + extent >= maximum;
            }
        }
        //  Reset the "value" so we can reposition the viewport and
        //  distinguish between a user scroll and a program scroll.
        //  (ie. valueChanged will be false on a program scroll)
        if (adjustScrollBar && viewportPosition == END) {
            //  Scroll the viewport to the end.
            jsb.removeAdjustmentListener(this);
            value = maximum - extent;
            jsb.setValue(value);
            jsb.addAdjustmentListener(this);
        }
        if (adjustScrollBar && viewportPosition == START) {
            //  Keep the viewport at the same relative viewportPosition
            jsb.removeAdjustmentListener(this);
            value = value + maximum - previousMaximum;
            jsb.setValue(value);
            jsb.addAdjustmentListener(this);
        }
        previousValue = value;
        previousMaximum = maximum;
    }
603568
function handleWindowResize () {
    ctrl.lastSelectedIndex = ctrl.selectedIndex;
    ctrl.offsetLeft        = fixOffset(ctrl.offsetLeft);

    $mdUtil.nextTick(function () {
      ctrl.updateInkBarStyles();
      updatePagination();
    });
  }
1331226
function (ui, context) {
					var active = color.active;
					if (context != colorBar && active.val() == null) return;
					switch (settings.color.mode) {
					case 'h':
						active.val('h', {
							h: 360 - ui.val('y')
						}, context);
						break;
					case 's':
						active.val('s', {
							s: 100 - ui.val('y')
						}, context);
						break;
					case 'v':
						active.val('v', {
							v: 100 - ui.val('y')
						}, context);
						break;
					case 'r':
						active.val('r', {
							r: 255 - ui.val('y')
						}, context);
						break;
					case 'g':
						active.val('g', {
							g: 255 - ui.val('y')
						}, context);
						break;
					case 'b':
						active.val('b', {
							b: 255 - ui.val('y')
						}, context);
						break;
					case 'a':
						active.val('a', 255 - ui.val('y'), context);
						break;
					}
				}
391766
def _onShortcutScroll(self, down):
        
        value = self.verticalScrollBar().value()
        if down:
            value += 1
        else:
            value -= 1
        self.verticalScrollBar().setValue(value)
848494
def pa_pan(self, viewer, event, msg=True):
        
        return self.gs_pan(viewer, event.state,
                           event.delta_x, event.delta_y, msg=msg)
921637
def scroll_x(self, pixels, relative=True):
        '''
        
        '''
        if relative:
            self.offset.x += int(pixels)
        else:
            self.offset.x = int(pixels)
        self._update()
1261324
def _scroll_contents(self, adj):
        
        if self._adjusting:
            return True

        try:
            pos_x = self.hsb.get_value()
            pos_y = self.vsb.get_value()

            pct_x = pos_x / self.rng_x
            # invert Y pct because of orientation of scrollbar
            pct_y = 1.0 - (pos_y / self.rng_y)

            bd = self.viewer.get_bindings()
            bd.pan_by_pct(self.viewer, pct_x, pct_y, pad=self.pad)

            # This shouldn't be necessary, but seems to be
            self.viewer.redraw(whence=0)

        finally:
            self._scrolling = False

        return True
16002
void adjustScroll() {

        iTreeHeight = iRowHeight * (iRowCount + 1);

        // correct would be iMaxTextLength + iMaxIndent*iIndentWidth
        iTreeWidth = iMaxTextLength * 2;

        sbHoriz.setValues(iX, iWidth, 0, iTreeWidth);

        int v = iY / iRowHeight,
            h = iHeight / iRowHeight;

        sbVert.setValues(v, h, 0, iRowCount + 1);

        iX = sbHoriz.getValue();
        iY = iRowHeight * sbVert.getValue();
    }
1011966
def bar_touched(self, bar, touch):
        """"""
        self.scrolling = True
        self._start_bar_pos_hint = get_pos_hint(bar.pos_hint, *bar.size_hint)
        self._start_touch_pos_hint = (
            touch.x / self.width,
            touch.y / self.height
        )
        self._start_bar_touch_hint = (
            self._start_touch_pos_hint[0] - self._start_bar_pos_hint[0],
            self._start_touch_pos_hint[1] - self._start_bar_pos_hint[1]
        )
        touch.grab(self)