4632N/A protected Hit fMousePart = Hit.NONE; // Which arrow (if any) we moused pressed down in (used by arrow drag tracking)
4632N/A protected final AquaPainter<ScrollBarState> painter = AquaPainter.create(JRSUIStateFactory.getScrollBar());
4632N/A return new AquaScrollBarUI();
4632N/A return new TrackListener();
4632N/A return new ScrollListener();
4632N/A return new PropertyChangeHandler();
4632N/A return new ModelListener();
4632N/A final float trackExtent = fScrollBar.getMaximum() - fScrollBar.getMinimum() - fScrollBar.getModel().getExtent();
4632N/A static final RecyclableSingleton<Map<Hit, ScrollBarPart>> hitToPressedPartMap = new RecyclableSingleton<Map<Hit,ScrollBarPart>>(){
4632N/A return pressedPart;
4632N/A return MIN_ARROW_COLLAPSE_SIZE < (isHorizontal() ? fScrollBar.getWidth() : fScrollBar.getHeight());
4632N/A fScrollTimer.setInitialDelay(initial ? kInitialDelay : kNormalDelay); // default InitialDelay?
4632N/A synchronized(fScrollBar) {
4632N/A synchronized(fScrollBar) {
4632N/A return JRSUIUtils.HitDetection.getHitForPoint(painter.getControl(), 0, 0, fScrollBar.getWidth(), fScrollBar.getHeight(), x, y);
4632N/A protected transient boolean fStillInArrow = false; // Whether mouse is in an arrow during arrow tracking
4632N/A protected transient boolean fStillInTrack = false; // Whether mouse is in the track during pageup/down tracking
4632N/A protected transient int fFirstMouseX, fFirstMouseY, fFirstValue; // Values for getValueFromOffset
4632N/A fStillInArrow = false;
4632N/A fStillInTrack = false;
4632N/A } else if (fIsDragging) {
4639N/A fStillInTrack = false;
4632N/A if (!fStillInTrack) {
4632N/A startTimer(false);
4632N/A final double offsetChange = JRSUIUtils.ScrollBar.getNativeOffsetChange(painter.getControl(), 0, 0, fScrollBar.getWidth(), fScrollBar.getHeight(), offsetWeCareAbout, visibleAmt, extent);
4632N/A fStillInArrow = true;
4632N/A startTimer(true);
4632N/A fStillInArrow = false;
4632N/A // We are in the arrow we mouse pressed down in originally, but the timer was stopped so we need
4632N/A fStillInArrow = true;
4632N/A startTimer(false);
4632N/A fIsDragging = false;
4632N/A boolean shouldScrollToHere = (part != ScrollBarHit.THUMB) && JRSUIUtils.ScrollBar.useScrollToClick();
4632N/A // pretend the mouse was dragged from a point in the current thumb to the current mouse point in one big jump
4632N/A if (shouldScrollToHere) {
4632N/A fFirstMouseX = p.x;
4632N/A fFirstMouseY = p.y;
4632N/A moveToMouse(e);
4632N/A fIsDragging = true;
4632N/A fIsDragging = true;
4632N/A fIsDragging = false;
4632N/A fStillInTrack = true;
4632N/A startTimer(true);
4632N/A moveToMouse(e);
4632N/A final int newValue = getValueFromOffset(fCurrentMouseX - fFirstMouseX, fCurrentMouseY - fFirstMouseY, fFirstValue);
4632N/A if (fUseBlockIncrement) {
4632N/A if (fDirection > 0 && fScrollBar.getValue() + fScrollBar.getVisibleAmount() >= fScrollBar.getMaximum()) {
4632N/A JRSUIUtils.ScrollBar.getPartBounds(rect, painter.getControl(), 0, 0, fScrollBar.getWidth(), fScrollBar.getHeight(), ScrollBarPart.THUMB);
4632N/A if (isHorizontal()) {
4632N/A return startPoint;
4632N/A return startPoint;