Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.FormAttachment


     */
    private void createARowForCreatingHeadersBinding(Composite parent, int rowCount)
    { 
        Label key = _toolkit.createLabel(parent, "Name");
        FormData formData = new FormData();
        formData.top = new FormAttachment(0, rowCount * heightForAParameter + 2);
        formData.right = new FormAttachment(15);
        key.setLayoutData(formData);
       
        Text keyText = _toolkit.createText(parent, "", SWT.NONE);
        formData = new FormData();
        formData.top = new FormAttachment(0, rowCount * heightForAParameter);
        formData.left = new FormAttachment(key, 5);
        formData.right = new FormAttachment(40);
        keyText.setLayoutData(formData);
        keyText.addKeyListener(headerBindingListener);
       
        Label value = _toolkit.createLabel(parent, "Value");
        formData = new FormData();
        formData.top = new FormAttachment(0, rowCount * heightForAParameter + 2);
        formData.right = new FormAttachment(45);
        value.setLayoutData(formData);
       
        Text valueText = _toolkit.createText(parent, "", SWT.NONE);
        formData = new FormData();
        formData.top = new FormAttachment(0, rowCount * heightForAParameter);
        formData.left = new FormAttachment(value, 5);
        formData.right = new FormAttachment(70);
        valueText.setLayoutData(formData);
        valueText.addKeyListener(headerBindingListener);
       
        // Add these to the map, to retrieve the values while setting the parameter value
        headerBindingHashMap.put(keyText, valueText);
View Full Code Here


        composite.setLayout(new FormLayout());
       
        Label label = _toolkit.createLabel(composite, "Select the notification to subscribe or unsubscribe");
        label.setFont(ApplicationRegistry.getFont(FONT_BOLD));
        FormData formData = new FormData();
        formData.top = new FormAttachment(0, 10);
        formData.left = new FormAttachment(0, 10);
        label.setLayoutData(formData);
       
        _notificationNameCombo = new Combo(composite, SWT.READ_ONLY | SWT.DROP_DOWN);
        formData = new FormData();
        formData.top = new FormAttachment(label, 10);
        formData.left = new FormAttachment(0, 10);
        formData.right = new FormAttachment(40);
        _notificationNameCombo.setLayoutData(formData);
        _notificationNameCombo.addSelectionListener(comboListener);
       
        _typesCombo = new Combo(composite, SWT.READ_ONLY | SWT.DROP_DOWN);
        formData = new FormData();
        formData.top = new FormAttachment(label, 10);
        formData.left = new FormAttachment(_notificationNameCombo, 5);
        formData.right = new FormAttachment(65);
        _typesCombo.setLayoutData(formData);
        _typesCombo.addSelectionListener(comboListener);
       
        _subscribeButton = new Button(composite, SWT.PUSH | SWT.CENTER);
        _subscribeButton.setFont(ApplicationRegistry.getFont(FONT_BUTTON));
        _subscribeButton.setText(SUBSCRIBE_BUTTON);
        formData = new FormData();
        formData.top = new FormAttachment(label, 10);
        formData.left = new FormAttachment(65, 10);
        formData.width = 80;
        _subscribeButton.setLayoutData(formData);
        _subscribeButton.addSelectionListener(selectionListener);
       
        _unsubscribeButton = new Button(composite, SWT.PUSH | SWT.CENTER);
        _unsubscribeButton.setFont(ApplicationRegistry.getFont(FONT_BUTTON));
        _unsubscribeButton.setText(UNSUBSCRIBE_BUTTON);
        formData = new FormData();
        formData.top = new FormAttachment(label, 10);
        formData.left = new FormAttachment(_subscribeButton, 10);
        formData.width = 80;
        _unsubscribeButton.setLayoutData(formData);
        _unsubscribeButton.addSelectionListener(selectionListener);
       
        Label fixedLabel = _toolkit.createLabel(composite, "");
        formData = new FormData();
        formData.top = new FormAttachment(_notificationNameCombo, 5);
        formData.left = new FormAttachment(0, 10);
        fixedLabel.setLayoutData(formData);
        fixedLabel.setText(DESCRIPTION + " : ");
        fixedLabel.setFont(ApplicationRegistry.getFont(FONT_BOLD));
       
        _descriptionLabel = _toolkit.createLabel(composite, "");
        formData = new FormData();
        formData.top = new FormAttachment(_notificationNameCombo, 5);
        formData.left = new FormAttachment(fixedLabel, 10);
        formData.right = new FormAttachment(100);
        _descriptionLabel.setLayoutData(formData);
        _descriptionLabel.setText("      ");
        _descriptionLabel.setFont(ApplicationRegistry.getFont(FONT_ITALIC));
    }
View Full Code Here

   
    private void createNotificationsTabFolder()
    {
        _notificationTabFolder = new TabFolder(_form.getBody(), SWT.NONE);
        FormData layoutData = new FormData();
        layoutData.left = new FormAttachment(0);
        layoutData.top = new FormAttachment(0);
        layoutData.right = new FormAttachment(100);
        layoutData.bottom = new FormAttachment(100);
        _notificationTabFolder.setLayoutData(layoutData);
        _notificationTabFolder.setVisible(false);
       
        VHNotificationsTabControl controller = new VHNotificationsTabControl(_notificationTabFolder);      
        TabItem tab = new TabItem(_notificationTabFolder, SWT.NONE);
View Full Code Here

    public static TabFolder generateMBeanTabFolder(final Composite parent, final JMXManagedObject mbean, final MBeanServerConnection mbsc)
    {
        TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
        FormData layoutData = new FormData();
        layoutData.left = new FormAttachment(0);
        layoutData.top = new FormAttachment(0);
        layoutData.right = new FormAttachment(100);
        layoutData.bottom = new FormAttachment(100);
        tabFolder.setLayoutData(layoutData);

        TabItem tab;
        TabControl controller;
        QpidMBeanType mbeanType = QpidMBeanType.get(mbean.getType());
View Full Code Here

     */
    public static TabFolder generateMBeanTypeTabFolder(final Composite parent, ManagedServer server, String virtualHost)
    {
        TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
        FormData layoutData = new FormData();
        layoutData.left = new FormAttachment(0);
        layoutData.top = new FormAttachment(0);
        layoutData.right = new FormAttachment(100);
        layoutData.bottom = new FormAttachment(100);
        tabFolder.setLayoutData(layoutData);

       
        TabItem tab;
        TabControl controller;
View Full Code Here

     */
    public static TabFolder generateConnectionTypeTabFolder(final Composite parent, ManagedServer server, String virtualHost)
    {
        TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
        FormData layoutData = new FormData();
        layoutData.left = new FormAttachment(0);
        layoutData.top = new FormAttachment(0);
        layoutData.right = new FormAttachment(100);
        layoutData.bottom = new FormAttachment(100);
        tabFolder.setLayoutData(layoutData);

        TabItem tab;
        TabControl controller;
             
View Full Code Here

     */
    public static TabFolder generateExchangeTypeTabFolder(final Composite parent, ManagedServer server, String virtualHost)
    {
        TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
        FormData layoutData = new FormData();
        layoutData.left = new FormAttachment(0);
        layoutData.top = new FormAttachment(0);
        layoutData.right = new FormAttachment(100);
        layoutData.bottom = new FormAttachment(100);
        tabFolder.setLayoutData(layoutData);

        TabItem tab;
        TabControl controller;

View Full Code Here

     */
    public static TabFolder generateQueueTypeTabFolder(final Composite parent, ManagedServer server, String virtualHost)
    {
        TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
        FormData layoutData = new FormData();
        layoutData.left = new FormAttachment(0);
        layoutData.top = new FormAttachment(0);
        layoutData.right = new FormAttachment(100);
        layoutData.bottom = new FormAttachment(100);
        tabFolder.setLayoutData(layoutData);

        TabItem tab;
        TabControl controller;
       
View Full Code Here

    this.setSize(400, 800);

    documentSource = new Text(this, SWT.SINGLE | SWT.BORDER);
    FormData fdata1 = new FormData();
    fdata1.width = 200;
    fdata1.left = new FormAttachment(0, 1000, 5);
    fdata1.top = new FormAttachment(0, 1000, 5);
    fdata1.right = new FormAttachment(1000, 1000, -5);
    documentSource.setLayoutData(fdata1);
    documentSource.setToolTipText("Document source folder...");
    documentSource.setMessage("Document source folder...");
    DropTarget dt = new DropTarget(documentSource, DND.DROP_DEFAULT | DND.DROP_MOVE);
    dt.setTransfer(new Transfer[] { FileTransfer.getInstance() });
    dt.addDropListener(new DropTargetAdapter() {
      @Override
      public void drop(DropTargetEvent event) {
        String fileList[] = null;
        FileTransfer ft = FileTransfer.getInstance();
        if (ft.isSupportedType(event.currentDataType)) {
          fileList = (String[]) event.data;
        }
        if (fileList != null && fileList.length > 0) {
          String fileString = fileList[0];
          documentSource.setText(fileString);
        }
      }
    });

    documentSink = new Text(this, SWT.SINGLE | SWT.BORDER);
    FormData fdatag = new FormData();
    fdatag.width = 200;
    fdatag.left = new FormAttachment(0, 1000, 5);
    fdatag.top = new FormAttachment(0, 1000, 30);
    fdatag.right = new FormAttachment(1000, 1000, -5);
    documentSink.setLayoutData(fdatag);
    documentSink.setToolTipText("Document gold output folder...");
    documentSink.setMessage("Document gold output folder...");
    DropTarget dtg = new DropTarget(documentSink, DND.DROP_DEFAULT | DND.DROP_MOVE);
    dtg.setTransfer(new Transfer[] { FileTransfer.getInstance() });
    dtg.addDropListener(new DropTargetAdapter() {
      @Override
      public void drop(DropTargetEvent event) {
        String fileList[] = null;
        FileTransfer ft = FileTransfer.getInstance();
        if (ft.isSupportedType(event.currentDataType)) {
          fileList = (String[]) event.data;
        }
        if (fileList != null && fileList.length > 0) {
          String fileString = fileList[0];
          documentSink.setText(fileString);
        }
      }
    });

    typeSystem = new Text(this, SWT.SINGLE | SWT.BORDER);
    FormData fdata2 = new FormData();
    fdata2.width = 200;
    fdata2.left = new FormAttachment(0, 1000, 5);
    fdata2.top = new FormAttachment(0, 1000, 55);
    fdata2.right = new FormAttachment(1000, 1000, -5);
    typeSystem.setLayoutData(fdata2);
    typeSystem.setToolTipText("Type System...");
    typeSystem.setMessage("Type System...");
    DropTarget dt1 = new DropTarget(typeSystem, DND.DROP_DEFAULT | DND.DROP_MOVE);
    dt1.setTransfer(new Transfer[] { FileTransfer.getInstance() });
    dt1.addDropListener(new DropTargetAdapter() {
      @Override
      public void drop(DropTargetEvent event) {
        String fileList[] = null;
        FileTransfer ft = FileTransfer.getInstance();
        if (ft.isSupportedType(event.currentDataType)) {
          fileList = (String[]) event.data;
        }
        if (fileList != null && fileList.length > 0) {
          String fileString = fileList[0];
          typeSystem.setText(fileString);
        }
      }
    });

    FormData fdata3 = new FormData();
    fdata3.left = new FormAttachment(0, 1000, 3);
    fdata3.top = new FormAttachment(0, 1000, 81);
    fdata3.right = new FormAttachment(1000, 1000, -3);
    fdata3.bottom = new FormAttachment(1000, 1000, -3);
    Composite comp = new Composite(this, SWT.CENTER);
    comp.setLayoutData(fdata3);
    comp.setLayout(new FillLayout());
    treeView = new TreeViewer(comp, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
View Full Code Here

    super(c);
    iconPath = UXIconsUtil.getInstance().get16IconSetPath() + File.separator;
   
    treeWidget = new Tree(container, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    FormData data = new FormData();
    data.top = new FormAttachment(0);
    data.right = new FormAttachment(100);
    data.bottom = new FormAttachment(100);
    data.left = new FormAttachment(0);
    treeWidget.setLayoutData(data);
   
    this.buildContextMenu(menuOpts);
  }
View Full Code Here

TOP

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

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.