protected Control createDialogArea(Composite parent) { Composite compositeTop = (Composite) super.createDialogArea(parent); Composite composite = new Composite(compositeTop, SWT.NONE); new Label(composite, SWT.LEFT).setText(SecUIMessages.addValueKeyLabel); keyText = new Text(composite, SWT.LEFT | SWT.BORDER); keyText.addModifyListener(event -> okButton.setEnabled(validName())); new Label(composite, SWT.LEFT).setText(SecUIMessages.addValueValueLabel); valueText = new Text(composite, SWT.LEFT | SWT.BORDER); encryptButton = new Button(composite, SWT.CHECK); encryptButton.setText(SecUIMessages.addValueEncryptLabel); encryptButton.setSelection(true); // encrypt by default composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayoutFactory.swtDefaults().generateLayout(composite); return composite; }
protected Control createDialogArea(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); setMessage(SecUIMessages.newNodeMsg); new Label(composite, SWT.LEFT).setText(SecUIMessages.newNodeLabel); nodeName = new Text(composite, SWT.LEFT | SWT.BORDER); nodeName.addModifyListener(event -> okButton.setEnabled(validName())); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayoutFactory.swtDefaults().generateLayout(composite); return composite; }
protected Control createDialogArea(Composite parent) { Composite compositeTop = (Composite) super.createDialogArea(parent); Composite composite = new Composite(compositeTop, SWT.NONE); new Label(composite, SWT.LEFT).setText(SecUIMessages.addValueKeyLabel); keyText = new Text(composite, SWT.LEFT | SWT.BORDER); keyText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent event) { okButton.setEnabled(validName()); } }); new Label(composite, SWT.LEFT).setText(SecUIMessages.addValueValueLabel); valueText = new Text(composite, SWT.LEFT | SWT.BORDER); encryptButton = new Button(composite, SWT.CHECK); encryptButton.setText(SecUIMessages.addValueEncryptLabel); encryptButton.setSelection(true); // encrypt by default composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayoutFactory.swtDefaults().generateLayout(composite); return composite; }
protected Control createDialogArea(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); setMessage(SecUIMessages.newNodeMsg); new Label(composite, SWT.LEFT).setText(SecUIMessages.newNodeLabel); nodeName = new Text(composite, SWT.LEFT | SWT.BORDER); nodeName.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent event) { okButton.setEnabled(validName()); } }); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayoutFactory.swtDefaults().generateLayout(composite); return composite; }
public static Composite createGridComposite(final Composite parent, final int columns, final int hSpacing, final int vSpacing, final int hMargin, final int vMargin) { final Composite composite = new Composite(parent, SWT.NONE); setInfoBackgroundColor(composite); final GridLayout layout = GridLayoutFactory.swtDefaults().numColumns(columns).margins(hMargin, vMargin) .spacing(hSpacing, vSpacing).create(); composite.setLayout(layout); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); return composite; }
protected Control createDialogArea(Composite parent) { Composite compositeTop = (Composite) super.createDialogArea(parent); Composite composite = new Composite(compositeTop, SWT.NONE); setMessage(SecUIMessages.pswRecoveryMsg, IMessageProvider.INFORMATION); for (int i = 0; i < questionsText.length; i++) { Group group = new Group(composite, SWT.NONE); group.setText(NLS.bind(SecUIMessages.passwordGroup, Integer.toString(i + 1))); group.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true)); group.setLayout(new GridLayout()); String question = NLS.bind(SecUIMessages.pswRecoveryQuestion, questionsText[i]); new Label(group, SWT.LEFT).setText(question); answers[i] = new Text(group, SWT.LEFT | SWT.BORDER); answers[i].setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true)); answers[i].addModifyListener(event -> validateOK()); } composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayoutFactory.swtDefaults().generateLayout(composite); return composite; }
protected Control createDialogArea(Composite parent) { Composite compositeTop = (Composite) super.createDialogArea(parent); Composite composite = new Composite(compositeTop, SWT.NONE); setMessage(SecUIMessages.pswRecoveryMsg, IMessageProvider.INFORMATION); for (int i = 0; i < questionsText.length; i++) { Group group = new Group(composite, SWT.NONE); group.setText(NLS.bind(SecUIMessages.passwordGroup, Integer.toString(i + 1))); group.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true)); group.setLayout(new GridLayout()); String question = NLS.bind(SecUIMessages.pswRecoveryQuestion, questionsText[i]); new Label(group, SWT.LEFT).setText(question); answers[i] = new Text(group, SWT.LEFT | SWT.BORDER); answers[i].setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true)); answers[i].addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent event) { validateOK(); } }); } composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayoutFactory.swtDefaults().generateLayout(composite); return composite; }
protected Control createDialogArea(Composite parent) { Composite compositeTop = (Composite) super.createDialogArea(parent); setTitle(SecUIMessages.passwordRecoveryTitleMsg); Composite composite = new Composite(compositeTop, SWT.NONE); setMessage(SecUIMessages.passwordMsg, IMessageProvider.NONE); Label storyLabel = new Label(composite, SWT.WRAP); GridData labelData = new GridData(SWT.FILL, SWT.BEGINNING, true, false); labelData.widthHint = 500; storyLabel.setLayoutData(labelData); storyLabel.setText(SecUIMessages.passwordRecoveryLabel); for (int i = 0; i < size; i++) { Group group = new Group(composite, SWT.NONE); group.setText(NLS.bind(SecUIMessages.passwordGroup, Integer.toString(i + 1))); group.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false)); group.setLayout(new GridLayout(2, false)); new Label(group, SWT.LEFT).setText(SecUIMessages.passwordQuestion); questions[i] = new Text(group, SWT.LEFT | SWT.BORDER); questions[i].setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false)); questions[i].addModifyListener(event -> validateOK()); new Label(group, SWT.LEFT).setText(SecUIMessages.passwordAnswer); answers[i] = new Text(group, SWT.LEFT | SWT.BORDER); answers[i].setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false)); answers[i].addModifyListener(event -> validateOK()); } composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayoutFactory.swtDefaults().generateLayout(composite); return composite; }
GridDataFactory.fillDefaults().grab(true, false).span(2, 1) .applyTo(scopeArea); GridLayoutFactory.swtDefaults().numColumns(3).applyTo(scopeArea);
GridLayoutFactory.swtDefaults().generateLayout(composite);
private void createProjectGroup(final Composite parent) { final Group group = createGroup(parent, UIText.CloneDestinationPage_groupProjects); GridLayoutFactory.swtDefaults().applyTo(group); importProjectsButton = new Button(group, SWT.CHECK); importProjectsButton.setText(UIText.CloneDestinationPage_importButton); importProjectsButton.setSelection(Activator.getDefault() .getPreferenceStore() .getBoolean(UIPreferences.CLONE_WIZARD_IMPORT_PROJECTS)); importProjectsButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { Activator .getDefault() .getPreferenceStore() .setValue(UIPreferences.CLONE_WIZARD_IMPORT_PROJECTS, importProjectsButton.getSelection()); } }); // TODO: replace hardcoded ids once bug 245106 is fixed String[] workingSetTypes = new String[] { "org.eclipse.ui.resourceWorkingSetPage", //$NON-NLS-1$ "org.eclipse.jdt.ui.JavaWorkingSetPage" //$NON-NLS-1$ }; workingSetGroup = new WorkingSetGroup(group, null, workingSetTypes); }
public CounterPanel(Composite parent) { super(parent, SWT.NONE); GridLayoutFactory.swtDefaults().margins(0, 0).spacing(0, 0).applyTo(this); createReportUpperRow(); addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { disposeIcons(); } }); }
@Override protected void createButtonsForButtonBar(Composite parent) { parent.setLayout(GridLayoutFactory.swtDefaults().create()); parent.setLayoutData(GridDataFactory.fillDefaults().grab(true, false) .create()); Button clearButton = createButton(parent, CLEAR_ID, UIText.CreateTagDialog_clearButton, false); clearButton.setToolTipText(UIText.CreateTagDialog_clearButtonTooltip); setButtonLayoutData(clearButton); Composite margin = new Composite(parent, SWT.NONE); margin.setLayoutData(GridDataFactory.fillDefaults().grab(true, false) .create()); super.createButtonsForButtonBar(parent); validateInput(); }
public void createControl(Composite parent) { Composite displayArea = new Composite(parent, SWT.NONE); GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(false) .applyTo(displayArea); GridDataFactory.fillDefaults().grab(true, true).applyTo(displayArea); new Label(displayArea, SWT.NONE) .setText(UIText.SubmodulePathWizardPage_PathLabel); pathText = new Text(displayArea, SWT.SINGLE | SWT.BORDER); GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER) .grab(true, false).applyTo(pathText); pathText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { validate(); } }); setControl(displayArea); setTitle(UIText.SubmodulePathWizardPage_Title); setMessage(UIText.SubmodulePathWizardPage_Message); setPageComplete(false); }
@Override protected void createFormContent(IManagedForm managedForm) { Composite body = managedForm.getForm().getBody(); GridLayoutFactory.swtDefaults().numColumns(1).applyTo(body); NotesBlock block = new NotesBlock(getCommit()); block.createContent(managedForm, body); block.selectFirstNote(); } }
.swtDefaults() .applyTo(rootArea); GridDataFactory
commits = new ArrayList<ComboCommitEnt>(); setLayout(GridLayoutFactory.swtDefaults().create()); setLayoutData(GridDataFactory.fillDefaults().create());
public void createControl(Composite parent) { readConfiguration(); initializeDialogUnits(parent); SearchComposite result = new SearchComposite(parent, SWT.NONE); result.setFont(parent.getFont()); GridDataFactory.fillDefaults().grab(true, true).applyTo(result); GridLayoutFactory.swtDefaults().numColumns(2).equalWidth(false) .applyTo(result); addTextPatternControls(result); addScopeControls(result); addRepositoryControl(result); setControl(result); Dialog.applyDialogFont(result); }
FormToolkit toolkit = managedForm.getToolkit(); Composite masterArea = toolkit.createComposite(parent); GridLayoutFactory.swtDefaults().applyTo(masterArea);
public void createContents(Composite parent) { GridLayoutFactory.swtDefaults().applyTo(parent); Section notesSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR); notesSection.setText(UIText.NoteDetailsPage_ContentSection); GridDataFactory.fillDefaults().grab(true, true).applyTo(notesSection); Composite notesArea = toolkit.createComposite(notesSection); toolkit.paintBordersFor(notesArea); notesSection.setClient(notesArea); GridLayoutFactory.fillDefaults().extendedMargins(2, 2, 2, 2) .applyTo(notesArea); notesText = new SpellcheckableMessageArea(notesArea, "", SWT.NONE) { //$NON-NLS-1$ protected void createMarginPainter() { // Disabled intentionally } }; notesText.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); StyledText text = notesText.getTextWidget(); text.setEditable(false); text.setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT)); text.setForeground(text.getDisplay().getSystemColor( SWT.COLOR_INFO_FOREGROUND)); text.setBackground(text.getDisplay().getSystemColor( SWT.COLOR_INFO_BACKGROUND)); GridDataFactory.fillDefaults().grab(true, true).applyTo(notesText); }