/** * Construct a decorated field which is parented by the specified composite * and has the given style bits. Use the controlCreator to create the * specific kind of control that is decorated inside the field. * * @param parent * the parent of the decorated field. * @param style * the desired style bits for the field. * @param controlCreator * the IControlCreator used to specify the specific kind of * control that is to be decorated. * * @see IControlCreator */ public DecoratedField(Composite parent, int style, IControlCreator controlCreator) { this.form = createForm(parent); this.control = controlCreator.createControl(form, style); addControlListeners(); form.setTabList(new Control[] { control }); // Set up the initial layout data. FormData data = new FormData(); data.left = new FormAttachment(0, 0); data.top = new FormAttachment(0, 0); data.right = new FormAttachment(100, 0); data.bottom = new FormAttachment(100, 0); control.setLayoutData(data); }
/** * Construct a decorated field which is parented by the specified composite * and has the given style bits. Use the controlCreator to create the * specific kind of control that is decorated inside the field. * * @param parent * the parent of the decorated field. * @param style * the desired style bits for the field. * @param controlCreator * the IControlCreator used to specify the specific kind of * control that is to be decorated. * * @see IControlCreator */ public DecoratedField(Composite parent, int style, IControlCreator controlCreator) { this.form = createForm(parent); this.control = controlCreator.createControl(form, style); addControlListeners(); form.setTabList(new Control[] { control }); // Set up the initial layout data. FormData data = new FormData(); data.left = new FormAttachment(0, 0); data.top = new FormAttachment(0, 0); data.right = new FormAttachment(100, 0); data.bottom = new FormAttachment(100, 0); control.setLayoutData(data); }
/** * Construct a decorated field which is parented by the specified composite * and has the given style bits. Use the controlCreator to create the * specific kind of control that is decorated inside the field. * * @param parent * the parent of the decorated field. * @param style * the desired style bits for the field. * @param controlCreator * the IControlCreator used to specify the specific kind of * control that is to be decorated. * * @see IControlCreator */ public DecoratedField(Composite parent, int style, IControlCreator controlCreator) { this.form = createForm(parent); this.control = controlCreator.createControl(form, style); addControlListeners(); form.setTabList(new Control[] { control }); // Set up the initial layout data. FormData data = new FormData(); data.left = new FormAttachment(0, 0); data.top = new FormAttachment(0, 0); data.right = new FormAttachment(100, 0); data.bottom = new FormAttachment(100, 0); control.setLayoutData(data); }