private static GridLayoutFactory getPopupLayout() { if (popupLayoutFactory == null) { popupLayoutFactory = GridLayoutFactory.fillDefaults() .margins(POPUP_MARGINWIDTH, POPUP_MARGINHEIGHT) .spacing(POPUP_HORIZONTALSPACING, POPUP_VERTICALSPACING); } return popupLayoutFactory; }
private static GridLayoutFactory getPopupLayout() { if (popupLayoutFactory == null) { popupLayoutFactory = GridLayoutFactory.fillDefaults() .margins(POPUP_MARGINWIDTH, POPUP_MARGINHEIGHT) .spacing(POPUP_HORIZONTALSPACING, POPUP_VERTICALSPACING); } return popupLayoutFactory; }
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; }
public static Composite createComposite(final Composite parent, final int numColumns) { final Composite container = new Composite(parent, SWT.NONE); setInfoBackgroundColor(container); container.setLayout(GridLayoutFactory.fillDefaults().margins(10, 0).spacing(0, 0).numColumns(numColumns) .create()); container.setLayoutData(GridDataFactory.fillDefaults().create()); return container; }
private static Composite createComposite(Composite parent) { Composite main = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().indent(0, 0).grab(true, true) .applyTo(main); GridLayoutFactory.fillDefaults().spacing(0, 0).numColumns(2) .applyTo(main); return main; } }
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(); } }); }
protected Control createContents(Composite parent) { // initialize the dialog units initializeDialogUnits(parent); Point defaultSpacing = LayoutConstants.getSpacing(); GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()) .spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(getColumnCount()).applyTo(parent); GridDataFactory.fillDefaults().grab(true, true).applyTo(parent); createDialogAndButtonArea(parent); return parent; }
@Override protected Control createContents(Composite parent) { // initialize the dialog units initializeDialogUnits(parent); Point defaultSpacing = LayoutConstants.getSpacing(); GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()) .spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(getColumnCount()).applyTo(parent); GridDataFactory.fillDefaults().grab(true, true).applyTo(parent); createDialogAndButtonArea(parent); return parent; }
@Override protected Control createContents(Composite parent) { // initialize the dialog units initializeDialogUnits(parent); Point defaultSpacing = LayoutConstants.getSpacing(); GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()) .spacing(defaultSpacing.x * 2, defaultSpacing.y).numColumns(getColumnCount()).applyTo(parent); GridDataFactory.fillDefaults().grab(true, true).applyTo(parent); createDialogAndButtonArea(parent); return parent; }
private void fillTags(FormToolkit toolkit, List<Ref> tags) { for (Control child : tagLabelArea.getChildren()) child.dispose(); GridLayoutFactory.fillDefaults().spacing(1, 1).numColumns(tags.size()) .applyTo(tagLabelArea); for (Ref tag : tags) { ObjectId id = tag.getPeeledObjectId(); boolean annotated = id != null; if (id == null) id = tag.getObjectId(); CLabel tagLabel = new CLabel(tagLabelArea, SWT.NONE); toolkit.adapt(tagLabel, false, false); if (annotated) tagLabel.setImage(getImage(UIIcons.TAG_ANNOTATED)); else tagLabel.setImage(getImage(UIIcons.TAG)); tagLabel.setText(Repository.shortenRefName(tag.getName())); } }
private Composite createUserArea(Composite parent, FormToolkit toolkit, PersonIdent person, boolean author) { Composite userArea = toolkit.createComposite(parent); GridLayoutFactory.fillDefaults().spacing(2, 2).numColumns(3) .applyTo(userArea);
.margins(0, 0) .extendedMargins(0, 0, 0, 0) .spacing(0, 1) .numColumns(numColumns) .applyTo(this);
@Override public void createPartControl(Composite parent) { Composite main = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().spacing(0, 0).applyTo(main); GridDataFactory.fillDefaults().grab(true, true).applyTo(main); tree = new TreeViewer(main, SWT.MULTI); tree.setContentProvider(new PathNodeContentProvider()); GridDataFactory.fillDefaults().grab(true, true).applyTo(tree.getTree()); tree.addOpenListener(new IOpenListener() { public void open(OpenEvent event) { reactOnOpen(event); } }); tree.getTree().setEnabled(false); createActions(); getViewSite().setSelectionProvider(tree); createContextMenu(); }
protected void configureShell(Shell shell) { GridLayoutFactory.fillDefaults().margins(0, 0).spacing(5, 5).applyTo( shell);
private void createTagsArea(Composite parent, FormToolkit toolkit, int span) { Composite tagArea = toolkit.createComposite(parent); GridLayoutFactory.fillDefaults().numColumns(2).equalWidth(false) .applyTo(tagArea); GridDataFactory.fillDefaults().span(span, 1).grab(true, false) .applyTo(tagArea); toolkit.createLabel(tagArea, UIText.CommitEditorPage_LabelTags) .setForeground( toolkit.getColors().getColor(IFormColors.TB_TOGGLE)); tagLabelArea = toolkit.createComposite(tagArea); GridDataFactory.fillDefaults().grab(true, true).applyTo(tagLabelArea); GridLayoutFactory.fillDefaults().spacing(1, 1).applyTo(tagLabelArea); }
private void createProgressCountPanel(Composite parent) { progressAndSearchComposite = new Composite(parent, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(progressAndSearchComposite); GridLayoutFactory.swtDefaults().margins(0, 0).spacing(0, 0).applyTo(progressAndSearchComposite);
GridLayoutFactory.fillDefaults().spacing(2, 2).numColumns(1) .applyTo(userArea); GridDataFactory.fillDefaults().grab(true, false).applyTo(userArea); if (count > 0) { Composite parents = toolkit.createComposite(top); GridLayoutFactory.fillDefaults().spacing(2, 2).numColumns(2) .applyTo(parents); GridDataFactory.fillDefaults().grab(false, false).applyTo(parents);
@Override protected void configureShell(Shell shell) { GridLayoutFactory.fillDefaults().margins(0, 0).spacing(5, 5).applyTo( shell); shell.addListener(SWT.Deactivate, event -> {
@Override protected void configureShell(Shell shell) { GridLayoutFactory.fillDefaults().margins(0, 0).spacing(5, 5).applyTo( shell); shell.addListener(SWT.Deactivate, event -> {
GridDataFactory.fillDefaults().grab(true, true) .applyTo(messageAndPersonArea); GridLayoutFactory.swtDefaults().margins(0, 0).spacing(0, 0) .applyTo(messageAndPersonArea); messageSection.setText(UIText.CommitDialog_CommitMessage); Composite messageArea = toolkit.createComposite(messageSection); GridLayoutFactory.fillDefaults().spacing(0, 0) .extendedMargins(2, 2, 2, 2).applyTo(messageArea); toolkit.paintBordersFor(messageArea); GridLayoutFactory.fillDefaults().spacing(0, 0).numColumns(2) .applyTo(headerArea);