package org.kne.cloud.klalb.uitool;

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

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

public class TextButtonSettingItem extends SettingItem {
	protected JTextField textField;
	protected JButton button;
	
	public JButton getButton() {
		return button;
	}
	public JTextField getTextField() {
		return textField;
	}
	public TextButtonSettingItem(String text,int w,int h) {
		this(text,UIEnv.getFont().deriveFont((float) 15.0),w,h);
	}
	/**
	 * @wbp.parser.constructor
	 */
	public TextButtonSettingItem(String text, Font deriveFont,int w,int h) {
		super(text,deriveFont,w,h);
		BorderLayout borderLayout = (BorderLayout) getPanel().getLayout();
		textField = new JTextField();
		textField.setHorizontalAlignment(SwingConstants.RIGHT);
		getPanel().add(textField, BorderLayout.CENTER);
		textField.setColumns(10);
		textField.setBorder(null);
		textField.setOpaque(false);
		textField.setBackground(new Color(0,0,0,0));
		label.setForeground(Color.GRAY);
		
		button = new JButton();
		getPanel().add(button, BorderLayout.EAST);
		button.setFont(button.getFont());
		//button.setBorder(null);
		//button.setOpaque(false);
		button.setBackground(new Color(0,0,0,0));
	}
}
