[yocto] [RFC 03/17] plugins/sdk.ide: Add method to enable and disable form
Timo Mueller
mail at timomueller.eu
Thu Jan 24 07:12:27 PST 2013
From: Atanas Gegov <atanas.gegov at 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.mueller at 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 a4a3c09..d615956 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
@@ -371,6 +371,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
More information about the yocto
mailing list