package de.nplusc.izc.tools.UiToolz;


import java.awt.AlphaComposite;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JSlider;
import javax.swing.plaf.basic.BasicSliderUI;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author LH
 */
public class HoloSliderUi extends BasicSliderUI {

    public static Image sl = new ImageIcon("C:/users/LH/Desktop/jp/GUI-File-CMD-IP-SLDR.png").getImage();
    public HoloSliderUi(JSlider b) {
        super(b);
    }

    @Override
    public void paintTrack(Graphics g) {
        Graphics2D g2d = (Graphics2D) g;
        /*Rectangle r = trackRect;
        g2d.setPaint(new GradientPaint(
            r.x, r.y, Color.red, r.x + r.width, r.y + r.height, Color.blue));
        g.fillRect(r.x, r.y, r.width, r.height);*/
    }

    @Override
    public void paintThumb(Graphics g) {
        //super.paintThumb(g); // replace with your fill() 
        //((Graphics2D)g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP));
        ((Graphics2D)g).drawImage(sl, thumbRect.x, thumbRect.y,20,15,null);
    }
}

