Example usage for org.eclipse.jface.dialogs ControlEnableState disable

List of usage examples for org.eclipse.jface.dialogs ControlEnableState disable

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs ControlEnableState disable.

Prototype

public static ControlEnableState disable(Control w, List<Control> exceptions) 

Source Link

Document

Saves the current enable/disable state of the given control and its descendents in the returned object except for the given list of exception cases; the controls that are saved are also disabled.

Usage

From source file:org.eclipse.pde.ds.internal.annotations.DSAnnotationPropertyPage.java

License:Open Source License

private void enablePreferenceContent(boolean enable) {
    if (enable) {
        if (configBlockEnableState != null) {
            configBlockEnableState.restore();
            configBlockEnableState = null;
        }/*w  ww. j  a  va 2  s.  c o m*/
    } else {
        if (configBlockEnableState == null) {
            configBlockEnableState = ControlEnableState.disable(configBlockControl,
                    Arrays.asList(optionBlockControl));
        }
    }
}