package org.kne.cloud.klalb.uitool;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.font.TextAttribute;
import java.util.Map;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JSlider;
import javax.swing.JTextField;
import java.awt.BorderLayout;
import javax.swing.SwingConstants;
import org.kne.cloud.network.klalb.ui.UIEnv;

public class SliderSettingItem extends SettingItem {
	protected JSlider slider;
	protected JLabel labelx;
	
	public JLabel getLabelx() {
		return labelx;
	}
	public JSlider getSlider() {
		return slider;
	}
	public SliderSettingItem(String text,int w,int h) {
		this(text,UIEnv.getFont().deriveFont((float) 15.0),w,h);
	}
	/**
	 * @wbp.parser.constructor
	 */
	public SliderSettingItem(String text, Font deriveFont,int w,int h) {
		super(text,deriveFont,w,h);
		BorderLayout borderLayout = (BorderLayout) getPanel().getLayout();
		slider = new JSlider();
		getPanel().add(slider, BorderLayout.CENTER);
		slider.setBorder(null);
		slider.setOpaque(false);
		slider.setBackground(new Color(0,0,0,0));
		label.setForeground(Color.GRAY);
		
		labelx = new JLabel();
		getPanel().add(labelx, BorderLayout.EAST);
		labelx.setFont(labelx.getFont());
		labelx.setBorder(null);
		labelx.setOpaque(false);
		labelx.setBackground(new Color(0,0,0,0));
		labelx.setPreferredSize(new Dimension(40, h));
	}
}
