public void mouseWheelMoved(MouseWheelEvent e) {
			StdScrollPane scrollpane = StdScrollPane.this;
			if (scrollpane.isWheelScrollingEnabled()
					&& e.getScrollAmount() != 0) {
				JScrollBar toScroll;
				int direction = 0;
				// find which scrollbar to scroll, or return if none
				if ((e.getModifiersEx() & MouseWheelEvent.SHIFT_DOWN_MASK) == 0) {
					toScroll = scrollpane.getVerticalScrollBar();
				} else {
					toScroll = scrollpane.getHorizontalScrollBar();
				}
				if (toScroll == null || !toScroll.isVisible()) {
					return;
				}
				direction = e.getWheelRotation() < 0 ? -1 : 1;
				if (e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) {
					scrollByUnits(toScroll, direction, e.getScrollAmount());
				} else if (e.getScrollType() == MouseWheelEvent.WHEEL_BLOCK_SCROLL) {
					scrollByBlock(toScroll, direction);
				}
			}
		}