package org.kne.cloud.klalb.uitool;

import java.awt.Color;
import java.awt.Font;
import java.awt.font.TextAttribute;
import java.util.Collections;
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 ButtonSettingItem extends SettingItem {
	protected JButton button;
	
	
	public JButton getButton() {
		return button;
	}
	public ButtonSettingItem(String text,int w,int h) {
		this(text,UIEnv.getFont().deriveFont((float) 15.0),w,h);
	}
/**
	 * @wbp.parser.constructor
	 */
	public ButtonSettingItem(String text, Font deriveFont,int w,int h) {
		super(text,deriveFont,w,h);
		button = new JButton(UIEnv.getRsb().getString("clicktoopen")+">>");
		button.setHorizontalAlignment(SwingConstants.RIGHT);
		button.setFont(button.getFont().deriveFont(Map.of(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON)));
		getPanel().add(button, BorderLayout.EAST);
		button.setBorder(null);
		button.setOpaque(false);
		button.setBackground(new Color(0,0,0,0));
		label.setForeground(Color.GRAY);
	}

}
