List of usage examples for org.eclipse.jface.dialogs IDialogConstants VERTICAL_MARGIN
int VERTICAL_MARGIN
To view the source code for org.eclipse.jface.dialogs IDialogConstants VERTICAL_MARGIN.
Click Source Link
From source file:com.ultimatetech.cim.dialogs.FindClass.java
License:Open Source License
protected void createSearchFieldAndList(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 1;/* w ww .j a va 2 s. c o m*/ layout.makeColumnsEqualWidth = false; layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); composite.setLayout(layout); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_CENTER); data.minimumWidth = 600; data.heightHint = 400; composite.setLayoutData(data); composite.setFont(parent.getFont()); Label title = new Label(composite, SWT.NONE); title.setText("Type the name of the class you are searching for. OK will select it in the tree."); //GridData gd = new GridData(); //gd.horizontalAlignment = SWT.LEFT; //title.setLayoutData(gd); GridData gridData = new GridData(); gridData.grabExcessHorizontalSpace = true; gridData.minimumWidth = 400; findClassName = new Text(composite, SWT.SINGLE | SWT.BORDER); findClassName.setLayoutData(gridData); findClassName.addKeyListener(new SearchKeyListener()); Composite tableComp = new Composite(composite, SWT.NONE); GridData tcgd = new GridData(); tcgd.grabExcessHorizontalSpace = true; tcgd.minimumWidth = 400; tableComp.setLayoutData(tcgd); //add table with all classes viewer = new TableViewer(tableComp, SWT.BORDER | SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new ViewLabelProvider()); viewer.setInput(elements); viewer.getTable().setSize(400, 300); addTableColumns(viewer.getTable()); viewer.getTable().setHeaderVisible(false); viewer.addSelectionChangedListener(new SelectionListener()); //viewer.setSorter(new ViewerSorter()); }
From source file:com.ultimatetech.cim.dialogs.UsernamePasswordDialog.java
License:Open Source License
protected void createUsernameAndPasswordFields(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2;/*from w ww. j a v a 2 s. c om*/ layout.makeColumnsEqualWidth = false; layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); composite.setLayout(layout); GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_CENTER); data.minimumWidth = 300; composite.setLayoutData(data); composite.setFont(parent.getFont()); GridData gridData = new GridData(); gridData.grabExcessHorizontalSpace = true; gridData.minimumWidth = 150; Label title = new Label(composite, SWT.NONE); title.setText("Enter username and password to connect to CIMOM"); GridData gd = new GridData(); gd.horizontalAlignment = SWT.LEFT; gd.horizontalSpan = 2; title.setLayoutData(gd); Label usernameLabel = new Label(composite, SWT.NONE); usernameLabel.setText("Username:"); usernameValue = new Text(composite, SWT.SINGLE | SWT.BORDER); usernameValue.setLayoutData(gridData); Label passLabel = new Label(composite, SWT.NONE); passLabel.setText("Password:"); passValue = new Text(composite, SWT.SINGLE | SWT.BORDER); passValue.setEchoChar('*'); passValue.setLayoutData(gridData); }
From source file:de.babe.eclipse.plugins.quickREx.dialogs.OrganizeREsDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { getShell().setText(Messages.getString("dialogs.OrganizeREsDialog.title")); //$NON-NLS-1$ // create a composite with standard margins and spacing Composite composite = new Composite(parent, SWT.NONE | SWT.RESIZE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 2;//from w w w .ja v a 2 s .co m composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); applyDialogFont(composite); messageLabel = new Label(composite, SWT.NULL); messageLabel.setText(Messages.getString("dialogs.OrganizeREsDialog.messageLabel1")); //$NON-NLS-1$ GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.grabExcessHorizontalSpace = true; gd.horizontalSpan = 2; gd.widthHint = 400; messageLabel.setLayoutData(gd); Label nameLabel = new Label(composite, SWT.NULL); nameLabel.setText(Messages.getString("dialogs.OrganizeREsDialog.nameLabel1")); //$NON-NLS-1$ gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING); gd.grabExcessHorizontalSpace = false; nameLabel.setLayoutData(gd); reList = new List(composite, SWT.MULTI | SWT.V_SCROLL); gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING); gd.grabExcessHorizontalSpace = true; gd.grabExcessVerticalSpace = true; gd.heightHint = 100; reList.setLayoutData(gd); reList.setItems(QuickRExPlugin.getDefault().getRegularExpressions()); return composite; }
From source file:de.babe.eclipse.plugins.quickREx.dialogs.OrganizeTestTextDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { getShell().setText(Messages.getString("dialogs.OrganizeTestTextDialog.title")); //$NON-NLS-1$ // create a composite with standard margins and spacing Composite composite = new Composite(parent, SWT.NONE | SWT.RESIZE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 2;//from w ww .java2 s . c o m composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); applyDialogFont(composite); switch (type) { case TYPE_SAVE: return createDialogAreaContentsForSave(composite); case TYPE_LOAD: return createDialogAreaContentsForLoad(composite); case TYPE_ORGANIZE: return createDialogAreaContentsForOrganize(composite); default: throw new IllegalStateException( Messages.getString("dialogs.OrganizeTestTextDialog.errror.message1") + type); //$NON-NLS-1$ } }
From source file:de.babe.eclipse.plugins.quickREx.dialogs.REEditDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { getShell().setText(Messages.getString("dialogs.REEditDialog.title")); //$NON-NLS-1$ // create a composite with standard margins and spacing Composite composite = new Composite(parent, SWT.NONE | SWT.RESIZE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 3;//from ww w . j ava 2s . c o m composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); createTextLine(composite); createSnippetControls(composite); updateMarkup(); applyDialogFont(composite); return composite; }
From source file:de.babe.eclipse.plugins.quickREx.dialogs.RESearchInputDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { getShell().setText(Messages.getString("dialogs.RESearchInputDialog.title")); //$NON-NLS-1$ // create a composite with standard margins and spacing Composite composite = new Composite(parent, SWT.NONE | SWT.RESIZE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 2;//from w w w.j a v a 2 s. c o m composite.setLayout(layout); GridData gd = new GridData(GridData.FILL_BOTH); gd.widthHint = 250; composite.setLayoutData(gd); applyDialogFont(composite); Label searchForLabel = new Label(composite, SWT.NULL); searchForLabel.setText(Messages.getString("dialogs.RESearchInputDialog.label.searchFor.text")); //$NON-NLS-1$ gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING); gd.grabExcessHorizontalSpace = false; searchForLabel.setLayoutData(gd); textField = new Text(composite, SWT.BORDER | SWT.SINGLE | SWT.LEAD | SWT.RESIZE); gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.grabExcessHorizontalSpace = true; textField.setLayoutData(gd); Label searchInLabel = new Label(composite, SWT.NULL); searchInLabel.setText(Messages.getString("dialogs.RESearchInputDialog.label.searchIn.text")); //$NON-NLS-1$ gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING); gd.grabExcessHorizontalSpace = false; gd.verticalSpan = 5; searchInLabel.setLayoutData(gd); buttonTitle = new Button(composite, SWT.CHECK); buttonTitle.setText(Messages.getString("dialogs.RESearchInputDialog.checkbox.searchIn.title.text")); //$NON-NLS-1$ buttonTitle.setSelection((QuickRExPlugin.getDefault().getLastSearchScope() & RESearchQuery.SCOPE_TITLE) == RESearchQuery.SCOPE_TITLE); gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.grabExcessHorizontalSpace = true; buttonTitle.setLayoutData(gd); buttonRE = new Button(composite, SWT.CHECK); buttonRE.setText(Messages.getString("dialogs.RESearchInputDialog.checkbox.searchIn.re.text")); //$NON-NLS-1$ buttonRE.setSelection((QuickRExPlugin.getDefault().getLastSearchScope() & RESearchQuery.SCOPE_RE) == RESearchQuery.SCOPE_RE); gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.grabExcessHorizontalSpace = true; buttonRE.setLayoutData(gd); buttonTestText = new Button(composite, SWT.CHECK); buttonTestText.setText(Messages.getString("dialogs.RESearchInputDialog.checkbox.searchIn.testtext.text")); //$NON-NLS-1$ buttonTestText.setSelection((QuickRExPlugin.getDefault().getLastSearchScope() & RESearchQuery.SCOPE_TESTTEXT) == RESearchQuery.SCOPE_TESTTEXT); gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.grabExcessHorizontalSpace = true; buttonTestText.setLayoutData(gd); buttonDesc = new Button(composite, SWT.CHECK); buttonDesc.setText(Messages.getString("dialogs.RESearchInputDialog.checkbox.searchIn.desc.text")); //$NON-NLS-1$ buttonDesc.setSelection((QuickRExPlugin.getDefault().getLastSearchScope() & RESearchQuery.SCOPE_DESC) == RESearchQuery.SCOPE_DESC); gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.grabExcessHorizontalSpace = true; buttonDesc.setLayoutData(gd); buttonSource = new Button(composite, SWT.CHECK); buttonSource.setText(Messages.getString("dialogs.RESearchInputDialog.checkbox.searchIn.source.text")); //$NON-NLS-1$ buttonSource.setSelection((QuickRExPlugin.getDefault().getLastSearchScope() & RESearchQuery.SCOPE_SOURCE) == RESearchQuery.SCOPE_SOURCE); gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd.grabExcessHorizontalSpace = true; buttonSource.setLayoutData(gd); return composite; }
From source file:de.babe.eclipse.plugins.quickREx.dialogs.SimpleTextDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { getShell().setText(title);/*from ww w . j ava 2 s . c o m*/ // create a composite with standard margins and spacing Composite composite = new Composite(parent, SWT.NONE | SWT.RESIZE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 1; composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); applyDialogFont(composite); textField = new Text(composite, SWT.READ_ONLY | SWT.LEAD | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.RESIZE); GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL); gd.grabExcessHorizontalSpace = true; gd.grabExcessVerticalSpace = true; gd.heightHint = 250; gd.widthHint = 400; textField.setLayoutData(gd); textField.setBackground(new Color(getShell().getDisplay(), new RGB(255, 255, 255))); textField.setText(contents); return composite; }
From source file:de.bht.fpa.mail.s000000.common.rcp.exception.ExceptionDetailsErrorDialog.java
License:Open Source License
/** * This implementation of the <code>Dialog</code> framework method creates and * lays out a composite and calls <code>createMessageArea</code> and * <code>createCustomArea</code> to populate it. Subclasses should override * <code>createCustomArea</code> to add contents below the message. *//* www .j a v a 2 s. c o m*/ @Override protected Control createDialogArea(Composite parent) { createMessageArea(parent); // create a composite with standard margins and spacing Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 2; composite.setLayout(layout); GridData childData = new GridData(GridData.FILL_BOTH); childData.horizontalSpan = 2; composite.setLayoutData(childData); composite.setFont(parent.getFont()); return composite; }
From source file:de.topicmapslab.tmcledit.diagram.preferences.ColorSchemeEditor.java
License:Open Source License
@Override protected Control createDialogArea(Composite parent) { Composite comp = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(2, false); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); comp.setLayout(layout);/*from ww w . j ava2 s. co m*/ comp.setLayoutData(new GridData(GridData.FILL_BOTH)); applyDialogFont(comp); Label l = new Label(comp, SWT.NONE); l.setText("Name:"); nameText = new Text(comp, SWT.BORDER); nameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); nameText.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { validateName(); validateColors(); } }); l = new Label(comp, SWT.NONE); l.setText("Topic Color:"); topicColor = new ColorSelector(comp); l = new Label(comp, SWT.NONE); l.setText("Comment Color:"); commentColor = new ColorSelector(comp); l = new Label(comp, SWT.NONE); l.setText("Topic Font Color:"); topicFontColor = new ColorSelector(comp); l = new Label(comp, SWT.NONE); l.setText("Comment Font Color:"); commentFontColor = new ColorSelector(comp); useGradient = new Button(comp, SWT.CHECK); useGradient.setText("Use Gradient"); GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 2; useGradient.setLayoutData(gd); l = new Label(comp, SWT.NONE); l.setText("Secondary Topic Color:"); secTopicColor = new ColorSelector(comp); secTopicColor.addListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { validateColors(); validateName(); } }); l = new Label(comp, SWT.NONE); l.setText("Secondary Comment Color:"); secCommentColor = new ColorSelector(comp); secCommentColor.addListener(new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { validateColors(); validateName(); } }); useGradient.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { secTopicColor.setEnabled(useGradient.getSelection()); secCommentColor.setEnabled(useGradient.getSelection()); validateColors(); validateName(); } }); initFields(); return comp; }
From source file:descent.internal.ui.dialogs.OptionalMessageDialog.java
License:Open Source License
protected Control createCustomArea(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); composite.setLayout(layout);/*from www . j a v a 2 s.co m*/ composite.setLayoutData(new GridData(GridData.FILL_BOTH)); fHideDialogCheckBox = new Button(composite, SWT.CHECK | SWT.LEFT); fHideDialogCheckBox.setText(CHECKBOX_TEXT); fHideDialogCheckBox.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { setDialogEnabled(fId, !((Button) e.widget).getSelection()); } }); applyDialogFont(fHideDialogCheckBox); return fHideDialogCheckBox; }