{  switch (slider.getOrientation()) { case JSlider.HORIZONTAL: offset = currentMouseX-thumbRect.x; break; case JSlider.VERTICAL: offset = currentMouseY-thumbRect.y; } isDragging = true; return; }
super.mousePressed(event);
		public void mousePressed(MouseEvent event) 		{			// Check to see that the slider is enabled before proceeeding. 			if (!slider.isEnabled())				return;			// Get mouse x, y positions.			currentMouseX = event.getX();			currentMouseY = event.getY();			// If the slider has {@link #setFocusEnabled} true then 			// request focus.			if (slider.isRequestFocusEnabled())				slider.requestFocus();			// Check to see if the thumb was clicked. 			if (thumbRect.contains(currentMouseX, currentMouseY)) 			{				// Depending on orientation of the mouse. 				switch (slider.getOrientation()) {    				case JSlider.HORIZONTAL:    					offset = currentMouseX-thumbRect.x;    					break;    				case JSlider.VERTICAL:    					offset = currentMouseY-thumbRect.y;				}				isDragging = true;				return;			}						if (showArrows)	        {				if (minArrowRect.contains(currentMouseX, currentMouseY))	            {					int value = slider.getValue();	                if (value > slider.getMinimum())	                {	                	scrollTimer.stop();	                	scrollListener.setScrollByBlock(false);	                    scrollListener.setDirection(OneKnobSliderUI.NEGATIVE_SCROLL);	                    scrollTimer.start();	                    slider.repaint();	                }	                isDragging = false;	                return;     	            }	            if (maxArrowRect.contains(currentMouseX, currentMouseY))	            {	            	int value = slider.getValue();	                if (value < slider.getMaximum())	                {	                	scrollTimer.stop();	                	scrollListener.setScrollByBlock(false);	                    scrollListener.setDirection(                                OneKnobSliderUI.POSITIVE_SCROLL);	                    scrollTimer.start();	                    slider.repaint();	                }	                isDragging = false;	                return;	            }	        }						// We have clicked outside of the thumb and onto the track. 			isDragging = false;			slider.repaint();		}