List of usage examples for org.eclipse.jface.dialogs PopupDialog POPUP_MARGINHEIGHT
int POPUP_MARGINHEIGHT
To view the source code for org.eclipse.jface.dialogs PopupDialog POPUP_MARGINHEIGHT.
Click Source Link
From source file:com.boothen.jsonedit.quickoutline.QuickOutlinePopup.java
License:Open Source License
@Override protected void createContent(Composite parent) { parent.setLayout(GridLayoutFactory.fillDefaults() .margins(PopupDialog.POPUP_MARGINWIDTH, PopupDialog.POPUP_MARGINHEIGHT) .spacing(PopupDialog.POPUP_HORIZONTALSPACING, PopupDialog.POPUP_VERTICALSPACING).create()); filterText = createFilterText(parent); final NamePatternFilter namePatternFilter = new NamePatternFilter(labelProvider); // use unstyled text filterText.addModifyListener(new ModifyListener() { @Override/*ww w . ja v a2 s .c o m*/ public void modifyText(ModifyEvent e) { String text = ((Text) e.widget).getText(); pattern = Pattern.compile(text, Pattern.CASE_INSENSITIVE); namePatternFilter.setPattern(pattern); stringMatcherUpdated(); } }); Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL); separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); createTreeViewer(parent); treeViewer.addFilter(namePatternFilter); }
From source file:org.eclipse.sapphire.ui.forms.swt.Popup.java
License:Open Source License
/** * Override to populate with notifications. * //from ww w. j a v a 2 s . c o m * @param parent */ protected Control createContentArea(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayoutFactory.fillDefaults().margins(PopupDialog.POPUP_MARGINWIDTH, PopupDialog.POPUP_MARGINHEIGHT) .spacing(PopupDialog.POPUP_HORIZONTALSPACING, PopupDialog.POPUP_VERTICALSPACING).applyTo(composite); GridDataFactory.fillDefaults().grab(true, true).applyTo(composite); return composite; }