Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.FormLayout


    // hookGraphicalViewer();
    // initializeGraphicalViewer();
   
      composite = new Composite( parent, SWT.NO_BACKGROUND);
       
        composite.setLayout(new FormLayout());
        composite.setFont(parent.getFont());
        setPartName(getMap().getName());

        setTitleToolTip(Messages.MapEditor_titleToolTip);
        setTitleImage(ProjectUIPlugin.getDefault().getImage(ISharedImages.MAP_OBJ));
View Full Code Here


        FormData fd;
        Label lbl;

        // Defensively build a new Composite eventhough arg0 already is one
        Composite topComp = new Composite(comp, SWT.NULL);
        FormLayout topLayout = new FormLayout();
        topLayout.marginWidth = 0;
        topLayout.marginHeight = 0;
        topComp.setLayout(topLayout);

        // Stored settings: show only if we have some storage.
        if (storedDBCIList.size() > 0) {
            // create the combo
            lbl = new Label(topComp, SWT.NONE);
            lbl.setText(Messages.DataBaseRegistryWizardPage_label_recent_text);
            lbl.setToolTipText(Messages.DataBaseRegistryWizardPage_recent_tooltip);
            fd = new FormData();
            fd.top = new FormAttachment(0, 10);
            fd.left = new FormAttachment(0, 24);
            lbl.setLayoutData(fd);
            rcntComboWgt = new Combo(topComp, SWT.NULL | SWT.READ_ONLY);
            rcntComboWgt.select(0);
            rcntComboWgt.setToolTipText(Messages.DataBaseRegistryWizardPage_recent_tooltip);
            fd = new FormData();
            fd.top = new FormAttachment(0, 10);
            fd.left = new FormAttachment(lbl, 5);
            fd.right = new FormAttachment(100, -40);
            rcntComboWgt.setLayoutData(fd);
        }

        // Composite to hold the parameter widgets
        Composite paramComp = new Composite(topComp, SWT.NULL);
        fd = new FormData();
        if (0 < storedDBCIList.size()) {
            fd.top = new FormAttachment(rcntComboWgt, 10);
        } else {
            fd.top = new FormAttachment(0, 2);
        }
        fd.left = new FormAttachment(topComp, 2);
        fd.bottom = new FormAttachment(100, -2);
        paramComp.setLayoutData(fd);
        paramComp.setLayout(new FormLayout());

        // Host
        lbl = new Label(paramComp, SWT.NULL);
        lbl.setText(Messages.DataBaseRegistryWizardPage_label_host_text);
        lbl.setToolTipText(Messages.DataBaseRegistryWizardPage_host_tooltip);
View Full Code Here

  public Splitter(Composite parent, int style) {
    super(parent, 0);
    state = State.DEFAULT;
    vertical = (style & SWT.VERTICAL) != 0;
    smooth = (style & SWT.SMOOTH) != 0;
    setLayout(new FormLayout());
    sash = new Sash(this, vertical?SWT.HORIZONTAL:SWT.VERTICAL);
    setDivider(50, 6);
    sash.addSelectionListener(this);
    sash.addDragDetectListener(this);
    sash.addMouseListener(this);
View Full Code Here

    return this;
  }
  public void createPartControl(Composite aParent) {
    fillActionBars();
    Composite newParent = new Composite(aParent, SWT.NONE);
    newParent.setLayout(new FormLayout());
    super.createPartControl(newParent);
    filterText = new Text(newParent, SWT.SINGLE | SWT.BORDER );
   
    // layout the two objects
    FormData fd = new FormData();
View Full Code Here

    for (int i=0; i<12; i++) {
      ToolItem item = new ToolItem(toolBar, SWT.PUSH);
      item.setImage(image);
    }
   
    final FormLayout form = new FormLayout();
    shell.setLayout (form);
   
    FormData ToolBarData = new FormData();
    ToolBarData.left = new FormAttachment(0, 0);
    ToolBarData.right = new FormAttachment(100, 0);
View Full Code Here

  protected Control createDialogArea(Composite parent) {
    setMessage(Messages.AudioTagTitleAreaDialog_batchedit_dialog_message);
    setTitle(Messages.AudioTagTitleAreaDialog_batchedit_dialog_title);
    Composite area = (Composite) super.createDialogArea(parent);
    Composite container = new Composite(area, SWT.NONE);
    container.setLayout(new FormLayout());
    container.setLayoutData(new GridData(GridData.FILL_BOTH));

    Label audioFolderLabel = new Label(container, SWT.NONE);
    FormData audioFolderLabelFormData = new FormData();
    audioFolderLabelFormData.left = new FormAttachment(0, 6);
View Full Code Here

       
        sShell = new Shell();
        sShell.setText("Transition Test 2");
        sShell.setSize(new Point(800, 600));
        sShell.setLocation(0, 0);
        sShell.setLayout(new FormLayout());
        //sShell.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));
       
        imgs = new Image[6];
        for(int i = 0; i < imgs.length; i++)
            imgs[i] = new Image(null, new Formatter().format("imgs\\%02d.jpg", i+1).toString());
View Full Code Here

    }
   
    private Composite getComp1(Composite parent) {
        if(null == comp1) {
            comp1 = new Composite(parent, SWT.NONE);
            comp1.setLayout(new FormLayout());
           
            FormData fd;
           
            final Label cap = new Label(comp1, SWT.LEFT);
            cap.setText("\n  Tab Item 1");
View Full Code Here

    }
   
    private Composite getComp2(Composite parent) {
        if(null == comp2) {
            comp2 = new Composite(parent, SWT.NONE);
            comp2.setLayout(new FormLayout());
           
            FormData fd;
           
            final Label cap = new Label(comp2, SWT.LEFT);
            cap.setText("\n  Tab Item 2");
            cap.setFont(getTitleFont());
            cap.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY));
            cap.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_MAGENTA));
            fd = new FormData();
            fd.top = new FormAttachment(0, 0);
            fd.height = 40;
            fd.left = new FormAttachment(0, 0);
            fd.right = new FormAttachment(100, 0);
            cap.setLayoutData(fd);
           
            final Label l1 = new Label(comp2, SWT.RIGHT);
            l1.setText("First Name :");
            fd = new FormData();
            fd.top = new FormAttachment(cap, 10);
            fd.height = 40;
            fd.right = new FormAttachment(0, 70);
            l1.setLayoutData(fd);
   
            final Label l2 = new Label(comp2, SWT.RIGHT);
            l2.setText("Last Name :");
            fd = new FormData();
            fd.top = new FormAttachment(l1, 5);
            fd.height = 40;
            fd.right = new FormAttachment(0, 70);
            l2.setLayoutData(fd);
   
            final Text t1 = new Text(comp2, SWT.BORDER | SWT.SINGLE);
            fd = new FormData();
            fd.top = new FormAttachment(l1, 0, SWT.TOP);
            fd.left = new FormAttachment(l1, 10);
            fd.right = new FormAttachment(100, -10);
            t1.setLayoutData(fd);
            t1.setText("Omar");
   
            final Text t2 = new Text(comp2, SWT.BORDER | SWT.SINGLE);
            fd = new FormData();
            fd.top = new FormAttachment(l2, 0, SWT.TOP);
            fd.left = new FormAttachment(l2, 10);
            fd.right = new FormAttachment(100, -10);
            t2.setLayoutData(fd);
            t2.setText("Ali");
           
            Group grp = new Group(comp2, SWT.NONE);
            grp.setLayout(new FormLayout());
            grp.setText("Group :");
            fd = new FormData();
            fd.top = new FormAttachment(l2, 5);
            fd.bottom = new FormAttachment(100, -10);
            fd.left = new FormAttachment(l2, 0, SWT.LEFT);
View Full Code Here

    }
   
    private Composite getComp3(Composite parent) {
        if(null == comp3) {
            comp3 = new Composite(parent, SWT.NONE);
            comp3.setLayout(new FormLayout());
           
            FormData fd;
           
            final Label cap = new Label(comp3, SWT.LEFT);
            cap.setText("\n  Tab Item 3");
View Full Code Here

TOP

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

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.