List of usage examples for org.eclipse.jface.dialogs IDialogConstants HORIZONTAL_MARGIN
int HORIZONTAL_MARGIN
To view the source code for org.eclipse.jface.dialogs IDialogConstants HORIZONTAL_MARGIN.
Click Source Link
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);/*from w w w . j a v a 2 s .co 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 w w.j a v a2s .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.babel.runtime.dialogs.LocalizableTrayDialog.java
License:Open Source License
@Override protected Control createButtonBar(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginWidth = 0;//from w w w . ja v a 2 s.co m layout.marginHeight = 0; layout.horizontalSpacing = 0; composite.setLayout(layout); composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); composite.setFont(parent.getFont()); // create the localization button Control localizationControl = createLocalizationControl(composite); ((GridData) localizationControl.getLayoutData()).horizontalIndent = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_MARGIN); Control buttonSection = super.createButtonBar(composite); ((GridData) buttonSection.getLayoutData()).grabExcessHorizontalSpace = true; 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 va2s .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;/*www .ja v a 2 s. 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; }
From source file:org.eclipse.birt.report.designer.data.ui.property.AbstractPropertyDialog.java
License:Open Source License
private final Composite createPropertyPane(Composite parent) { // If the title is visible // create the title area. Composite propertyContainer = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginWidth = 0;/*from w w w. jav a 2s . co m*/ layout.marginHeight = 0; propertyContainer.setLayout(layout); Composite titleComposite = new Composite(propertyContainer, SWT.NONE); layout = new GridLayout(); layout.marginHeight = 0; layout.marginWidth = 0; layout.verticalSpacing = 0; layout.horizontalSpacing = 0; titleComposite.setLayout(layout); GridData titleLayoutData = new GridData(GridData.FILL_HORIZONTAL); titleLayoutData.horizontalIndent = IDialogConstants.HORIZONTAL_MARGIN; titleComposite.setLayoutData(titleLayoutData); if (isTitleVisible()) { createTitleArea(titleComposite); Label separator = new Label(propertyContainer, SWT.HORIZONTAL | SWT.SEPARATOR); separator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL)); } GridData data = new GridData(GridData.FILL_BOTH); propertyPane = new Composite(propertyContainer, SWT.NONE); propertyPane.setLayout(propertyPaneLayout); propertyPane.setLayoutData(data); return propertyContainer; }
From source file:org.eclipse.birt.report.designer.internal.ui.dialogs.expression.ExpressionEditor.java
License:Open Source License
protected Control createButtonBar(Composite parent) { Font font = parent.getFont(); Composite composite = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(); layout.marginHeight = 0;// w ww . ja va 2 s . com layout.marginLeft = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.marginWidth = 0; composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); composite.setFont(font); fStatusLine = new MessageLine(composite); fStatusLine.setAlignment(SWT.LEFT); GridData statusData = new GridData(GridData.FILL_HORIZONTAL); fStatusLine.setErrorStatus(null); fStatusLine.setFont(font); fStatusLine.setLayoutData(statusData); super.createButtonBar(composite); checkStatus(); return composite; }
From source file:org.eclipse.birt.report.designer.internal.ui.dialogs.TableOptionBindingDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { loadPreference();// w w w. ja v a 2s . c o m Composite composite = 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); composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); applyDialogFont(composite); new Label(composite, SWT.NONE).setText(MSG_DATA_SET); dataSetCombo = new Combo(composite, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY); dataSetCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); dataSetCombo.setVisibleItemCount(30); String[] dataSets = ChoiceSetFactory.getDataSets(); String[] newList = new String[dataSets.length + 1]; System.arraycopy(dataSets, 0, newList, 1, dataSets.length); newList[0] = NONE; dataSetCombo.setItems(newList); dataSetCombo.select(0); autoChk = new Button(composite, SWT.CHECK); autoChk.setText(Messages.getString("TableOptionDialog.text.AutoSummary")); //$NON-NLS-1$ GridData gdata = new GridData(GridData.FILL_HORIZONTAL); gdata.horizontalSpan = 2; gdata.verticalIndent = 10; gdata.horizontalIndent = 10; autoChk.setLayoutData(gdata); autoChk.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (dataSetCombo.getSelectionIndex() == 0) { rowEditor.setEnabled(!autoChk.getSelection()); } } }); final Composite contentPane = new Composite(composite, SWT.NONE); gdata = new GridData(GridData.FILL_BOTH); gdata.horizontalSpan = 2; gdata.minimumWidth = 400; gdata.minimumHeight = 250; contentPane.setLayoutData(gdata); contentPane.setLayout(new GridLayout()); createStaticUI(contentPane); dataSetCombo.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { if (dataSetCombo.getSelectionIndex() > 0) { createBindingUI(contentPane); } else { createStaticUI(contentPane); } contentPane.layout(); }; }); UIUtil.bindHelp(parent, IHelpContextIds.TABLE_OPTION_DIALOG_ID); return composite; }
From source file:org.eclipse.birt.report.designer.ui.dialogs.CascadingParametersDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { // Composite composite = (Composite) super.createDialogArea( parent ); ScrolledComposite sc = new ScrolledComposite((Composite) super.createDialogArea(parent), SWT.H_SCROLL | SWT.V_SCROLL); sc.setLayout(new FillLayout()); sc.setLayoutData(new GridData(GridData.FILL_BOTH)); applyDialogFont(sc);//from w w w . j ava 2 s . c o m mainContent = new Composite(sc, 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); mainContent.setLayout(layout); UIUtil.bindHelp(parent, IHelpContextIds.CASCADING_PARAMETER_DIALOG_ID); GridData data = new GridData(GridData.FILL_BOTH); maxStrLengthProperty = getMaxStrLength(PROPERTY_LABEL_STRING, mainContent); maxStrLengthOption = getMaxStrLength(OPTION_LABEL_STRING, mainContent); mainContent.setLayoutData(data); createGeneralPart(mainContent); createChoicePart(mainContent); createDynamicParamsPart(mainContent); createPropertiesPart(mainContent); createSortingArea(mainContent); createOptionsPart(mainContent); createLabel(mainContent, null); errorMessageLine = new CLabel(mainContent, SWT.NONE); GridData msgLineGridData = new GridData(GridData.FILL_HORIZONTAL); msgLineGridData.horizontalSpan = 2; errorMessageLine.setLayoutData(msgLineGridData); sc.setContent(mainContent); sc.setExpandHorizontal(true); // sc.setExpandVertical( true ); sc.setMinWidth(500); // sc.setMinHeight( 570 ); Point size = mainContent.computeSize(SWT.DEFAULT, SWT.DEFAULT); mainContent.setSize(size); return sc; }
From source file:org.eclipse.birt.report.designer.ui.dialogs.GroupDialog.java
License:Open Source License
protected Control createDialogArea(Composite parent) { // Assert.isNotNull( dataSetList ); if (sytleChoicesAll == null) { sytleChoicesAll = getAllStyleChoices(); }// www . j a v a 2s . c om // Composite topComposite = (Composite) super.createDialogArea( parent // ); ScrolledComposite scrollContent = new ScrolledComposite((Composite) super.createDialogArea(parent), SWT.H_SCROLL | SWT.V_SCROLL); scrollContent.setAlwaysShowScrollBars(false); scrollContent.setExpandHorizontal(true); scrollContent.setMinWidth(600); scrollContent.setLayout(new FillLayout()); scrollContent.setLayoutData(new GridData(GridData.FILL_BOTH)); applyDialogFont(scrollContent); Composite topComposite = new Composite(scrollContent, 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); topComposite.setLayout(layout); createTitleArea(topComposite); Composite composite = new Composite(topComposite, SWT.NONE); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); composite.setLayout(new GridLayout(2, true)); createFieldArea(composite); createGroupArea(composite); createBookmarkArea(topComposite); createTOCArea(topComposite); createFilterSortingArea(topComposite); UIUtil.bindHelp(parent, IHelpContextIds.GROUP_DIALOG_ID); Point size = topComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT); topComposite.setSize(size.x, size.y); scrollContent.setContent(topComposite); return scrollContent; }