The moose likes Swing / AWT / SWT and the fly likes Enabling and disabling of FieldEditors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Enabling and disabling of FieldEditors" Watch "Enabling and disabling of FieldEditors" New topic

Enabling and disabling of FieldEditors

Rahul Gpt

Joined: Oct 06, 2010
Posts: 1
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());

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());

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

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

It would be very helpful if anyone can give some pointers as to how this can be done
Don't get me started about those stupid light bulbs.
subject: Enabling and disabling of FieldEditors
Similar Threads
Suitable datastructure for classes...?
Configuring Tomcat with IIS 5.0 (very Urgent)
HELP: Suitable datastructure for classes
from a round robin algorithm to best-fit
PrintWriter format and printf methods