Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.FormData


 
  public static void createHorizontalSash(final int limit,int init_percent, final Composite parent,final Composite composite1,final Composite composite2) {
 
    final Sash sash = new Sash (parent, SWT.HORIZONTAL | SWT.BORDER);
   
    FormData composite1_data = new FormData ();
    composite1_data.left = new FormAttachment (0);
    composite1_data.right = new FormAttachment (100);
    composite1_data.top = new FormAttachment (0);
    composite1_data.bottom = new FormAttachment (sash);
    composite1.setLayoutData (composite1_data);
   
    FormData composite2_data = new FormData ();
    composite2_data.left = new FormAttachment (0, 0);
    composite2_data.right = new FormAttachment (100, 0);
    composite2_data.top = new FormAttachment (sash, 0);
    composite2_data.bottom = new FormAttachment (100, 0);
    composite2.setLayoutData (composite2_data);
   
    final FormData sash_data = new FormData ();
    sash_data.left = new FormAttachment (0);
    sash_data.right = new FormAttachment (100);
    sash_data.top = new FormAttachment (init_percent, 0);
    //sash_data.bottom = new FormAttachment (init_percent+2, 0);
    sash.setLayoutData (sash_data);
View Full Code Here


  label.setImage(image);
 
  FormLayout layout = new FormLayout();
  splash.setLayout(layout);
 
  FormData labelData = new FormData();
  labelData.right = new FormAttachment(100, 0);
  labelData.bottom = new FormAttachment(100, 0);
  label.setLayoutData(labelData);
 
  FormData progressData = new FormData();
  progressData.left = new FormAttachment(0, 5);
  progressData.right = new FormAttachment(100, -5);
  progressData.bottom = new FormAttachment(100, -5);
  bar.setLayoutData(progressData);
 
View Full Code Here

    return container;
  }

  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);
View Full Code Here

            });
        }

        // 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);
View Full Code Here

        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);
View Full Code Here

            final TabbedPropertySheetPage aTabbedPropertySheetPage) {
        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

        display.timerExec(150, this);
      }
    });
    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());
View Full Code Here

        super(parent, style);
        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);
View Full Code Here

    // 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);
View Full Code Here

    outFieldsItem.setText(BaseMessages.getString(PKG, "RubyStepDialog.ScopeVariables.Label"));

    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

TOP

Related Classes of org.eclipse.swt.layout.FormData

Copyright © 2018 www.massapicom. 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.