PageRenderTime 4ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/XML/sidekick/ecmascript/options/GeneralOptionPane.java

#
Java | 25 lines | 19 code | 6 blank | 0 comment | 0 complexity | 26266494843f340feff90a876a4656fa MD5 | raw file
 1package sidekick.ecmascript.options;
 2
 3import javax.swing.*;
 4import org.gjt.sp.jedit.*;
 5
 6public class GeneralOptionPane extends AbstractOptionPane {
 7
 8    private JCheckBox allNodes;
 9
10    public GeneralOptionPane() {
11        super( "sidekick.ecmascript" );
12    }
13
14    protected void _init() {
15        addComponent( allNodes = new JCheckBox( jEdit.getProperty(
16                    "options.sidekick.ecmascript.general.allNodes.label" ) ) );
17        boolean b = jEdit.getBooleanProperty( "sidekick.ecmascript.general.allNodes", false );
18        allNodes.setSelected( b );
19        System.setProperty("sidekick.ecmascript.general.allNodes", b ? "true" : "false");
20    }
21
22    protected void _save() {
23        jEdit.setBooleanProperty( "sidekick.ecmascript.general.allNodes", allNodes.isSelected() );
24    }
25}