PageRenderTime 47ms CodeModel.GetById 44ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/Console/console/gui/CheckBox.java

#
Java | 21 lines | 17 code | 4 blank | 0 comment | 0 complexity | 0005e0d02886fde45039a00f723e18f5 MD5 | raw file
 1package console.gui;
 2
 3import javax.swing.JCheckBox;
 4
 5import org.gjt.sp.jedit.jEdit;
 6
 7public class CheckBox extends JCheckBox
 8{
 9	String name;
10	public CheckBox(String propertyName) {
11		name = propertyName;
12		String label = jEdit.getProperty(propertyName);
13		boolean checked = jEdit.getBooleanProperty(name + ".checked", false);
14		setSelected(checked);
15		setText(label);
16	}
17
18	public void save() {
19		jEdit.setBooleanProperty(name + ".checked", isSelected());
20	}
21}