Examples of FormAttachment


Examples of org.eclipse.swt.layout.FormAttachment

  }

  private void createGeneralGroup(Composite parent) {
    Group group = new Group(parent, SWT.NONE);
    FormData formData = new FormData();
    formData.top = new FormAttachment(0, 5);
    formData.left = new FormAttachment(0, 5);
    formData.right = new FormAttachment(100, -5);
    group.setLayoutData(formData);

    group.setText("General");
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(1));
View Full Code Here

Examples of org.eclipse.swt.layout.FormAttachment

        }

        // we have to layout the calendar after everything else is set up
        // since we don't know which components we need in the layout.
        FormData daySelectorData = new FormData();
        daySelectorData.right = new FormAttachment(100, 0);
        daySelectorData.left = new FormAttachment(0, 0);
        // daySelector.setLayoutData(daySelectorData);
        dayPane.setLayoutData(daySelectorData);

        // attach the month selector to the top if it should be shown.
        if (showMonthSelector) {
            FormData monthSelectorData = new FormData();
            monthSelectorData.top = new FormAttachment(0, 0);
            monthSelectorData.right = new FormAttachment(100, 0);
            monthSelectorData.left = new FormAttachment(0, 0);
            monthSelector.setLayoutData(monthSelectorData);
            daySelectorData.top = new FormAttachment(monthSelector, 0);
        }

        // put the today selector on the bottom.
        if (showTodaySelector) {
            FormData todaySelectorData = new FormData();
            todaySelectorData.bottom = new FormAttachment(100, 0);
            todaySelectorData.left = new FormAttachment(25, 0);
            todaySelectorData.right = new FormAttachment(75, 0);
            // todaySelectorData.height = 30;
            todaySelectorData.top = new FormAttachment(dayPane, 0, SWT.BOTTOM);
            // todaySelectorData.top = new FormAttachment(daySelector, 0,
            // SWT.BOTTOM);
            todaySelector.setLayoutData(todaySelectorData);
            // daySelectorData.bottom = new FormAttachment(todaySelector);
        }
View Full Code Here

Examples of org.eclipse.swt.layout.FormAttachment

        setControl(composite);

        final Button wCreate = new Button(composite, SWT.NONE);
        wCreate.setEnabled(model == null);
        final FormData fd_wCreate = new FormData();
        fd_wCreate.bottom = new FormAttachment(100, -5);
        fd_wCreate.right = new FormAttachment(100, -4);
        wCreate.setLayoutData(fd_wCreate);
        wCreate.setText("Create bnd.bnd");

        final TableViewer tableViewer = new TableViewer(composite, SWT.BORDER);
        table = tableViewer.getTable();
        final FormData fd_table = new FormData();
        fd_table.top = new FormAttachment(0, 3);
        fd_table.left = new FormAttachment(0, 3);
        fd_table.right = new FormAttachment(100, -4);
        fd_table.bottom = new FormAttachment(100, -37);
        table.setLayoutData(fd_table);
        table.setLinesVisible(true);
        table.setHeaderVisible(true);

        final TableColumn wBsn = new TableColumn(table, SWT.NONE);
View Full Code Here

Examples of org.eclipse.swt.layout.FormAttachment

        super.createControls(parent, aTabbedPropertySheetPage);
        Composite c = new Composite(parent, SWT.NONE);
        c.setLayout(new FormLayout());
        delegate.createPartControl(c);
        FormData data = new FormData();
        data.left = new FormAttachment(0, 0);
        data.right = new FormAttachment(100, 0);
        data.top = new FormAttachment(0, 0);
        data.bottom = new FormAttachment(100, 0);
        delegate.getMainControl().setLayoutData(data);
    }
View Full Code Here

Examples of org.eclipse.swt.layout.FormAttachment

      }
    });
    final Label status = new Label(parent, SWT.NONE);
    final ProgressBar progressBar = new ProgressBar(parent, SWT.NONE);
    FormData data = new FormData();
    data.top = new FormAttachment(0, 5);
    toolbar.setLayoutData(data);
    data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(100, 0);
    data.top = new FormAttachment(canvas, 5, SWT.DEFAULT);
    data.bottom = new FormAttachment(status, -5, SWT.DEFAULT);
    try {
      browser = new Browser(parent, SWT.NONE);
      browser.setLayoutData(data);
    } catch (SWTError e) {
      /* Browser widget could not be instantiated */
      Label label = new Label(parent, SWT.CENTER | SWT.WRAP);
      label.setText(getResourceString("BrowserNotCreated"));
      label.setLayoutData(data);
    }
    data = new FormData();
    data.width = 24;
    data.height = 24;
    data.top = new FormAttachment(0, 5);
    data.right = new FormAttachment(100, -5);
    canvas.setLayoutData(data);
    data = new FormData();
    data.top = new FormAttachment(toolbar, 0, SWT.TOP);
    data.left = new FormAttachment(toolbar, 5, SWT.RIGHT);
    data.right = new FormAttachment(canvas, -5, SWT.DEFAULT);
    location.setLayoutData(data);
    data = new FormData();
    data.left = new FormAttachment(0, 5);
    data.right = new FormAttachment(progressBar, 0, SWT.DEFAULT);
    data.bottom = new FormAttachment(100, -5);
    status.setLayoutData(data);
    data = new FormData();
    data.right = new FormAttachment(100, -5);
    data.bottom = new FormAttachment(100, -5);
    progressBar.setLayoutData(data);
    if (browser != null) {
      itemBack.setEnabled(browser.isBackEnabled());
      itemForward.setEnabled(browser.isForwardEnabled());
      Listener listener = new Listener() {
View Full Code Here

Examples of org.eclipse.swt.layout.FormAttachment

        compositeListeners = new LinkedList<CompositeListener>();
        setLayout(new FormLayout());

        final Button btnNone = new Button(this, SWT.BORDER | SWT.FLAT);
        final FormData fd_btnNone = new FormData();
        fd_btnNone.top = new FormAttachment(0, 10);
        fd_btnNone.right = new FormAttachment(100, -10);
        btnNone.setLayoutData(fd_btnNone);

        btnNone.setText("Select None");
        btnNone.addSelectionListener(new SelectionListener() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                setCheckedForAll(false);
            }

            @Override
            public void widgetDefaultSelected(SelectionEvent e) {
            }
        });

        final Button btnAll = new Button(this, SWT.NONE);
        final FormData fd_btnAll = new FormData();
        fd_btnAll.right = new FormAttachment(btnNone, -6);
        fd_btnAll.top = new FormAttachment(0, 10);
        btnAll.setLayoutData(fd_btnAll);

        btnAll.setText("Select All");
        btnAll.addSelectionListener(new SelectionListener() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                setCheckedForAll(true);
            }

            @Override
            public void widgetDefaultSelected(SelectionEvent e) {
            }
        });
        table = new Table(this, SWT.BORDER | SWT.CHECK | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
        final FormData fd_table = new FormData();
        fd_table.bottom = new FormAttachment(100, -10);
        fd_table.right = new FormAttachment(100, -10);
        fd_table.top = new FormAttachment(btnNone, 10);
        fd_table.left = new FormAttachment(0, 10);
        table.setLayoutData(fd_table);
        table.setHeaderVisible(true);
        table.setLinesVisible(true);
        table.addSelectionListener(new SelectionListener() {
            @Override
View Full Code Here

Examples of org.eclipse.swt.layout.FormAttachment

    // Stepname line
    wlStepname = new Label(shell, SWT.RIGHT);
    wlStepname.setText(BaseMessages.getString(PKG, "System.Label.StepName"));
    props.setLook(wlStepname);
    fdlStepname = new FormData();
    fdlStepname.left = new FormAttachment(0, 0);
    fdlStepname.right = new FormAttachment(middle, -margin);
    fdlStepname.top = new FormAttachment(0, margin);
    wlStepname.setLayoutData(fdlStepname);

    wStepname = new Text(shell, SWT.SINGLE | SWT.LEFT | SWT.BORDER);
    wStepname.setText(stepname);
    props.setLook(wStepname);
    wStepname.addModifyListener(lsMod);
    fdStepname = new FormData();
    fdStepname.left = new FormAttachment(middle, 0);
    fdStepname.top = new FormAttachment(0, margin);
    fdStepname.right = new FormAttachment(100, 0);
    wStepname.setLayoutData(fdStepname);

    SashForm wSash = new SashForm(shell, SWT.VERTICAL);
    props.setLook(wSash);
    /*------------------------------------------------------------------------------------------------------------------------------------------------
     * Upper part of form 
     ------------------------------------------------------------------------------------------------------------------------------------------------*/

    // top part
    wTop = new SashForm(wSash, SWT.HORIZONTAL);

    FormLayout topLayout = new FormLayout();
    topLayout.marginWidth = Const.FORM_MARGIN;
    topLayout.marginHeight = Const.FORM_MARGIN;
    wTop.setLayout(topLayout);
    props.setLook(wTop);

    addLeftArea();
    addScriptArea();

    FormData fdTop = new FormData();
    fdTop.left = new FormAttachment(0, 0);
    fdTop.top = new FormAttachment(0, 0);
    fdTop.right = new FormAttachment(100, 0);
    fdTop.bottom = new FormAttachment(100, 0);
    wTop.setLayoutData(fdTop);

    wTop.SASH_WIDTH = margin;
    wTop.setWeights(new int[] { 32, 68 });

    /*------------------------------------------------------------------------------------------------------------------------------------------------
     * Bottom part of form
     ------------------------------------------------------------------------------------------------------------------------------------------------*/

    Composite wBottom = new Composite(wSash, SWT.NONE);
    props.setLook(wBottom);

    FormLayout bottomLayout = new FormLayout();
    bottomLayout.marginWidth = Const.FORM_MARGIN;
    bottomLayout.marginHeight = Const.FORM_MARGIN;
    wBottom.setLayout(bottomLayout);

    // separator
    wSeparator = new Label(wBottom, SWT.SEPARATOR | SWT.HORIZONTAL);
    FormData fdSeparator = new FormData();
    fdSeparator.left = new FormAttachment(0, 0);
    fdSeparator.right = new FormAttachment(100, 0);
    fdSeparator.top = new FormAttachment(0, -margin);
    wSeparator.setLayoutData(fdSeparator);
    props.setLook(wSeparator);

    // bottom tab folder
    wBottomFolder = new CTabFolder(wBottom, SWT.BORDER | SWT.RESIZE);
    wBottomFolder.setSimple(false);
    wBottomFolder.setUnselectedImageVisible(true);
    wBottomFolder.setUnselectedCloseVisible(false);
    wBottomFolder.setMaximizeVisible(false);
    wBottomFolder.setMinimizeVisible(false);
    props.setLook(wBottomFolder);

    addOutputFieldsTab();

    prevStepNames = transMeta.getPrevStepNames(stepMeta);
    addInfoStepsTab();

    nextStepNames = transMeta.getNextStepNames(stepMeta);
    addTargetStepsTab();

    addScopeVariablesTab();
    addRuntimeTab();

    // set selected item in tab
    wBottomFolder.setSelection(0);

    // layout tab folder below the label
    FormData fdBottomFolder = new FormData();
    fdBottomFolder.left = new FormAttachment(0, 0);
    fdBottomFolder.top = new FormAttachment(wSeparator, margin);
    fdBottomFolder.right = new FormAttachment(100, 0);
    fdBottomFolder.bottom = new FormAttachment(100, 0);
    wBottomFolder.setLayoutData(fdBottomFolder);

    FormData fdBottom = new FormData();
    fdBottom.left = new FormAttachment(0, 0);
    fdBottom.top = new FormAttachment(0, 0);
    fdBottom.right = new FormAttachment(100, 0);
    fdBottom.bottom = new FormAttachment(100, 0);
    wBottom.setLayoutData(fdBottom);

    /*------------------------------------------------------------------------------------------------------------------------------------------------
     * Wrapping up form
     ------------------------------------------------------------------------------------------------------------------------------------------------*/

    FormData fdSash = new FormData();
    fdSash.left = new FormAttachment(0, 0);
    fdSash.top = new FormAttachment(wStepname, margin);
    fdSash.right = new FormAttachment(100, 0);
    fdSash.bottom = new FormAttachment(100, -50);
    wSash.setLayoutData(fdSash);

    wSash.SASH_WIDTH = margin;
    wSash.setWeights(new int[] { 75, 25 });

View Full Code Here

Examples of org.eclipse.swt.layout.FormAttachment

    Composite wPanel = new Composite(wBottomFolder, SWT.NONE);
    wPanel.setLayout(new FormLayout());

    FormData fdPanel = new FormData();
    fdPanel.left = new FormAttachment(0, 0);
    fdPanel.top = new FormAttachment(0, 0);
    fdPanel.right = new FormAttachment(100, 0);
    fdPanel.bottom = new FormAttachment(100, 0);
    wPanel.setLayoutData(fdPanel);

    outFieldsItem.setControl(wPanel);

    final int nrRows = input.getRubyVariables().size();
    ColumnInfo[] colinf = new ColumnInfo[] {
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.ScopeVariable"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.ScopeVariableValue"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
    };
    colinf[1].setUsingVariables(true);

    wScopeVariables = new TableView(transMeta, wPanel, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, nrRows, lsMod, props);

    FormData fdFields = new FormData();
    fdFields.left = new FormAttachment(0, 0);
    fdFields.top = new FormAttachment(0, 0);
    fdFields.right = new FormAttachment(100, 0);
    fdFields.bottom = new FormAttachment(100, 0);
    wScopeVariables.setLayoutData(fdFields);

  }
View Full Code Here

Examples of org.eclipse.swt.layout.FormAttachment

    Composite wPanel = new Composite(wBottomFolder, SWT.NONE);
    wPanel.setLayout(new FormLayout());
    props.setLook(wPanel);

    FormData fdPanel = new FormData();
    fdPanel.left = new FormAttachment(0, 0);
    fdPanel.top = new FormAttachment(0, 0);
    fdPanel.right = new FormAttachment(100, 0);
    fdPanel.bottom = new FormAttachment(100, 0);
    wPanel.setLayoutData(fdPanel);

    outFieldsItem.setControl(wPanel);

    wClearInputFields = new Button(wPanel, SWT.CHECK);
    wClearInputFields.setText(BaseMessages.getString(PKG, "RubyStepDialog.ClearFields.Label")); //$NON-NLS-1$
    props.setLook(wClearInputFields);
    FormData fdClearResultFields = new FormData();
    fdClearResultFields.right = new FormAttachment(100, 0);
    fdClearResultFields.bottom = new FormAttachment(100, 0);
    wClearInputFields.setLayoutData(fdClearResultFields);

    final int fieldsRows = input.getOutputFields().size();

    ColumnInfo[] colinf = new ColumnInfo[] {
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.Fieldname"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.Type"), ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMeta.getTypes()), //$NON-NLS-1$
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.UpdateExisting"), ColumnInfo.COLUMN_TYPE_CCOMBO, NO_YES) //$NON-NLS-1$
    };

    wFields = new TableView(transMeta, wPanel, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, fieldsRows, lsMod, props);

    FormData fdFields = new FormData();
    fdFields.left = new FormAttachment(0, 0);
    fdFields.top = new FormAttachment(0, 0);
    fdFields.right = new FormAttachment(100, 0);
    fdFields.bottom = new FormAttachment(wClearInputFields, -margin);
    wFields.setLayoutData(fdFields);

  }
View Full Code Here

Examples of org.eclipse.swt.layout.FormAttachment

    Composite wPanel = new Composite(wBottomFolder, SWT.NONE);
    wPanel.setLayout(new FormLayout());
    props.setLook(wPanel);

    FormData fdPanel = new FormData();
    fdPanel.left = new FormAttachment(0, 0);
    fdPanel.top = new FormAttachment(0, 0);
    fdPanel.right = new FormAttachment(100, 0);
    fdPanel.bottom = new FormAttachment(100, 0);
    wPanel.setLayoutData(fdPanel);

    infoStepsItem.setControl(wPanel);

    final int nrRows = input.getInfoSteps().size();

    ColumnInfo[] colinf = new ColumnInfo[] {
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.InfoStepTag"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.InfoStepName"), ColumnInfo.COLUMN_TYPE_CCOMBO, prevStepNames), //$NON-NLS-1$
    };

    wInfoSteps = new TableView(transMeta, wPanel, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, nrRows, lsMod, props);

    FormData fdFields = new FormData();
    fdFields.left = new FormAttachment(0, 0);
    fdFields.top = new FormAttachment(0, 0);
    fdFields.right = new FormAttachment(100, 0);
    fdFields.bottom = new FormAttachment(100, 0);
    wInfoSteps.setLayoutData(fdFields);

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.