Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.TableViewer


        _table.setLayoutData(tblLayoutData)
       
       
        createColumns();
       
        _tableViewer = new TableViewer(_table);
       
        _cellModifier = new BeanListTableModelCellModifier(_tableViewer, _model);
        _tableViewer.setCellModifier(_cellModifier);
       
        _tableViewer.setContentProvider(new BeanListTableModelContentProvider());
View Full Code Here


   


    @Override
    public void createPartControl(Composite parent) {       
        _table = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);     
        _table.setContentProvider(new RuntimeViewContentProvider());      
        _table.setLabelProvider(new RuntimeViewLabelProvider());
        _table.setSorter(new NameSorter());
        _table.setInput(WGADesignerPlugin.getAllRuntimes());
       
View Full Code Here

        layout.numColumns = 1;
        _container.setLayout(layout);
       
        _lblHeader = new Label(_container, SWT.NONE);
       
        _tblRuntimes = new TableViewer(_container);
        _tblRuntimes.setLabelProvider(new RuntimeLabelProvider());
        _tblRuntimes.setContentProvider(new RuntimeContentProvider());
       
        GridData gd = new GridData(GridData.FILL_BOTH);
        _tblRuntimes.getTable().setLayoutData(gd);
View Full Code Here

        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
        gd.horizontalSpan = 2;
        label.setLayoutData(gd);
      
       
        _tblDatabaseServers = new TableViewer(container);
        _tblDatabaseServers.setLabelProvider(new DBServerLabelProvider());
        _tblDatabaseServers.setContentProvider(new DBServerContentProvider());
        _tblDatabaseServers.setInput(_config);

        _tblDatabaseServers.addSelectionChangedListener(this);
View Full Code Here

        layout.numColumns = 1;
        _container.setLayout(layout);
       
        _lblHeader = new Label(_container, SWT.NONE);
       
        _tblWebApplications = new TableViewer(_container);
        _tblWebApplications.setLabelProvider(new WebApplicationsLabelProvider());
        _tblWebApplications.setContentProvider(new WebApplicationsContentProvider());
       
        GridData gd = new GridData(GridData.FILL_BOTH);
        _tblWebApplications.getTable().setLayoutData(gd);
View Full Code Here

        _model.fireModelChanged();       
      }
         
        });
       
        _tblViewerACLRoles = new TableViewer(_tblACLRoles);
       
        CellEditor[] editors = new CellEditor[2];
        editors[0] = new TextCellEditor(_tblACLRoles);       
        editors[1] = new CheckboxCellEditor(_tblACLRoles);
        _tblViewerACLRoles.setCellEditors(editors);
View Full Code Here

          _model.fireModelChanged();       
        }
           
          });
         
          _tblViewerPluginDependencies = new TableViewer(_tblDependencies);
         
          // text editors for both columns
          CellEditor[] editors = new CellEditor[2];
          editors[0] = new TextCellEditor(_tblDependencies);
          editors[1] = new TextCellEditor(_tblDependencies);         
View Full Code Here

        _model.fireModelChanged();       
      }
         
        });
       
        _tblViewerShortcuts = new TableViewer(_tblShortcuts);
             
        List<String> shortcutTypes = new ArrayList<String>();
        Iterator<ShortcutType> it = WGADesignConfigurationModel.SHORTCUTTYPES.values().iterator();
        _shortcutTypesByIndex = new HashMap<Integer, ShortcutType>();
        int i = 0;
View Full Code Here

        _model.fireModelChanged();       
      }
         
        });
       
        _tblViewerMediaKeys = new TableViewer(_tblMediaKeys);
       
        CellEditor[] editors = new CellEditor[4];
        editors[0] = new TextCellEditor(_tblMediaKeys);
        editors[1] = new TextCellEditor(_tblMediaKeys);
        editors[2] = new CheckboxCellEditor(_tblMediaKeys, SWT.CENTER);       
        editors[3] = new CheckboxCellEditor(_tblMediaKeys, SWT.CENTER);
        _tblViewerMediaKeys.setCellEditors(editors);
       
        BeanListTableModelCellModifier modifier = new BeanListTableModelCellModifier(_tblViewerMediaKeys, _mediaKeysModel);
        modifier.setEditMode(2, BeanListTableModelCellModifier.EDIT_MODE_ON_SINGLE_CLICK);
        modifier.setEditMode(3, BeanListTableModelCellModifier.EDIT_MODE_ON_SINGLE_CLICK);
        _tblViewerMediaKeys.setCellModifier(modifier);
       
        _tblViewerMediaKeys.setContentProvider(new BeanListTableModelContentProvider());
        _tblViewerMediaKeys.setLabelProvider(new BeanListTableModelLabelProvider(_mediaKeysModel));
        _tblViewerMediaKeys.setInput(_mediaKeysModel)
       

        _btnAddMediaKey = toolkit.createButton(sectionClient, "add", SWT.PUSH);
        _btnAddMediaKey.setLayoutData(btnLayout);
        _btnAddMediaKey.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleAddMediaKey();
      }

    });
       
        _btnRemoveMediaKey = toolkit.createButton(sectionClient, "remove", SWT.PUSH);
        _btnRemoveMediaKey.setLayoutData(btnLayout);
        _btnRemoveMediaKey.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleRemoveMediaKey();
      }
    });
       
    // encoder section
    section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.COMPACT);
    section.setText("Encoder Mappings");

        sectionClient = toolkit.createComposite(section);
        sectionClient.setLayout(sectionLayout);
        section.setClient(sectionClient);
       
        // create Table encoder mappings
        _tblEncoderMappings = toolkit.createTable(sectionClient, SWT.BORDER|SWT.FULL_SELECTION);
        _tblEncoderMappings.setHeaderVisible(true);                 
        _tblEncoderMappings.setLayoutData(GridDataFactory.copyData(tblLayoutData));   
        registerField("encoderMappings", _tblEncoderMappings);
         
        _encoderNameColumn = new TableColumn(_tblEncoderMappings, SWT.NONE)
        _encoderNameColumn.setText("Encoder name");
        _encoderNameColumn.setWidth((int)(tableWidth * 0.5));
       
        _encoderImplClassColumn = new TableColumn(_tblEncoderMappings, SWT.NONE);
        _encoderImplClassColumn.setText("Implementation class");
        _encoderImplClassColumn.setWidth((int)(tableWidth * 0.5));         

        _encoderMappingsModel = new EncoderMappingsModel(_model.getEncoderMappings());
        _encoderMappingsModel.addListener(new BeanListTableModelListener() {

      public void add(Object bean) {
        _model.fireModelChanged();         
      }

      public void remove(Object bean) {
        _model.fireModelChanged();       
      }

      public void update(Object bean) {
        _model.fireModelChanged();         
      }     

      @SuppressWarnings("unchecked")
      public void refresh(List beans) {
        _model.fireModelChanged();       
      }
         
        });
       
        _tblViewerEncoderMappings = new TableViewer(_tblEncoderMappings);
       
        // text editors for both columns
        editors = new CellEditor[2];
        editors[0] = new TextCellEditor(_tblEncoderMappings);
        editors[1] = new TextCellEditor(_tblEncoderMappings);         
        _tblViewerEncoderMappings.setCellEditors(editors);
       
        _tblViewerEncoderMappings.setCellModifier(new BeanListTableModelCellModifier(_tblViewerEncoderMappings, _encoderMappingsModel));                                       
        _tblViewerEncoderMappings.setContentProvider(new BeanListTableModelContentProvider());
        _tblViewerEncoderMappings.setLabelProvider(new BeanListTableModelLabelProvider(_encoderMappingsModel));
        _tblViewerEncoderMappings.setInput(_encoderMappingsModel)
       
        _btnAddEncoderMapping = toolkit.createButton(sectionClient, "add", SWT.PUSH);
        _btnAddEncoderMapping.setLayoutData(btnLayout);
        _btnAddEncoderMapping.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleAddEncoderMapping();
      }

    });
       
        _btnRemoveEncoderMapping = toolkit.createButton(sectionClient, "remove", SWT.PUSH);
        _btnRemoveEncoderMapping.setLayoutData(btnLayout);
      _btnRemoveEncoderMapping.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleRemoveEncoderMapping();
      }
    });

     
      // element section
    section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.COMPACT);
    section.setText("Element Mappings");

        sectionClient = toolkit.createComposite(section);
        section.setClient(sectionClient);     
        sectionLayout.numColumns = 2;
        sectionClient.setLayout(sectionLayout);   
       
        // create Table element mappings
        _tblElementMappings = toolkit.createTable(sectionClient, SWT.BORDER|SWT.FULL_SELECTION);
        _tblElementMappings.setHeaderVisible(true);         
        _tblElementMappings.setLayoutData(GridDataFactory.copyData(tblLayoutData))
        registerField("elementMappings", _tblElementMappings);
               
        _elementNameColumn = new TableColumn(_tblElementMappings, SWT.NONE)
        _elementNameColumn.setText("Element name");
        _elementNameColumn.setWidth((int)(tableWidth * 0.5));
       
        _elementImplClassColumn = new TableColumn(_tblElementMappings, SWT.NONE);
        _elementImplClassColumn.setText("Implementation class");
        _elementImplClassColumn.setWidth((int)(tableWidth * 0.5));         

        _elementMappingsModel = new ElementMappingsModel(_model.getElementMappings());
        _elementMappingsModel.addListener(new BeanListTableModelListener() {

      public void add(Object bean) {
        _model.fireModelChanged();         
      }

      public void remove(Object bean) {
        _model.fireModelChanged();       
      }

      public void update(Object bean) {
        _model.fireModelChanged();         
      }
     
      @SuppressWarnings("unchecked")
      public void refresh(List beans) {
        _model.fireModelChanged();       
      }
         
        });
       
        _tblViewerElementMappings = new TableViewer(_tblElementMappings);
       
        // text editors for both columns
        editors = new CellEditor[2];
        editors[0] = new TextCellEditor(_tblElementMappings);
        editors[1] = new TextCellEditor(_tblElementMappings);         
View Full Code Here

        _model.fireModelChanged();       
      }
         
        });
       
        _tblViewerRemoteActions = new TableViewer(_tblRemoteActions);
             
        List<String> accessLevelValues = new ArrayList<String>();
        List<AccessLevel> sortedAccessLevels = new ArrayList<AccessLevel>(WGADesignConfigurationModel.ACCESSLEVELS_REMOTE_ACTIONS.values());
        Collections.sort(sortedAccessLevels, new Comparator<AccessLevel>() {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.TableViewer

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.