Forums Register Login

Enabling and disabling of FieldEditors

+Pie Number of slices to send: Send
I have a doubt related usage FieldEditors in Plugin development. I have a preference page which basically consists of some StringFieldEditors, booleanFieldEditors, RadioGroupFieldEditors etc.

The problem I'm facing is as follows:

I have a booleanFiledEditor called "Full Details". The code for this is as follows:

BooleanFieldEditor fullDetails = new BooleanFieldEditor("fullDetails", "Full Details", org.eclipse.swt.SWT.NONE, getFieldEditorParent());
addField(fullDetails);

Once the user checks this boolean field, the StringFieldEditors which follow this booleanFieldEditor should get enabled. Otherwise they should remain disabled. The code for other StringFieldEditors are as follows:

StringFieldEditor machineName = new StringFieldEditor("machineName", "Host name", getFieldEditorParent());
addField(machineName);

StringFieldEditor ipaddress = new StringFieldEditor("ipaddress", "IP Address", getFieldEditorParent());
addField(ipaddress);

StringFieldEditor cpuinfo = new StringFieldEditor("cpuinfo", "CPU Info", getFieldEditorParent());
addField(cpuinfo);

It would be very helpful if anyone can give some pointers as to how this can be done
A magnificient life is loaded with tough challenges. En garde tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 891 times.
Similar Threads
HELP: Suitable datastructure for classes
PrintWriter format and printf methods
Suitable datastructure for classes...?
from a round robin algorithm to best-fit
Configuring Tomcat with IIS 5.0 (very Urgent)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 08:37:27.