private void createDescription(String label) { if (label == null) return; fDescription= new Label(fParentComposite, SWT.LEFT | SWT.WRAP); fDescription.setFont(fParentComposite.getFont()); fDescription.setText(label); fDescription.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); }
protected static Label createLabel(Composite composite, String text, int numColumns) { final GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.horizontalSpan = numColumns; gd.widthHint= 0; final Label label = new Label(composite, SWT.WRAP); label.setFont(composite.getFont()); label.setText(text); label.setLayoutData(gd); return label; }
private Button createButton(Composite parent, int span, int indent, String text) { Button button = new Button(parent, SWT.CHECK); button.setText(text); GridData gd = new GridData(); gd.horizontalSpan = span; gd.horizontalIndent = indent; button.setLayoutData(gd); button.addSelectionListener(fListener); button.setFont(parent.getFont()); return button; }
/** * Creates a fully configured composite with the given number of columns * @param parent * @param numColumns * @return the configured composite */ protected Composite createComposite(Composite parent, int numColumns) { return SWTFactory.createComposite(parent, parent.getFont(), numColumns, 1, GridData.FILL_HORIZONTAL, 0, 0); }
private Button createSelectionButton(int index, Composite group, SelectionListener listener) { Button button= new Button(group, fButtonsStyle | SWT.LEFT); button.setFont(group.getFont()); button.setText(fButtonNames[index]); button.setEnabled(isEnabled() && fButtonsEnabled[index]); button.setSelection(fButtonsSelected[index]); button.addSelectionListener(listener); button.setLayoutData(new GridData()); return button; }
protected static Label createLabel(int numColumns, Composite parent, String text, int indent) { final Label label= new Label(parent, SWT.WRAP); label.setFont(parent.getFont()); label.setText(text); GridData gd= new GridData(GridData.BEGINNING, GridData.CENTER, true, false, numColumns, 1); gd.horizontalIndent= indent * LayoutUtil.getIndent(); label.setLayoutData(gd); return label; }
private Label createSeparator(Composite parent) { Label separator= new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL); separator.setFont(parent.getFont()); separator.setVisible(false); GridData gd= new GridData(); gd.horizontalAlignment= GridData.FILL; gd.verticalAlignment= GridData.BEGINNING; gd.verticalIndent= 4; separator.setLayoutData(gd); return separator; }
protected Control createDialogArea(Composite parent) { Composite control= (Composite)super.createDialogArea(parent); fCountLabel= new Label(control, SWT.NONE); fCountLabel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); fCountLabel.setFont(parent.getFont()); updateCountLabel(); return control; }
private Control createImplicitTabContents(Composite parent) { Composite container = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(2, false); container.setLayout(layout); container.setLayoutData(new GridData(GridData.FILL_BOTH)); container.setFont(parent.getFont()); createImpLabel(container); createImpTable(container); createImpButtons(container); return container; }
private void createDescriptionText(Composite composite) { descriptionText = new Text(composite, SWT.WRAP | SWT.V_SCROLL | SWT.BORDER); descriptionText.setFont(composite.getFont()); descriptionText.setBackground(composite.getBackground()); GridData descriptionTextGridData = new GridData( GridData.FILL_HORIZONTAL); descriptionTextGridData.heightHint = convertHeightInCharsToPixels(3); descriptionText.setLayoutData(descriptionTextGridData); }
protected CustomizationTab(Composite parent, INavigatorContentService aContentService) { super(parent, SWT.RESIZE); contentService = aContentService; setFont(getParent().getFont()); setLayout(new GridLayout()); GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); setData(data); }
public ScrolledPageContent(Composite parent, int style) { super(parent, style); setFont(parent.getFont()); fToolkit= JavaPlugin.getDefault().getDialogsFormToolkit(); setExpandHorizontal(true); setExpandVertical(true); Composite body= new Composite(this, SWT.NONE); body.setFont(parent.getFont()); setContent(body); }
@Override public void createControl(Composite parent) { Composite composite= new Composite(parent, SWT.NONE); composite.setFont(parent.getFont()); composite.setLayout(new GridLayout(1, false)); Control control= fBuildPathsBlock.createControl(composite); control.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); Dialog.applyDialogFont(composite); PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.NEW_JAVAPROJECT_WIZARD_PAGE); setControl(composite); }
protected Composite createPreviewPane(Composite parent) { final Composite previewPane= new Composite(parent, SWT.NONE); createGridLayout(previewPane, 1, true); previewPane.setFont(parent.getFont()); createLabel(1, previewPane, FormatterMessages.ModifyDialogTabPage_preview_label_text, 0); fPreview= new JavaPreview(fWorkingValues, previewPane); fPreview.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); return previewPane; }
public Control createControl(Composite composite) { Group workingSetGroup= new Group(composite, SWT.NONE); workingSetGroup.setFont(composite.getFont()); workingSetGroup.setText(NewWizardMessages.NewJavaProjectWizardPageOne_WorkingSets_group); workingSetGroup.setLayout(new GridLayout(1, false)); fWorkingSetBlock.createContent(workingSetGroup); return workingSetGroup; }
protected TreeViewer createTreeViewer(Composite parent) { Tree tree= new Tree(parent, getTreeStyle()); tree.setFont(parent.getFont()); return new TreeViewer(tree); }
private boolean useHeightHint(Composite parent) { int fontHeight= (parent.getFont().getFontData())[0].getHeight(); int displayHeight= parent.getDisplay().getClientArea().height; return (displayHeight / fontHeight) > 50; }
protected TableViewer createTableViewer(Composite parent) { Table table= new Table(parent, getListStyle()); table.setFont(parent.getFont()); return new TableViewer(table); }
protected TableViewer createTableViewer(Composite parent) { Table table = new Table(parent, getListStyle()); table.setFont(parent.getFont()); return new TableViewer(table); }
static Spinner createSpinner(Composite parentComposite, int minValue, int maxValue) { Spinner spinner= new Spinner(parentComposite, SWT.BORDER); spinner.setFont(parentComposite.getFont()); spinner.setMinimum(minValue); spinner.setMaximum(maxValue); spinner.setLayoutData(createGridData(1, GridData.HORIZONTAL_ALIGN_END, SWT.DEFAULT, 0)); return spinner; }