private void drawHorizontal(Graphics g){
    	 int ch, cw;
         Rectangle trackBounds = trackRect;
         Graphics2D g2 = (Graphics2D) g;
         ch = 3;
         cw = trackBounds.width;
         
         //内部整个view的偏移
         g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
         g2.translate(trackBounds.x, trackBounds.y + ch + 3);

         // 背景设为灰色
         g2.setPaint(Color.decode(unFillColor));
         g2.fillRect(0, -ch + 1 , cw + thumbRect.width/2, ch );

         int trackLeft = 0;
         int trackRight = 0;
         trackRight = trackRect.width;

         int middleOfThumb = 0;

         int fillLeft = 0;

         int fillRight = 0;

         //坐标换算
         middleOfThumb = thumbRect.x + (thumbRect.width / 2);
         middleOfThumb -= trackRect.x;

         if (!drawInverted()) {
            fillLeft = !slider.isEnabled() ? trackLeft : trackLeft + 1;
            fillRight = middleOfThumb;
         } else {
            fillLeft = middleOfThumb;
            fillRight = !slider.isEnabled() ? trackRight - 1 : trackRight - 2;
         }
         // 设定左边背景
         g2.setPaint(Color.decode(fillColor));
         g2.fillRect(0, -ch + 1, fillRight - fillLeft + thumbRect.width/2, ch );

         //圆点的背景
         g2.setPaint(Color.decode(ballColor));
         g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_OFF);
         g2.translate(-trackBounds.x + thumbRect.width/2, -(trackBounds.y + ch + 1));
    }