Example usage for org.eclipse.jface.dialogs IDialogConstants HORIZONTAL_MARGIN

List of usage examples for org.eclipse.jface.dialogs IDialogConstants HORIZONTAL_MARGIN

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogConstants HORIZONTAL_MARGIN.

Prototype

int HORIZONTAL_MARGIN

To view the source code for org.eclipse.jface.dialogs IDialogConstants HORIZONTAL_MARGIN.

Click Source Link

Document

Horizontal margin in dialog units (value 7).

Usage

From source file:org.talend.designer.filemultischemas.ui.dialog.MultiSchemaDialog.java

License:Open Source License

@Override
protected Control createDialogArea(Composite parent) {
    Composite panel = 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);
    panel.setLayout(layout);/*from www.j  av a2  s.  c o  m*/
    panel.setLayoutData(new GridData(GridData.FILL_BOTH));
    applyDialogFont(panel);

    multiSchemaUI = new MultiSchemasUI(panel, this.multiSchemasMain.getMultiSchemaManager());
    multiSchemaUI.addListener(this);
    multiSchemaUI.init();

    return panel;
}

From source file:org.talend.designer.neo4j.ui.dialogs.Neo4jDialog.java

License:Open Source License

@Override
protected Control createDialogArea(Composite parent) {
    Composite panel = 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);
    panel.setLayout(layout);//from ww w  .j  av  a  2 s .  co  m
    panel.setLayoutData(new GridData(GridData.FILL_BOTH));
    applyDialogFont(panel);

    neo4jMain.createUI(panel, true);

    return panel;
}

From source file:org.talend.designer.rowgenerator.ui.dialogs.RowGeneratorDialog.java

License:Open Source License

@Override
protected Control createDialogArea(Composite parent) {
    Composite panel = 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);
    panel.setLayout(layout);//from w w w .  ja va2s  .c o m
    panel.setLayoutData(new GridData(GridData.FILL_BOTH));
    applyDialogFont(panel);

    rowGenMain.createUI(panel, true);
    rowGenMain.updateTableTitleColumn();
    rowGenMain.updateComponentsSize();

    return panel;
}

From source file:org.talend.expressionbuilder.ui.PigExpressionBuilderDialog.java

License:Open Source License

@Override
protected Control createDialogArea(Composite parent) {
    container = 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);
    container.setLayout(layout);//www.jav  a2 s. c om
    container.setLayoutData(new GridData(GridData.FILL_BOTH));
    applyDialogFont(container);

    final SashForm sashForm = new SashForm(container, SWT.NONE);
    sashForm.setOrientation(SWT.VERTICAL);

    final Composite upperComposite = new Composite(sashForm, SWT.NONE);
    upperComposite.setLayout(new FillLayout());

    final SashForm upperSashform = new SashForm(upperComposite, SWT.NONE);

    expressionComposite = new PigExpressionComposite(this, upperSashform, SWT.NONE, dataBean);
    expressionComposite.setExpression(defaultExpression, true);

    testComposite = new PigInputTableComposite(upperSashform, SWT.NONE);
    testComposite.addVariables(defaultVariables);
    upperSashform.setWeights(new int[] { 3, 2 });

    final Composite lowerComposite = new Composite(sashForm, SWT.NONE);
    lowerComposite.setLayout(new FillLayout());

    categoryComposite = new PigCategoryComposite(lowerComposite, SWT.NONE, manager);
    final GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
    sashForm.setLayoutData(gridData);
    sashForm.setWeights(new int[] { 3, 2 });
    return container;
}

From source file:org.talend.registration.wizards.register.RegisterWizardPage1.java

License:Open Source License

@Override
protected Control createButtonBar(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout(3, true);
    // layout.numColumns = 0; // this is incremented by createButton
    layout.makeColumnsEqualWidth = true;
    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);/*ww w  .  j av a  2  s.c om*/
    GridData data = new GridData();// GridData.VERTICAL_ALIGN_CENTER | GridData.HORIZONTAL_ALIGN_END
    composite.setLayoutData(data);
    composite.setFont(parent.getFont());

    // Add the buttons to the button bar.
    createButtonsForButtonBar(composite);
    return composite;
}

From source file:org.talend.repository.json.ui.wizards.view.BRMSSchemaOutputDialog.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);/* ww w . j a va 2  s .co m*/
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    applyDialogFont(composite);

    // Composite composite = (Composite) super.createDialogArea(parent);
    composite.setLayout(new FillLayout());

    tableEditor = new MetadataEmfTableEditor("");
    MetadataTable metadataTable = form.getMetadataOutputTable();
    tableEditor.setMetadataTable(metadataTable);
    tableEditor.removeAll();
    // List<MetadataColumn> list = (List<MetadataColumn>) metadataTable.getColumns();
    // tableEditor.addAll(list);
    // if (list.size() > 0) {
    // for (MetadataColumn column : list) {
    // boolean toAdd = true;
    // for (int i = 0; i < list.size(); i++) {
    // String label = column.getLabel();
    // String curLabel = list.get(i).getLabel();
    // if (label.equals(curLabel)) {
    // toAdd = false;
    // break;
    // }
    // }
    // if (toAdd) {
    // tableEditor.add(column);
    // }
    // }
    // }
    tableEditorView = new MetadataEmfTableEditorView(composite, SWT.NONE);
    tableEditorView.setMetadataEditor(tableEditor);
    addListeners();
    return composite;
}

From source file:org.talend.repository.viewer.dialog.RepositoryFilterSettingDialog.java

License:Open Source License

@Override
protected Control createDialogArea(Composite parent) {
    SashForm sash = new SashForm(parent, SWT.HORIZONTAL | SWT.SMOOTH);
    sash.setLayoutData(new GridData(GridData.FILL_BOTH));
    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;
    sash.setLayout(layout);/* ww  w .j a va  2s . c  om*/
    GridData layoutData = new GridData(GridData.FILL_BOTH);
    layoutData.widthHint = WIDTH;
    layoutData.heightHint = HEIGHT;
    sash.setLayoutData(layoutData);
    applyDialogFont(sash);

    Composite leftPart = new Composite(sash, SWT.NONE);
    leftPart.setLayout(new GridLayout());
    leftPart.setLayoutData(new GridData(GridData.FILL_BOTH));
    applyDialogFont(leftPart);
    createLeftContent(leftPart);

    Composite rightPart = new Composite(sash, SWT.NONE);
    rightPart.setLayout(new GridLayout());
    rightPart.setLayoutData(new GridData(GridData.FILL_BOTH));
    applyDialogFont(rightPart);
    createRightContent(rightPart);
    addListeners();
    sash.setWeights(new int[] { 1, 1 });
    return sash;
}

From source file:org.tigris.subversion.subclipse.ui.dialogs.AddToVersionControlDialog.java

License:Open Source License

/**
 * @see org.eclipse.team.internal.ui.DetailsDialog#createDropDownDialogArea(org.eclipse.swt.widgets.Composite)
 *///  w ww.  j a v a2s . co  m
protected Composite createDropDownDialogArea(Composite 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);
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    composite.setFont(parent.getFont());

    addUnaddedResourcesArea(composite);

    // set F1 help
    PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.ADD_TO_VERSION_CONTROL_DIALOG);

    return composite;
}

From source file:org.tigris.subversion.subclipse.ui.util.DetailsDialogWithProjects.java

License:Open Source License

/**
 * @see DetailsDialog#createDropDownDialogArea(Composite)
 *///from  ww  w  .  j  a  va  2 s .  c o  m
protected Composite createDropDownDialogArea(Composite 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);
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    composite.setFont(parent.getFont());

    detailsList = new org.eclipse.swt.widgets.List(composite,
            SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
    GridData data = new GridData();
    data.heightHint = 75;
    data.horizontalAlignment = GridData.FILL;
    data.grabExcessHorizontalSpace = true;
    detailsList.setLayoutData(data);

    if (detailsTitle != null) {
        detailsList.add(detailsTitle);
    }

    for (int i = 0; i < projects.length; i++) {

        detailsList.add(projects[i].getName()); //$NON-NLS-1$
    }
    return composite;
}

From source file:org.xmind.ui.internal.print.multipage.MultipageSetupDialog.java

License:Open Source License

@Override
protected Control createButtonBar(Composite parent) {
    Composite composite1 = new Composite(parent, SWT.NONE);
    composite1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    GridLayout layout2 = new GridLayout(2, false);
    layout2.marginWidth = 0;/*from  ww  w . jav  a2 s  . co m*/
    layout2.marginHeight = 0;
    layout2.horizontalSpacing = 0;
    composite1.setLayout(layout2);

    leftButtonBar = new Composite(composite1, SWT.NONE);
    leftButtonBar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    GridLayout layout3 = new GridLayout(0, false);
    layout3.marginWidth = 12;
    layout3.marginHeight = 0;
    leftButtonBar.setLayout(layout3);

    Composite composite = new Composite(composite1, SWT.NONE);
    // create a layout with spacing and margins appropriate for the font
    // size.
    GridLayout layout = new GridLayout();
    layout.numColumns = 0; // this is incremented by createButton
    layout.makeColumnsEqualWidth = true;
    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(SWT.RIGHT, SWT.CENTER, false, false);
    composite.setLayoutData(data);
    composite.setFont(parent.getFont());

    // Add the buttons to the button bar.
    createButtonsForButtonBar(composite);
    return composite;
}