Package org.eclipse.ui.forms.widgets

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


    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.createButton(containerBtn, "Add", SWT.PUSH);
    Button btnRem = toolkit.createButton(containerBtn, "Delete", SWT.PUSH);

    // Implement mass card import
    Button btnMassImport = toolkit.createButton(containerBtn, "Import", SWT.PUSH);

    _tabvFolder.createMMI();

    btnAdd.addSelectionListener(new SelectionAdapter()
      {
        /**
         * Add Folder Callback
         */
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          // Create a new folder
          _inpFdn.create();

          setDirty(true);

          _tabvFolder.refresh();
          }
      });

    btnRem.addSelectionListener(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();
            }
          }
      });

    // Create the Mass Import Dialog   
    btnMassImport.addSelectionListener(new SelectionAdapter()
      {
        @Override
        public void widgetSelected(SelectionEvent e)
          {
          ISelection selection = _tabvFolder.getSelection();
          if (!selection.isEmpty())
            {
            Folder f = (Folder) ((IStructuredSelection) selection).getFirstElement();

            // Open the mapping dialog

            Attribut a1 = null;
            for (Attribut a : _inpFd.getCardDescription().getAttributList())
              {
              if (a.getType() == AttrType.T_Image)
                {
                a1 = a;
                break;
                }
              }

            if (a1 != null)
              {
              DirectoryDialog dd = new DirectoryDialog(_tabvFolder.getControl().getShell());

              String fndir = dd.open();

              File fdir = new File(fndir);

              File[] tabMMFile = fdir.listFiles();

              CardImportMonitor op = new CardImportMonitor(f, a1, tabMMFile);

              try
                {
                new ProgressMonitorDialog(_tabvFolder.getControl().getShell()).run(true, false, op);
                }

              catch (InvocationTargetException e1)
                {
                e1.printStackTrace();
                }

              catch (InterruptedException e1)
                {
                e1.printStackTrace();
                }

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

                _tabvFolder.refresh();

                // Refresh the card table viewer too
                _tabvCard.refresh();
                }
              }
            else
              {
              MessageDialog.openError(_tabvFolder.getControl().getShell(), "Usage Error",
                  "No multimedia attribut in card description");
              }
            }
          }
      });

    section.setClient(container);

    // Create the card section, if the description has any card description
    if (_inpFd.getAttributList().isEmpty())
      {
      _tabvCard = null;
      }
    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

    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, "General Attributes");
    Composite container = Parts.createStaticSectionClient(toolkit, section);

    // Generates a NullPrt
    IActionBars actionBars = /*getPage().getEditor().*/getEditorSite().getActionBars();
    createNameEntry(container, toolkit, actionBars);
    createCmtEntry(container, toolkit, null);
    createIconIdxEntry(container, toolkit, null);
    createLabelIdxEntry(container, toolkit, null);

    section.setClient(container);

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

    Section sectionR = Parts.createStaticSection(toolkit, right, "Informations");
    Composite cnt2 = Parts.createStaticSectionClient(toolkit, sectionR);

    _fMainTable = new FormEntry(cnt2, toolkit, "Main Table", SWT.SINGLE);
View Full Code Here

    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, "Attributes");

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

    tabv = new AttributTableViewer(container);

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

        parent.setLayout( twl );
        FormToolkit toolkit = managedForm.getToolkit();

        Composite composite = toolkit.createComposite( parent );
        composite.setLayout( new GridLayout() );
        TableWrapData compositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP, 1, 2 );
        compositeTableWrapData.grabHorizontal = true;
        composite.setLayoutData( compositeTableWrapData );

        Composite leftComposite = toolkit.createComposite( parent );
        leftComposite.setLayout( new GridLayout() );
        TableWrapData leftCompositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
        leftCompositeTableWrapData.grabHorizontal = true;
        leftComposite.setLayoutData( leftCompositeTableWrapData );

        Composite rightComposite = toolkit.createComposite( parent );
        rightComposite.setLayout( new GridLayout() );
        TableWrapData rightCompositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
        rightCompositeTableWrapData.grabHorizontal = true;
        rightComposite.setLayoutData( rightCompositeTableWrapData );

        createProtocolsSection( composite, toolkit );
        createLimitsSection( leftComposite, toolkit );
View Full Code Here

        parent.setLayout( twl );
        FormToolkit toolkit = managedForm.getToolkit();

        Composite composite = toolkit.createComposite( parent );
        composite.setLayout( new GridLayout() );
        TableWrapData compositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP, 1, 2 );
        compositeTableWrapData.grabHorizontal = true;
        composite.setLayoutData( compositeTableWrapData );

        Composite leftComposite = toolkit.createComposite( parent );
        leftComposite.setLayout( new GridLayout() );
        TableWrapData leftCompositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
        leftCompositeTableWrapData.grabHorizontal = true;
        leftComposite.setLayoutData( leftCompositeTableWrapData );

        Composite rightComposite = toolkit.createComposite( parent );
        rightComposite.setLayout( new GridLayout() );
        TableWrapData rightCompositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
        rightCompositeTableWrapData.grabHorizontal = true;
        rightComposite.setLayoutData( rightCompositeTableWrapData );

        createProtocolsSection( composite, toolkit );
        createLimitsSection( leftComposite, toolkit );
View Full Code Here

        parent.setLayout( new TableWrapLayout() );
        FormToolkit toolkit = managedForm.getToolkit();

        Composite composite = toolkit.createComposite( parent );
        composite.setLayout( new GridLayout() );
        TableWrapData compositeTableWrapData = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
        compositeTableWrapData.grabHorizontal = true;
        composite.setLayoutData( compositeTableWrapData );

        createSupportedAuthenticationMechanismsSection( composite, toolkit );
        createSaslSettingsSection( composite, toolkit );
View Full Code Here

        // Creation of the section
        Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
        section.marginWidth = 4;
        section.setText( "Settings" );
        section.setDescription( "Set the settings of the server." );
        TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
        td.grabHorizontal = true;
        section.setLayoutData( td );
        Composite client = toolkit.createComposite( section );
        toolkit.paintBordersFor( client );
        GridLayout glayout = new GridLayout( 2, false );
View Full Code Here

        // Creation of the section
        Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
        section.marginWidth = 4;
        section.setText( "Limits" );
        section.setDescription( "Set the limits of the server." );
        TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
        td.grabHorizontal = true;
        section.setLayoutData( td );
        Composite client = toolkit.createComposite( section );
        toolkit.paintBordersFor( client );
        GridLayout glayout = new GridLayout( 2, false );
View Full Code Here

        // Creation of the section
        Section section = toolkit.createSection( parent, Section.DESCRIPTION | Section.TITLE_BAR );
        section.marginWidth = 4;
        section.setText( "Options" );
        section.setDescription( "Set the options of the server." );
        TableWrapData td = new TableWrapData( TableWrapData.FILL, TableWrapData.TOP );
        td.grabHorizontal = true;
        section.setLayoutData( td );
        Composite client = toolkit.createComposite( section );
        toolkit.paintBordersFor( client );
        GridLayout glayout = new GridLayout();
View Full Code Here

TOP

Related Classes of org.eclipse.ui.forms.widgets.TableWrapData

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.