Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.RowLayout


    window.setLocation(Statics.getOriginForCenter(WIDTH, HEIGHT));
    window.setLayout(new GridLayout());
   
    // Add a row of User Management actions just above the list
    Composite userMmgt = new Composite(window, SWT.NONE);
    userMmgt.setLayout(new RowLayout());
    userMmgt.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    btnAdd = new Button(userMmgt,SWT.PUSH);
    btnAdd.setText("Add user");
    btnAdd.addSelectionListener(this);
    btnEdit = new Button(userMmgt,SWT.PUSH);
    btnEdit.setText("Edit user");
    btnEdit.addSelectionListener(this);
    btnDel = new Button(userMmgt,SWT.PUSH);
    btnDel.setText("Remove user");
    btnDel.addSelectionListener(this);
   
    // Edit and delete buttons are disabled by default
    btnEdit.setEnabled(false);
    btnDel.setEnabled(false);
   
    // List of users
    list = new TableViewer(window,SWT.BORDER|SWT.FULL_SELECTION);
    list.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
   
   
    // Close button
    Composite btnCmp = new Composite(window,SWT.NONE);
    btnCmp.setLayout(new RowLayout());
    btnCmp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    btnClose = new Button(btnCmp,SWT.PUSH);
    btnClose.setText("Close");
    btnClose.addSelectionListener(this);
   
View Full Code Here


    password = new Text(window,SWT.BORDER|SWT.PASSWORD);
    password.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    Composite cmp = new Composite(window,SWT.NONE);
    cmp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    cmp.setLayout(new RowLayout());
    save = new Button(cmp,SWT.PUSH);
    save.setText("Save");
    cancel = new Button(cmp,SWT.PUSH);
    cancel.setText("Cancel");
    save.addSelectionListener(this);
View Full Code Here

      usersText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    }
   
    Composite btnComp = new Composite(window,SWT.NONE);
    btnComp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
    btnComp.setLayout(new RowLayout());
    ok = BR.widthButton(btnComp, "OK", 100);
    cancel = BR.widthButton(btnComp, "Cancel", 100);
    ok.addSelectionListener(this);
    cancel.addSelectionListener(this);
   
View Full Code Here

    GridData gdPan = new GridData();
    gdPan.grabExcessHorizontalSpace = true;
    gdPan.horizontalAlignment = SWT.FILL;
    panButton.setLayoutData(gdPan);

    RowLayout rowLayout2 = new RowLayout(SWT.HORIZONTAL);
    rowLayout2.fill = true;
    rowLayout2.wrap = false;
    rowLayout2.justify = true;
    rowLayout2.pack = false;
View Full Code Here

    GridData gdPan = new GridData();
    gdPan.grabExcessHorizontalSpace = true;
    gdPan.horizontalAlignment = SWT.FILL;
    panButton.setLayoutData(gdPan);

    RowLayout rowLayout2 = new RowLayout(SWT.HORIZONTAL);
    rowLayout2.fill = true;
    rowLayout2.wrap = false;
    rowLayout2.justify = true;
    rowLayout2.pack = false;
View Full Code Here

    GridData gdPan = new GridData();
    gdPan.grabExcessHorizontalSpace = true;
    gdPan.horizontalAlignment = SWT.FILL;
    panButton.setLayoutData(gdPan);

    RowLayout rowLayout2 = new RowLayout(SWT.HORIZONTAL);
    rowLayout2.fill = true;
    rowLayout2.wrap = false;
    rowLayout2.justify = true;
    rowLayout2.pack = false;
View Full Code Here

    itemsGroup.pack();
    scroll.setMinSize(itemsGroup.getSize());

    Composite leftButtonsGroup = new Composite(shell, SWT.NONE);
    leftButtonsGroup.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, false, false));
    leftButtonsGroup.setLayout(new RowLayout());

    if (modal && multipleSelect && !updateUponSelection)
    {
      allButton = new Button(leftButtonsGroup, SWT.NONE);
      allButton.setText("All");
      allButton.addSelectionListener(adapter);

      noneButton = new Button(leftButtonsGroup, SWT.NONE);
      noneButton.setText("None");
      noneButton.addSelectionListener(adapter);
    }

    Composite rightButtonGroup = new Composite(shell, SWT.NONE);
    rightButtonGroup.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, false));
    rightButtonGroup.setLayout(new RowLayout());

    okButton = new Button(rightButtonGroup, SWT.NONE);
    okButton.setText(modal ? "OK" : "Update");
    okButton.addSelectionListener(adapter);
    okButton.setEnabled(!isUpdateUponSelection() && selectedItems.size() >= minValidSelect &&
View Full Code Here

        fdlProcessTypeName.right = new FormAttachment(middle, -margin);
        fdlProcessTypeName.top = new FormAttachment(wFilenameField, margin);
        wlProcessTypeName.setLayoutData(fdlProcessTypeName);

        Composite composite = new Composite(shell, SWT.NULL);
        composite.setLayout(new RowLayout());
        radioButtons2[0] = new Button(composite, SWT.RADIO);
        radioButtons2[0].setSelection(true);
        radioButtons2[0].setText("List Products");
        radioButtons2[0].pack();
        radioButtons2[1] = new Button(composite, SWT.RADIO);
        radioButtons2[1].setSelection(false);
        radioButtons2[1].setText("Get Product");
        radioButtons2[1].pack();
        props.setLook(radioButtons2[0]);
        props.setLook(radioButtons2[1]);


        //wFilenameField.addModifyListener(lsMod);
        FormData fdProcessTypeName = new FormData();
        fdProcessTypeName.left = new FormAttachment(middle, 0);
        fdProcessTypeName.right = new FormAttachment(100, 0);
        fdProcessTypeName.top = new FormAttachment(wFilenameField, margin);
        composite.setLayoutData(fdProcessTypeName);


        // search type value
        Label wlSearchName = new Label(shell, SWT.RIGHT);
        wlSearchName.setText(BaseMessages.getString(PKG, "FilemgrGet.SearchType.Label"));
        props.setLook(wlSearchName);
        FormData fdlSearchName = new FormData();
        fdlSearchName.left = new FormAttachment(0, 0);
        fdlSearchName.right = new FormAttachment(middle, -margin);
        fdlSearchName.top = new FormAttachment(composite, margin);
        wlSearchName.setLayoutData(fdlSearchName);

        Composite composite1 = new Composite(shell, SWT.NULL);
        composite1.setLayout(new RowLayout());
        radioButtons[0] = new Button(composite1, SWT.RADIO);
        radioButtons[0].setSelection(true);
        radioButtons[0].setText("Name");
        radioButtons[0].pack();
        radioButtons[1] = new Button(composite1, SWT.RADIO);
View Full Code Here

      this.elementsToCompare = ((ICompareElementsEditorInput)this.getEditorInput()).getElements();
      this.accessLayer = ((ICompareElementsEditorInput)this.getEditorInput()).getAccessLayer();
      this.cacheManager = ((ICompareElementsEditorInput)this.getEditorInput()).getCacheManager();

      Composite composite = new Composite(parent, SWT.NONE);
      composite.setLayout(new RowLayout(SWT.VERTICAL));
     
      if (elementsToCompare.size() == 0){
        Label label = new Label(composite, SWT.NONE);
        label.setText("no item selected");
        return;
      }
   

      List<EAttribute> attributesToCompare = accessLayer.getAttributes(elementsToCompare.get(0));

      //name
      Composite nameComposite = new Composite(composite, SWT.NONE);
      nameComposite.setLayout( new RowLayout(SWT.HORIZONTAL));
      Label nameLabel = new Label(nameComposite, SWT.NONE);
      nameLabel.setText("name:");  
      nameLabel.setLayoutData( new RowData(labelWidth, labelHeight));
      for (Element element : elementsToCompare){
        EmbeddedLink link = new EmbeddedLink(nameComposite, SWT.NONE, false);
        String attributeValue = accessLayer.getAttributeValue(element, "name");
        link.setText(attributeValue!=null? attributeValue : "");
        link.setLayoutData( new RowData(linkWidth, linkHeight));
        link.setTarget(element);
      }

     
      //attributes
      for (EAttribute eAttribute : attributesToCompare ){
        Composite attributeComposite = new Composite(composite, SWT.NONE);
        attributeComposite.setLayout( new RowLayout(SWT.HORIZONTAL));
        if (eAttribute.getName() != "name"){
   
        Label label = new Label(attributeComposite, SWT.NONE);
        label.setText(eAttribute.getName()+":");  
        label.setLayoutData( new RowData(labelWidth, labelHeight));
        int maxLength = 0;
        for (Element element : elementsToCompare){
          String attributeValue = accessLayer.getAttributeValue(element, eAttribute.getName());
          maxLength = Math.max(maxLength, (attributeValue!=null? attributeValue : "").length());
        }
       
        for (Element element : elementsToCompare){
         
          Text text = new Text(attributeComposite, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI| SWT.WRAP);
          String attributeValue = accessLayer.getAttributeValue(element, eAttribute.getName());
          text.setText(attributeValue!=null? attributeValue : "");
          text.setLayoutData( new RowData(textboxWidth, textboxHeight));
         
          text.setToolTipText("the "+eAttribute.getName() +" of the element " + accessLayer.getAttributeValue(element, "name"));
         
          }
        }
      }

         
         
       
          ///parent Preconditions
      Composite parentPreconditionsComposite = new Composite(composite, SWT.NONE);
      parentPreconditionsComposite.setLayout( new RowLayout(SWT.HORIZONTAL));
      Label parentPreconditionLabel = new Label(parentPreconditionsComposite, SWT.NONE);
      parentPreconditionLabel.setLayoutData( new RowData(labelWidth, labelHeight));

      parentPreconditionLabel.setText("foreign preconditions:");
     
      for (Element element : elementsToCompare){
       
        Text text = new Text(parentPreconditionsComposite, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI| SWT.WRAP);
        String precoditionString = PreconditionFinder.getRequirementsFromParent(element, cacheManager);
        text.setText(precoditionString!=null && precoditionString!=""? precoditionString : "none");
        text.setLayoutData( new RowData(textboxWidth, textboxHeight));
        text.setToolTipText("foreign preconditions of the element " + accessLayer.getAttributeValue(element, "name"));
        }
     
          ///Preconditions
      Composite preconditionsComposite = new Composite(composite, SWT.NONE);
      preconditionsComposite.setLayout( new RowLayout(SWT.HORIZONTAL));
      Label preconditionLabel = new Label(preconditionsComposite, SWT.NONE);
      preconditionLabel.setLayoutData( new RowData(labelWidth, labelHeight ));
      preconditionLabel.setText("own preconditions:");
     
      for (Element element : elementsToCompare){
View Full Code Here

  /**
   * create the required controls
   */
  protected void createPartsForContraints() {
    baseComposite.setLayout(new RowLayout(SWT.HORIZONTAL));
    baseComposite.setLayoutData(new RowData(690, 70));
    addTitle();
    bodyComposite = new Composite(baseComposite, SWT.NONE);
    bodyComposite.setLayoutData(new RowData(690, 40));
    addBody();
View Full Code Here

TOP

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

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.