forked from KNEMC/KLALB
39 lines
1.0 KiB
Java
39 lines
1.0 KiB
Java
package org.kne.cloud.klalb.uitool;
|
|
|
|
import java.awt.BorderLayout;
|
|
import java.awt.Color;
|
|
import java.awt.Font;
|
|
|
|
import javax.swing.JButton;
|
|
import javax.swing.JCheckBox;
|
|
import javax.swing.JRadioButton;
|
|
import javax.swing.SwingConstants;
|
|
|
|
import org.kne.cloud.klalb.uitool.SettingItem;
|
|
import org.kne.cloud.network.klalb.ui.UIEnv;
|
|
|
|
public class RadioButtonSettingItem extends SettingItem {
|
|
protected JRadioButton button;
|
|
|
|
|
|
public JRadioButton getRadioButton() {
|
|
return button;
|
|
}
|
|
public RadioButtonSettingItem(String text,int w,int h) {
|
|
this(text,UIEnv.getFont().deriveFont((float) 15.0),w,h);
|
|
}
|
|
/**
|
|
* @wbp.parser.constructor
|
|
*/
|
|
public RadioButtonSettingItem(String text, Font deriveFont,int w,int h) {
|
|
super(text,deriveFont,w,h);
|
|
button = new JRadioButton();
|
|
button.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
getPanel().add(button, BorderLayout.CENTER);
|
|
button.setBorder(null);
|
|
button.setOpaque(false);
|
|
button.setBackground(new Color(0,0,0,0));
|
|
label.setForeground(Color.GRAY);
|
|
}
|
|
}
|