private Composite createScrollArea(Composite parent) { Group container = new Group(parent, SWT.NONE); GridLayout layout = new GridLayout(2, false); layout.marginWidth = layout.marginHeight = 6; container.setLayout(layout); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 3; container.setLayoutData(gd); container.setText(PDEUIMessages.ImportWizard_DetailedPage_filter); Label filterLabel = new Label(container, SWT.NONE); filterLabel.setText(PDEUIMessages.ImportWizard_DetailedPage_search); fFilterText = new Text(container, SWT.BORDER); fFilterText.setText(""); // $NON-NLS-1$ gd = new GridData(GridData.FILL_HORIZONTAL); fFilterText.setLayoutData(gd); return container; }
/* (non-Javadoc) * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#createAdvancedControls(org.eclipse.swt.widgets.Composite) */ protected void createAdvancedControls(Composite parent) { fGroup = new Group(parent, SWT.NONE); fGroup.setText(PDEUIMessages.ProductFileWizadPage_groupTitle); fGroup.setLayout(new GridLayout(2, false)); fGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fBasicButton = new Button(fGroup, SWT.RADIO); GridData gd = new GridData(); gd.horizontalSpan = 2; fBasicButton.setLayoutData(gd); fBasicButton.setText(PDEUIMessages.ProductFileWizadPage_basic); fProductButton = new Button(fGroup, SWT.RADIO); fProductButton.setText(PDEUIMessages.ProductFileWizadPage_existingProduct); fProductButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fProductCombo.setEnabled(fProductButton.getSelection()); } }); fProductCombo = new Combo(fGroup, SWT.SINGLE | SWT.READ_ONLY); fProductCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fProductCombo.setItems(TargetPlatform.getProducts()); fLaunchConfigButton = new Button(fGroup, SWT.RADIO); fLaunchConfigButton.setText(PDEUIMessages.ProductFileWizadPage_existingLaunchConfig); fLaunchConfigButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { fLaunchConfigCombo.setEnabled(fLaunchConfigButton.getSelection()); } }); fLaunchConfigCombo = new Combo(fGroup, SWT.SINGLE | SWT.READ_ONLY); fLaunchConfigCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fLaunchConfigCombo.setItems(getLaunchConfigurations()); initializeState(); }
private Control createArgumentsGroup(Composite parent) { Composite container = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH); SWTFactory.createWrapLabel(container, PDEUIMessages.JavaArgumentsTab_description, 1); Group programGroup = SWTFactory.createGroup( container, PDEUIMessages.JavaArgumentsTab_progamArgsGroup, 1, 1, GridData.FILL_HORIZONTAL); fProgramArgs = SWTFactory.createText( programGroup, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL, 1, 200, 60, GridData.FILL_BOTH); fProgramArgs.addModifyListener( new ModifyListener() { public void modifyText(ModifyEvent e) { getTargetDefinition().setProgramArguments(fProgramArgs.getText().trim()); } }); Composite programButtons = SWTFactory.createComposite(programGroup, 1, 1, GridData.HORIZONTAL_ALIGN_END, 0, 0); Button programVars = SWTFactory.createPushButton( programButtons, PDEUIMessages.JavaArgumentsTab_programVariables, null, GridData.HORIZONTAL_ALIGN_END); programVars.addSelectionListener(getVariablesListener(fProgramArgs)); Group vmGroup = new Group(container, SWT.NONE); vmGroup.setLayout(new GridLayout(1, false)); vmGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); vmGroup.setText(PDEUIMessages.JavaArgumentsTab_vmArgsGroup); vmGroup.setFont(container.getFont()); fVMArgs = SWTFactory.createText( vmGroup, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL, 1, 200, 60, GridData.FILL_BOTH); fVMArgs.addModifyListener( new ModifyListener() { public void modifyText(ModifyEvent e) { getTargetDefinition().setVMArguments(fVMArgs.getText().trim()); } }); Composite buttons = SWTFactory.createComposite(vmGroup, 2, 1, GridData.HORIZONTAL_ALIGN_END, 0, 0); Button vmArgs = SWTFactory.createPushButton( buttons, PDEUIMessages.JavaArgumentsTab_addVMArgs, null, GridData.HORIZONTAL_ALIGN_END); vmArgs.addSelectionListener(getVMArgsListener(fVMArgs)); Button vmVars = SWTFactory.createPushButton( buttons, PDEUIMessages.JavaArgumentsTab_vmVariables, null, GridData.HORIZONTAL_ALIGN_END); vmVars.addSelectionListener(getVariablesListener(fVMArgs)); return container; }