Revision b4e62664
Added by Alexander Oppermann about 9 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java | ||
---|---|---|
29 | 29 |
import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement; |
30 | 30 |
import org.eclipse.jface.preference.IPreferenceStore; |
31 | 31 |
import org.eclipse.jface.window.Window; |
32 |
import org.eclipse.swt.widgets.Composite; |
|
33 |
import org.eclipse.swt.widgets.Control; |
|
32 | 34 |
import org.eclipse.swt.widgets.Shell; |
33 | 35 |
import org.eclipse.ui.PlatformUI; |
34 | 36 |
|
... | ... | |
728 | 730 |
|
729 | 731 |
return p2Repos; |
730 | 732 |
} |
733 |
|
|
734 |
/** |
|
735 |
* enables/disables nested composite. <br> |
|
736 |
* |
|
737 |
* @param ctrl - Composite to be en-/disabeld |
|
738 |
* @param enabled - boolean |
|
739 |
*/ |
|
740 |
public static void recursiveSetEnabled(Control ctrl, boolean enabled) { |
|
741 |
if (ctrl instanceof Composite) { |
|
742 |
Composite comp = (Composite) ctrl; |
|
743 |
for (Control c : comp.getChildren()) { |
|
744 |
recursiveSetEnabled(c, enabled); |
|
745 |
} |
|
746 |
} else { |
|
747 |
ctrl.setEnabled(enabled); |
|
748 |
} |
|
749 |
} |
|
731 | 750 |
} |
Also available in: Unified diff
Fix ticket #4367