From: Atanas Gegov <atanas.ge...@bmw-carit.de> The YoctoUISetting form as a whole can be disabled and enabled using this method. A disabled form can for example show a read-only yocto configuration.
Signed-off-by: Timo Mueller <timo.muel...@bmw-carit.de> --- .../src/org/yocto/sdk/ide/YoctoUISetting.java | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoUISetting.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoUISetting.java index 9ec0d85..2e3c830 100644 --- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoUISetting.java +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoUISetting.java @@ -370,6 +370,50 @@ public class YoctoUISetting { return pass; } + public void setUIFormEnabledState(boolean isEnabled) { + btnSDKRoot.setEnabled(isEnabled); + btnPokyRoot.setEnabled(isEnabled); + + root_label.setEnabled(isEnabled); + textRootLoc.setEnabled(isEnabled); + btnToolChainLoc.setEnabled(isEnabled); + + sysroot_label.setEnabled(isEnabled); + textSysrootLoc.setEnabled(isEnabled); + btnSysrootLoc.setEnabled(isEnabled); + + targetArchLabel.setEnabled(isEnabled); + targetArchCombo.setEnabled(isEnabled); + + btnQemu.setEnabled(isEnabled); + + if(isEnabled) { + /* enabling widgets regarding + * Kernel and Custom Options + * depends on the state of the QEMU button */ + kernel_label.setEnabled(isEnabled); + option_label.setEnabled(isEnabled); + + if(btnQemu.getSelection()) { + textKernelLoc.setEnabled(isEnabled); + btnKernelLoc.setEnabled(isEnabled); + + textQemuOption.setEnabled(isEnabled); + } + } else { + /* disable all widgets regarding + * Kernel and Custom Options */ + kernel_label.setEnabled(isEnabled); + textKernelLoc.setEnabled(isEnabled); + btnKernelLoc.setEnabled(isEnabled); + + option_label.setEnabled(isEnabled); + textQemuOption.setEnabled(isEnabled); + } + + btnDevice.setEnabled(isEnabled); + } + private void updateQemuControlState() { boolean bQemuMode = btnQemu.getSelection(); -- 1.7.11.7 _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto