List of usage examples for org.eclipse.jface.dialogs IDialogConstants VERTICAL_SPACING
int VERTICAL_SPACING
To view the source code for org.eclipse.jface.dialogs IDialogConstants VERTICAL_SPACING.
Click Source Link
From source file:org.ebayopensource.turmeric.frameworkjars.ui.ChangeServiceVersionDialog.java
License:Open Source License
@Override protected Control createDialogArea(Composite parent) { Composite control = (Composite) super.createDialogArea(parent); setTitle("Change Service Version"); setMessage("change the service version and submit to the Asset Repository."); Composite parentComposite = new Composite(control, 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); parentComposite.setLayout(layout);/*ww w . java2s . co m*/ parentComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); parentComposite.setFont(parentComposite.getFont()); Group group = new Group(parentComposite, SWT.SHADOW_ETCHED_IN); GridData data = new GridData(GridData.FILL_BOTH); data.horizontalSpan = 2; group.setLayoutData(data); layout = new GridLayout(1, true); group.setLayout(layout); Button btn = new Button(group, SWT.RADIO); btn.setText("Change Maintenance Version"); btn.setToolTipText( "Used for changes that do not affect the interface at all, such as logic bug fixes. \nThis will change your existing service in place to update \nits maintenance version. The same asset record in AR will be kept and modified to record the version change."); ControlDecoration controlDecoration = new ControlDecoration(btn, SWT.LEFT | SWT.TOP); controlDecoration.setShowOnlyOnFocus(false); controlDecoration.setDescriptionText( "Used for changes that do not affect the interface at all, such as logic bug fixes. \nThis will change your existing service in place to update \nits maintenance version. The same asset record in AR will be kept and modified to record the version change."); FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault() .getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION); controlDecoration.setImage(fieldDecoration.getImage()); //new Label(group, SWT.NONE | SWT.WRAP).setText("Used for backward incompatible changes to the interface. \nThis will take you to the new service wizard for creating a new service with major version bumped up."); //new Label(group, SWT.NONE); btn = new Button(group, SWT.RADIO); btn.setText("Change Minor Version"); controlDecoration = new ControlDecoration(btn, SWT.LEFT | SWT.TOP); controlDecoration.setShowOnlyOnFocus(false); controlDecoration.setDescriptionText( "Used for backward compatible changes to the interface. \nThis will change your existing service in place to update its minor version. \nA new asset record will be created in AR to track the new minor version."); controlDecoration.setImage(fieldDecoration.getImage()); //new Label(group, SWT.NONE | SWT.WRAP).setText("Used for backward compatible changes to the interface. \nThis will change your existing service in place to update its minor version (for). A new asset record \nwill be created in AR to track the new minor version"); //new Label(group, SWT.NONE); btn = new Button(group, SWT.RADIO); btn.setText("Change Major Version"); //new Label(group, SWT.NONE).setText("Change service maintenance version"); controlDecoration = new ControlDecoration(btn, SWT.LEFT | SWT.TOP); controlDecoration.setShowOnlyOnFocus(false); controlDecoration.setDescriptionText( "Used for backward incompatible service changes. Treated the same as \nsubmitting a new service version - creates new projects, jars, namespace, etc. \nConsult architecture to consider all the compatibility implications."); controlDecoration.setImage(fieldDecoration.getImage()); Label label = new Label(parentComposite, SWT.LEFT); label.setText("Existing Service Version"); Text text = new Text(parentComposite, SWT.BORDER | SWT.READ_ONLY); text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); text.setText("1.1.0"); label = new Label(parentComposite, SWT.LEFT); label.setText("New Service Version"); text = new Text(parentComposite, SWT.BORDER); text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); text.setText("1.2.0"); Dialog.applyDialogFont(control); return control; }
From source file:org.ebayopensource.turmeric.frameworkjars.ui.CopyLibraryDialog.java
License:Open Source License
/** * Adds the library chooser.//from www.ja v a 2s.co m * * @param parentComposite the parent composite * @return the composite */ protected Composite addLibraryChooser(Composite parentComposite) { parentComposite = new Composite(parentComposite, SWT.NONE); GridLayout layout = new GridLayout(4, 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); parentComposite.setLayout(layout); parentComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); parentComposite.setFont(parentComposite.getFont()); new Label(parentComposite, SWT.LEFT).setText("&Maven Library:"); libraryText = new Text(parentComposite, SWT.BORDER); libraryText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); libraryText.setEditable(false); Button browseBtn = new Button(parentComposite, SWT.PUSH); browseBtn.setAlignment(SWT.RIGHT); browseBtn.setText("&Search..."); final SelectionListener workspaceBrowseListener = new SelectionListener() { @Override public void widgetDefaultSelected(final SelectionEvent e) { widgetSelected(e); } @Override public void widgetSelected(final SelectionEvent e) { final MavenRepositorySearchDialog dialog = new MavenRepositorySearchDialog(getShell(), "Select Library to copy:", IIndex.SEARCH_ARTIFACT, null); if (dialog.open() == Window.OK) { final Object obj = dialog.getFirstResult(); if (obj instanceof IndexedArtifactFile) { final IndexedArtifactFile artifactFile = (IndexedArtifactFile) obj; final ArtifactKey artifactKey = artifactFile.getArtifactKey(); metadata = new EclipseArtifactMetadata(artifactKey.getGroupId(), artifactKey.getArtifactId(), artifactKey.getVersion(), "jar", ArtifactScopeEnum.DEFAULT_SCOPE); libraryText.setText(metadata.toString()); } } dialogChanged(); } }; browseBtn.addSelectionListener(workspaceBrowseListener); return parentComposite; }
From source file:org.ebayopensource.turmeric.frameworkjars.ui.CopyLibraryDialog.java
License:Open Source License
/** * Adds the destination chooser./*from w ww .jav a 2 s .c o m*/ * * @param parentComposite the parent composite * @return the composite */ protected Composite addDestinationChooser(Composite parentComposite) { parentComposite = new Composite(parentComposite, SWT.NONE); GridLayout layout = new GridLayout(4, 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); parentComposite.setLayout(layout); parentComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); parentComposite.setFont(parentComposite.getFont()); new Label(parentComposite, SWT.LEFT).setText("&Destination:"); destinationText = new Text(parentComposite, SWT.BORDER); destinationText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); //libraryText.addModifyListener(modifyListener); destinationText.setEditable(false); Button browseBtn = new Button(parentComposite, SWT.PUSH); browseBtn.setAlignment(SWT.RIGHT); browseBtn.setText("&Browse..."); final String filterPath = null; final SelectionListener workspaceBrowseListener = new SelectionListener() { @Override public void widgetDefaultSelected(final SelectionEvent e) { widgetSelected(e); } @Override public void widgetSelected(final SelectionEvent e) { final DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.PUSH); dialog.setText("Select Destination"); if (StringUtils.isNotBlank(filterPath)) dialog.setFilterPath(filterPath); final String dirName = dialog.open(); if (StringUtils.isNotBlank(dirName)) { destinationText.setText(dirName); } dialogChanged(); } }; browseBtn.addSelectionListener(workspaceBrowseListener); return parentComposite; }
From source file:org.eclipse.acceleo.internal.ide.ui.wizards.project.AcceleoProjectPage.java
License:Open Source License
/** * Initialize the grid layout./*from w w w.java 2s . co m*/ * * @param layout * The grid layout. * @param margins * Indicates if we should use margins. * @return The configured grid layout. */ private GridLayout initGridLayout(GridLayout layout, boolean margins) { layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); if (margins) { layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); } else { layout.marginWidth = 0; layout.marginHeight = 0; } return layout; }
From source file:org.eclipse.ajdt.internal.ui.refactoring.RenameFileExtensionsDialog.java
License:Open Source License
protected Control createDialogArea(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.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); composite.setLayout(layout);// www . j a v a 2 s . c o m composite.setLayoutData(new GridData(GridData.FILL_BOTH)); convertAspectsToAJButton = new Button(composite, SWT.RADIO); convertAspectsToAJButton.setText(UIMessages.Refactoring_ConvertAspectsToAJAndClassesToJava); convertAspectsToAJButton.setSelection(true); convertAllToAJButton = new Button(composite, SWT.RADIO); convertAllToAJButton.setText(UIMessages.Refactoring_ConvertAllToAJ); convertAllToJavaButton = new Button(composite, SWT.RADIO); convertAllToJavaButton.setText(UIMessages.Refactoring_ConvertAllToJava); new Label(composite, SWT.NONE); includeFilesNotInBuildButton = new Button(composite, SWT.CHECK); includeFilesNotInBuildButton.setText(UIMessages.Refactoring_IncludeFilesNotInBuild); includeFilesNotInBuildButton.setSelection(true); updateBuildConfigsButton = new Button(composite, SWT.CHECK); updateBuildConfigsButton.setText(UIMessages.Refactoring_UpdateBuildConfigs); updateBuildConfigsButton.setSelection(true); applyDialogFont(composite); return composite; }
From source file:org.eclipse.ant.internal.ui.datatransfer.AntNewJavaProjectPage.java
License:Open Source License
@Override public void createControl(Composite parent) { initializeDialogUnits(parent);/* w w w . j a v a2 s . c o m*/ Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginHeight = IDialogConstants.VERTICAL_MARGIN; layout.marginWidth = IDialogConstants.HORIZONTAL_MARGIN; layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 3; composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); composite.setFont(parent.getFont()); createProjectNameGroup(composite); createProjectLocationGroup(composite); createTargetsTable(composite); fLinkButton = new Button(composite, SWT.CHECK); fLinkButton.setText(DataTransferMessages.AntNewJavaProjectPage_24); fLinkButton.setFont(parent.getFont()); GridData gd = new GridData(); gd.horizontalAlignment = GridData.FILL; gd.grabExcessHorizontalSpace = false; gd.horizontalSpan = 2; fLinkButton.setLayoutData(gd); validatePage(); // Show description on opening setErrorMessage(null); setMessage(null); setControl(composite); }
From source file:org.eclipse.b3.aggregator.presentation.FindIUDialog.java
License:Open Source License
@Override protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 0; // create layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); composite.setLayout(layout);/* w w w .java 2 s . c o m*/ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Label filler = new Label(composite, SWT.NONE); filler.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL)); layout.numColumns++; findButton = createButton(composite, FIND_ID, getString("_UI_FindIUDialog_findButton"), true); findButton.setEnabled(isFindEnabled()); createButton(composite, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); return composite; }
From source file:org.eclipse.b3.aggregator.presentation.VersionRangeEditorDialog.java
License:Open Source License
@Override protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 0; // create layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); composite.setLayout(layout);//from w ww. j a v a 2 s .c om composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Label filler = new Label(composite, SWT.NONE); filler.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL)); layout.numColumns++; okButton = createButton(composite, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); okButton.setEnabled(isOKEnabled()); createButton(composite, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); return composite; }
From source file:org.eclipse.birt.report.data.oda.jdbc.ui.util.ExceptionDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { createMessageArea(parent);/*from w ww .j a v a 2 s . c om*/ // 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:org.eclipse.birt.report.designer.data.ui.property.AbstractPropertyDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); GridLayout layout = new GridLayout(); layout.numColumns = 1;/*ww w .j a v a 2s. c o m*/ layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); composite.setLayout(layout); container = new Composite(composite, SWT.NONE); layout = new GridLayout(); layout.numColumns = 3; layout.marginWidth = 0; layout.marginHeight = 0; layout.horizontalSpacing = 2; container.setLayout(layout); container.setLayoutData(new GridData(GridData.FILL_BOTH)); treeViewer = createTreeViewer(container); treeViewer.setLayoutData(new GridData(GridData.FILL_VERTICAL)); Sash sash = createSash(container); pageContainer = createPropertyPane(container); pageContainer.setLayoutData(new GridData(GridData.FILL_BOTH)); addDragListerner(sash, container, treeViewer, pageContainer); Label label = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); initTreeSelection(); return composite; }