public void createControl(Composite parent) { Composite maincomposite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginWidth = 0; layout.marginHeight = 0; layout.numColumns = 1; maincomposite.setLayout(layout); GridData data = new GridData(GridData.FILL_BOTH); maincomposite.setLayoutData(data); showAttributes(maincomposite); IModelPropertyEditorAdapter a = support.getPropertyEditorAdapterByName("value"); if (a instanceof JSFKnowledgeBaseAdapter) { ISelection s = getSpecificWizard().getWizardModel().getDropData().getSelectionProvider().getSelection(); if (s instanceof TextSelection) { int offset = ((TextSelection) s).getOffset(); context.put("offset", new Integer(offset)); } ((JSFKnowledgeBaseAdapter) a).setContext(context); } setControl(maincomposite); getSpecificWizard() .getWizardModel() .addPropertyChangeListener(IDropWizardModel.TAG_PROPOSAL, this); updateTitle(); runValidation(); }
public Composite fillGeneralOption(Composite generalTabContent) { GridLayout layout = new GridLayout(); layout.marginWidth = 0; layout.marginHeight = 0; layout.numColumns = 3; generalTabContent.setLayout(layout); XModel model = getXModel(); if (model == null) model = XModelFactory.getDefaultInstance(); support.init(model.getRoot(), data); Control c = support.createControl(generalTabContent); pcl = new PCL(); support.addPropertyChangeListener(pcl); fWizardModel = getSpecificWizard().getWizardModel(); mpcl = new MPCL(); fWizardModel.addPropertyChangeListener(mpcl); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 3; c.setLayoutData(data); data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); generalTabContent.setLayoutData(data); Label properties = new Label(generalTabContent, SWT.NONE); properties.setText(JsfUIMessages.DataTableWizardPage_Properties); data = new GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 3; properties.setLayoutData(data); propertyListEditor.setObject(propertyListObject); Control propertiesTable = propertyListEditor.createControl(generalTabContent); data = new GridData(GridData.FILL_BOTH); data.horizontalSpan = 3; propertiesTable.setLayoutData(data); return generalTabContent; }