public static void enableWithChildren(Composite composite, boolean enable) { composite.setEnabled(enable); for (Control child : composite.getChildren()) { if (child instanceof Composite) { enableWithChildren((Composite) child, enable); } else { child.setEnabled(enable); } } }
@Override public void setEnabled(boolean v) { super.setEnabled(v); bar.setEnabled(v); }