Example usage for com.intellij.openapi.ui LabeledComponent setEnabled

List of usage examples for com.intellij.openapi.ui LabeledComponent setEnabled

Introduction

In this page you can find the example usage for com.intellij.openapi.ui LabeledComponent setEnabled.

Prototype

@Override
    public void setEnabled(boolean enabled) 

Source Link

Usage

From source file:org.jetbrains.plugins.ruby.ruby.run.confuguration.RubyRunConfigurationUIUtil.java

License:Apache License

public static void addAlternativeSDKActionListener(final JCheckBox useAlternativeSdkCB,
        final LabeledComponent alternativeSdksComponent, final JComboBox modulesComboBox) {
    useAlternativeSdkCB.addActionListener(new ActionListener() {
        @Override/*from w  w w.ja v  a2 s. com*/
        public void actionPerformed(final ActionEvent e) {
            final boolean useAlternativeSDK = useAlternativeSdkCB.isSelected();
            alternativeSdksComponent.setEnabled(useAlternativeSDK);
            modulesComboBox.setEnabled(!useAlternativeSDK);
        }
    });
}