Examples of TableWrapData


Examples of org.eclipse.ui.forms.widgets.TableWrapData

    Composite body = managedForm.getForm().getBody();
    body.setLayout(FormLayoutFactory.createFormTableWrapLayout(true, 2));

    Composite left = toolkit.createComposite(body);
    left.setLayout(FormLayoutFactory.createFormPaneTableWrapLayout(false, 1));
    left.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

    Section section = Parts.createStaticSection(toolkit, left, "Folders");

    Composite container = toolkit.createComposite(section, SWT.NONE);
    container.setLayout(FormLayoutFactory.createSectionClientTableWrapLayout(false, 2));
    TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
    container.setLayoutData(data);

    _tabvFolder = new ValuedInstanceTableViewer(container, SWT.SINGLE | SWT.FULL_SELECTION, _inpFd);

    TableWrapData data_tabv = new TableWrapData(TableWrapData.FILL_GRAB);
    data_tabv.grabVertical = true;
    data_tabv.heightHint = 400;
    _tabvFolder.getTable().setLayoutData(data_tabv);

    _tabvFolder.addModifyListener(new ModifyListener()
      {
        @Override
        public void modifyText(ModifyEvent e)
          {
          setDirty(true);
          }
      });

    _tabvFolder.addSelectionChangedListener(new ISelectionChangedListener()
      {
        @Override
        public void selectionChanged(SelectionChangedEvent event)
          {
          // Display the cards of the folder, when it is selected
          ISelection selection = _tabvFolder.getSelection();
          if ((_tabvCard != null) && !selection.isEmpty())
            {
            Object obj = ((IStructuredSelection) selection).getFirstElement();

            Folder f = (Folder) obj;

            //  System.out.println("Selection Changed on _tabvFolder : " + f.getID());

            _tabvCard.setInput(f.getLstCard());

            _tabvCard.refresh();
            }
          }
      });

    Composite containerBtn = toolkit.createComposite(container, SWT.NONE);
    containerBtn.setLayout(FormLayoutFactory.createClearGridLayout(true, 1));

    /* Button btnAdd = */toolkit.createGridButton(containerBtn, "Add", new SelectionAdapter()
      {
        /**
         * Add Folder Callback
         */
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          // Create a new folder
          _inpFdn.create();

          setDirty(true);

          _tabvFolder.refresh();
          }
      });

    /* Button btnRem = */toolkit.createGridButton(containerBtn, "Delete", new SelectionAdapter()
      {
        /**
         * Remove Folder Callback
         */
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvFolder.getSelection();
          if (!selection.isEmpty())
            {
            Object obj = ((IStructuredSelection) selection).getFirstElement();

            Folder f = (Folder) obj;

            _inpFdn.remove(f);

            setDirty(true);

            _tabvFolder.refresh();
            }
          }
      });

    Button btnBrwCard = toolkit.createGridButton(containerBtn, "Browse", new SelectionAdapter()
      {
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvFolder.getSelection();
          if (!selection.isEmpty())
            {
            Folder f = (Folder) ((IStructuredSelection) selection).getFirstElement();

            HIDB2Toolkit.BrowseCard(_tabvCard.getControl().getShell(), f);
            }
          }
      });

    /* Button btnCheckCard = */toolkit.createGridButton(containerBtn, "Check", new SelectionAdapter()
      {
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvFolder.getSelection();
          if (!selection.isEmpty())
            {
            Folder f = (Folder) ((IStructuredSelection) selection).getFirstElement();

            HIDB2Toolkit.checkFiles(_tabvCard.getControl().getShell(), f);
            }
          }
      });

    // Check all images attributs of a folder with regard to the files of a directory
    /* Button btnCheckCardDir = */toolkit.createGridButton(containerBtn, "Check Dir", new SelectionAdapter()
      {
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvFolder.getSelection();
          if (!selection.isEmpty())
            {
            Folder f = (Folder) ((IStructuredSelection) selection).getFirstElement();

            int res = HIDB2Toolkit.checkCardDir(_tabvCard.getControl().getShell(), f);
           
            if (res != C_ERROR)
              {
              setDirty(true);

              _tabvFolder.refresh();

              // Refresh the card table viewer too
              _tabvCard.refresh();
              }
            }
          }
      });

   
    // Implement mass card import
    /* Button btnMassImport = */toolkit.createGridButton(containerBtn, "Import", new SelectionAdapter()
      {
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvFolder.getSelection();
          if (!selection.isEmpty())
            {
            Folder f = (Folder) ((IStructuredSelection) selection).getFirstElement();

            int res = HIDB2Toolkit.massImport(_tabvFolder.getControl().getShell(), f);

            if (res != C_ERROR)
              {
              setDirty(true);

              _tabvFolder.refresh();

              // Refresh the card table viewer too
              _tabvCard.refresh();
              }
            }
          }
      });

    _tabvFolder.createMMI();

    section.setClient(container);

    // Create the card section, if the description has any card description
    if (_inpFd.getAttributList().isEmpty())
      {
      _tabvCard = null;
      btnBrwCard.setEnabled(false);
      }
    else
      {
      Composite right = toolkit.createComposite(body);
      right.setLayout(FormLayoutFactory.createFormPaneTableWrapLayout(false, 1));
      right.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

      Section sectionR = Parts.createStaticSection(toolkit, right, "Cards");

      Composite containerR = toolkit.createComposite(sectionR, SWT.NONE);
      containerR.setLayout(FormLayoutFactory.createSectionClientTableWrapLayout(false, 2));
      TableWrapData dataR = new TableWrapData(TableWrapData.FILL_GRAB);
      container.setLayoutData(dataR);

      // Create Card table
      _tabvCard = new ValuedInstanceTableViewer(containerR, SWT.SINGLE | SWT.FULL_SELECTION, _inpFd
          .getCardDescription());

      TableWrapData data_tabv2 = new TableWrapData(TableWrapData.FILL_GRAB);
      data_tabv2.grabVertical = true;
      data_tabv2.heightHint = 400;
      _tabvCard.getTable().setLayoutData(data_tabv2);

      _tabvCard.addModifyListener(new ModifyListener()
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.TableWrapData

  public AttributTableViewer(Composite parent)
    {
    super(parent, SWT.SINGLE | SWT.FULL_SELECTION);

    TableWrapData data_tabv = new TableWrapData(TableWrapData.FILL_GRAB);
    data_tabv.grabVertical = true;
    data_tabv.heightHint = 30 + 100 + 100 + T_TypeEnum.defaultColumnWidth + 40;
    getTable().setLayoutData(data_tabv);

    addROAttribut("DisplayOrder", T_Integer, "No", 30);
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.TableWrapData

    Composite body = managedForm.getForm().getBody();
    body.setLayout(FormLayoutFactory.createFormTableWrapLayout(true, 2));

    Composite left = toolkit.createComposite(body);
    left.setLayout(FormLayoutFactory.createFormPaneTableWrapLayout(false, 1));
    left.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

    Section section = Parts.createStaticSection(toolkit, left, "Datapaths");

    Composite container = toolkit.createComposite(section, SWT.NONE);
    container.setLayout(FormLayoutFactory.createSectionClientTableWrapLayout(false, 2));
    TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
    container.setLayoutData(data);

    _tabvDp = new PoserTableViewer(container, SWT.SINGLE | SWT.FULL_SELECTION);

    TableWrapData data_tabv = new TableWrapData(TableWrapData.FILL_GRAB);
    data_tabv.grabVertical = true;
    data_tabv.heightHint = 100 + 100 + 200;
    _tabvDp.getTable().setLayoutData(data_tabv);

    _tabvDp.addAttribut("Name", T_String, "Name", 100);
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.TableWrapData

    _edPart.toolkit.adapt(_lab, false, false);

    _lab.setText(_al.getAttr().getName() + " :");

    TableWrapData twd = new TableWrapData(TableWrapData.FILL_GRAB);

    _lab.setLayoutData(twd);
    }
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.TableWrapData

        }

      if (_wid != null)
        {
        toolkit.adapt(_wid, true, true);
        _wid.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
        }
      }

    return _wid;
    }
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.TableWrapData

    SashForm sashF = new SashForm(body, SWT.HORIZONTAL);

    Composite left = toolkit.createComposite(sashF);
    left.setLayout(FormLayoutFactory.createFormPaneTableWrapLayout(false, 1));
    left.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

    // Get Folder Layout description
    _adLayout = Application.getDataStore().readLayout(_inpFd);

    // Create the Folder composite
    createFolderComp(left);

    Composite right = toolkit.createComposite(sashF);
    right.setLayout(FormLayoutFactory.createFormPaneTableWrapLayout(false, 1));
    right.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

    // Get Card Layout description
    _cdLayout = Application.getDataStore().readLayout(_inpFd.getCardDescription());

    // Create the Card composite
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.TableWrapData

    _fdPage = new PojoPageEditor(this, parent, _adLayout);

    // Add Management buttons
    Group btnGrp = new Group(parent, SWT.NONE);
    toolkit.adapt(btnGrp);
    btnGrp.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

    btnGrp.setLayout(FormLayoutFactory.createClearGridLayout(true, 3));

    Button btnAddCard = toolkit.createButton(btnGrp, "Add", SWT.PUSH);
    GridData gdb1 = new GridData(SWT.FILL, SWT.FILL, true, true);
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.TableWrapData

    // Add Management (Prev/Next) buttons
    _cardBtnGrp = new Group(parent, SWT.NONE);
    toolkit.adapt(_cardBtnGrp);
    _cardBtnGrp.setLayout(FormLayoutFactory.createClearGridLayout(true, 4));
    _cardBtnGrp.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

    Label l = toolkit.createLabel(_cardBtnGrp, "First");
    GridData gdb = new GridData(SWT.CENTER, SWT.FILL, true, true);
    l.setLayoutData(gdb);
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.TableWrapData

    Composite body = managedForm.getForm().getBody();
    body.setLayout(FormLayoutFactory.createFormTableWrapLayout(true, 1));

    Composite left = toolkit.createComposite(body);
    left.setLayout(FormLayoutFactory.createFormPaneTableWrapLayout(false, 1));
    left.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

    Section section = Parts.createStaticSection(toolkit, left, "Items");

    Composite container = toolkit.createComposite(section, SWT.NONE);

    container.setLayout(FormLayoutFactory.createSectionClientTableWrapLayout(false, 2));
    TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
    container.setLayoutData(data);

    _tabvItem = new ValuedInstanceTableViewer(container, SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE | SWT.FULL_SELECTION,
        _inpFd);

    TableWrapData data_tabv = new TableWrapData(TableWrapData.FILL);
    data_tabv.grabVertical = true;
    data_tabv.heightHint = 300;
    data_tabv.grabHorizontal = true;
    _tabvItem.setLayoutData(data_tabv);
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.TableWrapData

    return customComposite;
  } // createCustomizationSection

  private Table createCustomizationTable(Composite parent, FormToolkit toolkit) {
    Composite tableComposite = toolkit.createComposite(parent, SWT.NONE);
    TableWrapData td = new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.FILL_GRAB);
    td.grabHorizontal = true;
    td.valign = TableWrapData.FILL;
    tableComposite.setLayoutData(td);
   
    GridLayout glayout = new GridLayout();
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.