public JavaScriptSupportGroup(Composite composite, WizardPage projectWizardFirstPage) { final int numColumns = 3; fGroup = new Group(composite, SWT.NONE); fGroup.setFont(composite.getFont()); fGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fGroup.setLayout(initGridLayout(new GridLayout(numColumns, false), true)); fGroup.setText(PHPUIMessages.JavaScriptSupportGroup_OptionBlockTitle); // $NON-NLS-1$ fEnableJavaScriptSupport = new Button(fGroup, SWT.CHECK | SWT.RIGHT); fEnableJavaScriptSupport.setText( PHPUIMessages.JavaScriptSupportGroup_EnableSupport); // $NON-NLS-1$ fEnableJavaScriptSupport.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); fEnableJavaScriptSupport.addSelectionListener(this); fEnableJavaScriptSupport.setSelection( PHPUiPlugin.getDefault() .getPreferenceStore() .getBoolean((PreferenceConstants.JavaScriptSupportEnable))); }
private void createIconStyleGroup(final Composite parent) { Group group = new Group(parent, SWT.NONE); group.setLayout(new GridLayout()); GridData iconGroupData = new GridData(SWT.FILL, SWT.FILL, false, false); group.setLayoutData(iconGroupData); group.setText("SWT MessageBox Icon Styles"); iconErrorButton = new Button(group, SWT.RADIO); iconErrorButton.setText("SWT.ICON_ERROR"); iconInformationButton = new Button(group, SWT.RADIO); iconInformationButton.setText("SWT.ICON_INFORMATION"); iconQuestionButton = new Button(group, SWT.RADIO); iconQuestionButton.setText("SWT.ICON_QUESTION"); iconWarningButton = new Button(group, SWT.RADIO); iconWarningButton.setText("SWT.ICON_WARNING"); iconWorkingButton = new Button(group, SWT.RADIO); iconWorkingButton.setText("SWT.ICON_WORKING"); noIconButton = new Button(group, SWT.RADIO); noIconButton.setText("No Icon"); noIconButton.setSelection(true); }
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; }
private void createButtonStyleGroup(final Composite parent) { Group group = new Group(parent, SWT.NONE); group.setLayout(new GridLayout()); GridData layoutData = new GridData(SWT.FILL, SWT.FILL, false, false); group.setLayoutData(layoutData); group.setText("SWT MessageBox Styles"); okButton = new Button(group, SWT.CHECK); okButton.setText("SWT.OK"); cancelButton = new Button(group, SWT.CHECK); cancelButton.setText("SWT.CANCEL"); yesButton = new Button(group, SWT.CHECK); yesButton.setText("SWT.YES"); noButton = new Button(group, SWT.CHECK); noButton.setText("SWT.NO"); retryButton = new Button(group, SWT.CHECK); retryButton.setText("SWT.RETRY"); abortButton = new Button(group, SWT.CHECK); abortButton.setText("SWT.ABORT"); ignoreButton = new Button(group, SWT.CHECK); ignoreButton.setText("SWT.IGNORE"); }
public VersionGroup(Composite composite) { final int numColumns = 3; final Group group = new Group(composite, SWT.NONE); group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group.setLayout(initGridLayout(new GridLayout(numColumns, false), true)); group.setText(PHPUIMessages.VersionGroup_OptionBlock_Title); // $NON-NLS-1$ fDefaultValues = new SelectionButtonDialogField(SWT.RADIO); fDefaultValues.setDialogFieldListener(this); fDefaultValues.setLabelText( PHPUIMessages.VersionGroup_OptionBlock_fDefaultValues); // $NON-NLS-1$ fCustomValues = new SelectionButtonDialogField(SWT.RADIO); fCustomValues.setDialogFieldListener(this); fCustomValues.setLabelText( PHPUIMessages.VersionGroup_OptionBlock_fCustomValues); // $NON-NLS-1$ fDefaultValues.setSelection(true); fCustomValues.setSelection(false); fDefaultValues.doFillIntoGrid(group, numColumns); fCustomValues.doFillIntoGrid(group, 2); fConfigurationBlock = createConfigurationBlock( new IStatusChangeListener() { public void statusChanged(IStatus status) {} }, (IProject) null, null); fConfigurationBlock.createContents(group); fConfigurationBlock.setEnabled(false); // fPreferenceLink = new Link(fGroup, SWT.NONE); // fPreferenceLink.setText(PHPUIMessages.getString("ToggleLinkingAction_link_description")); // //fPreferenceLink.setLayoutData(new GridData(GridData.END, // GridData.END, false, false)); // fPreferenceLink.setLayoutData(new GridData(SWT.END, // SWT.BEGINNING, true, false)); // fPreferenceLink.addSelectionListener(this); // fPreferenceLink.setEnabled(true); }
public LayoutGroup(Composite composite) { final int numColumns = 3; fStdRadio = new SelectionButtonDialogField(SWT.RADIO); fStdRadio.setLabelText(PHPUIMessages.LayoutGroup_OptionBlock_ProjectSrc); // $NON-NLS-1$ fStdRadio.setDialogFieldListener(this); fSrcBinRadio = new SelectionButtonDialogField(SWT.RADIO); fSrcBinRadio.setLabelText(PHPUIMessages.LayoutGroup_OptionBlock_SrcResources); // $NON-NLS-1$ fSrcBinRadio.setDialogFieldListener(this); // getting Preferences default choice boolean useSrcBin = PreferenceConstants.getPreferenceStore() .getBoolean(PreferenceConstants.SRCBIN_FOLDERS_IN_NEWPROJ); fSrcBinRadio.setSelection(useSrcBin); fStdRadio.setSelection(!useSrcBin); // createContent fGroup = new Group(composite, SWT.NONE); fGroup.setFont(composite.getFont()); fGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); fGroup.setLayout(initGridLayout(new GridLayout(numColumns, false), true)); fGroup.setText(PHPUIMessages.LayoutGroup_OptionBlock_Title); // $NON-NLS-1$ fStdRadio.doFillIntoGrid(fGroup, 3); LayoutUtil.setHorizontalGrabbing(fStdRadio.getSelectionButton(null)); fSrcBinRadio.doFillIntoGrid(fGroup, 2); fPreferenceLink = new Link(fGroup, SWT.NONE); fPreferenceLink.setText(PHPUIMessages.ToggleLinkingAction_link_description); // $NON-NLS-1$ fPreferenceLink.setLayoutData(new GridData(SWT.END, SWT.BEGINNING, true, false)); fPreferenceLink.addSelectionListener(this); fPreferenceLink.setEnabled(true); updateEnableState(); }
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; }
protected void createExampleControls(final Composite parent) { parent.setLayout(new GridLayout()); Group group1 = new Group(parent, SWT.NONE); group1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group1.setText("JFace Dialogs"); group1.setLayout(new GridLayout(3, true)); // JFace input dialog Button showInputDlgButton = new Button(group1, SWT.PUSH); showInputDlgButton.setText("Input Dialog"); showInputDlgButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { showInputDialog(); } }); showInputDlgButton.setLayoutData(createGridDataFillBoth()); Button showProgressDlgButton = new Button(group1, SWT.PUSH); showProgressDlgButton.setText("ProgressDialog"); showProgressDlgButton.setLayoutData(createGridDataFillBoth()); showProgressDlgButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent e) { showProgressDialog(); } }); insertSpaceLabels(group1, 1); inputDlgResLabel = new Label(group1, SWT.WRAP); inputDlgResLabel.setText("Result:"); GridData gdInputDlgResLabel = new GridData(); gdInputDlgResLabel.horizontalSpan = 3; inputDlgResLabel.setLayoutData(gdInputDlgResLabel); Button showMessageInfoDlgButton = new Button(group1, SWT.PUSH); showMessageInfoDlgButton.setLayoutData(createGridDataFillBoth()); showMessageInfoDlgButton.setText("Info Message"); showMessageInfoDlgButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { showMessageDialogInfo(); } }); Button showMessageWarningDlgButton = new Button(group1, SWT.PUSH); showMessageWarningDlgButton.setLayoutData(createGridDataFillBoth()); showMessageWarningDlgButton.setText("Warning Dialog"); showMessageWarningDlgButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { showMessageDialogWarning(); } }); Button showMessageErrorDlgButton = new Button(group1, SWT.PUSH); showMessageErrorDlgButton.setLayoutData(createGridDataFillBoth()); showMessageErrorDlgButton.setText("Error Message"); showMessageErrorDlgButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { showMessageDialogError(); } }); Button showMessageQuestionDlgButton = new Button(group1, SWT.PUSH); showMessageQuestionDlgButton.setLayoutData(createGridDataFillBoth()); showMessageQuestionDlgButton.setText("Question Dialog"); showMessageQuestionDlgButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { showMessageDialogQuestion(); } }); Button showMessageConfirmDlgButton = new Button(group1, SWT.PUSH); showMessageConfirmDlgButton.setLayoutData(createGridDataFillBoth()); showMessageConfirmDlgButton.setText("Confirm Message"); showMessageConfirmDlgButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { showMessageDialogConfirm(); } }); insertSpaceLabels(group1, 1); messageDlgResLabel = new Label(group1, SWT.WRAP); messageDlgResLabel.setText("Result:"); insertSpaceLabels(group1, 2); Button showErrorDlgButton = new Button(group1, SWT.PUSH); showErrorDlgButton.setLayoutData(createGridDataFillBoth()); showErrorDlgButton.setText("Error Dialog"); showErrorDlgButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { showErrorDialog(); } }); insertSpaceLabels(group1, 2); errorDlgResLabel = new Label(group1, SWT.WRAP); errorDlgResLabel.setText("Result:"); insertSpaceLabels(group1, 2); Group group2 = new Group(parent, SWT.NONE); group2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); group2.setText("Custom Dialogs"); group2.setLayout(new GridLayout(3, true)); Button showLoginDlgButton = new Button(group2, SWT.PUSH); showLoginDlgButton.setText("Login Dialog"); showLoginDlgButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { showLoginDialog(); } }); showLoginDlgButton.setLayoutData(createGridDataFillBoth()); insertSpaceLabels(group2, 2); loginDlgResLabel = new Label(group2, SWT.WRAP); loginDlgResLabel.setText("Result:"); Group swtDialogsGroup = new Group(parent, SWT.NONE); swtDialogsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); swtDialogsGroup.setText("SWT Dialogs"); swtDialogsGroup.setLayout(new GridLayout(3, true)); showMessageBoxDlgButton = new Button(swtDialogsGroup, SWT.PUSH); showMessageBoxDlgButton.setText("MessageBox Dialog"); showMessageBoxDlgButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { showMessageBoxDialog(); } }); showMessageBoxDlgButton.setLayoutData(createGridDataFillBoth()); showColorDialogButton = new Button(swtDialogsGroup, SWT.PUSH); showColorDialogButton.setText("ColorDialog"); showColorDialogButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent e) { showColorDialog(); } }); showColorDialogButton.setLayoutData(createGridDataFillBoth()); showFontDialogButton = new Button(swtDialogsGroup, SWT.PUSH); showFontDialogButton.setText("FontDialog"); showFontDialogButton.addSelectionListener( new SelectionAdapter() { public void widgetSelected(final SelectionEvent e) { showFontDialog(); } }); showFontDialogButton.setLayoutData(createGridDataFillBoth()); messageBoxDlgResLabel = new Label(swtDialogsGroup, SWT.WRAP); messageBoxDlgResLabel.setText("Result:"); GridData gdMessageBoxDlgResLabel = new GridData(); gdMessageBoxDlgResLabel.horizontalSpan = 3; messageBoxDlgResLabel.setLayoutData(gdMessageBoxDlgResLabel); }