Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.TableColumn


  }

  private void createColumns() {
    _columns = new TableColumn[_columnNames.length];
    for (int i=0; i < _columnNames.length; i++) {
      TableColumn column = new TableColumn(_table, SWT.NONE);
      column.setText(_columnNames[i]);
      _columns[i] = column;
    }
  }
View Full Code Here


    GridData tblLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);

    _table = new Table(composite, SWT.FULL_SELECTION | SWT.BORDER );
    _table.setHeaderVisible(true);
   
    TableColumn column1 = new TableColumn(_table, SWT.FILL);
    column1.setText("Name");
    TableColumn column2 = new TableColumn(_table, SWT.FILL);
    column2.setText("URL");
    TableColumn column3 = new TableColumn(_table, SWT.FILL);
    column3.setText("Status");
   
    _table.setLayoutData(tblLayoutData);
    _table.setBackground(bg);
    _table.setEnabled(true);
View Full Code Here

  GridData data = new GridData(GridData.FILL_HORIZONTAL);
  data.heightHint = 200;
  pluginList.setLayoutData(data);
 
 
  TableColumn tcName = new TableColumn(pluginList,SWT.LEFT);
  Messages.setLanguageText(tcName,"installPluginsWizard.list.name");
  tcName.setWidth(200);
 
  TableColumn tcVersion = new TableColumn(pluginList,SWT.LEFT);
  Messages.setLanguageText(tcVersion,"installPluginsWizard.list.version");
  tcVersion.setWidth(150);

    PluginInterface plugins[] = new PluginInterface[0];
    try {
      plugins = core.getPluginManager().getPluginInterfaces();
     
View Full Code Here

        tblLayoutData.verticalSpan = 2;
        tblLayoutData.minimumHeight = 200;
        _tblACLRoles.setLayoutData(tblLayoutData);              
       
        int tableWidth = 450;         
        _roleNameColumn = new TableColumn(_tblACLRoles, SWT.NONE)
        _roleNameColumn.setText("Role name");
        _roleNameColumn.setWidth((int)(tableWidth * 0.5));
       
        _assignDefaultManagerColumn = new TableColumn(_tblACLRoles, SWT.NONE);
        _assignDefaultManagerColumn.setText("Assign to default manager");
        _assignDefaultManagerColumn.setWidth((int)(tableWidth * 0.5));         

        _aclRolesModel = new ACLRolesModel(_model.getACLRoles());
        _aclRolesModel.addListener(new BeanListTableModelListener() {
View Full Code Here

          tblLayoutData.minimumHeight = 200;
          _tblDependencies.setLayoutData(tblLayoutData);  
          registerField("pluginDependencies", _tblDependencies);
         
          int tableWidth = 450;         
          _uniqueNameColumn = new TableColumn(_tblDependencies, SWT.NONE)
          _uniqueNameColumn.setText("Plugin unique name");
          _uniqueNameColumn.setWidth((int)(tableWidth * 0.8));
         
          _minVersionColumn = new TableColumn(_tblDependencies, SWT.NONE);
          _minVersionColumn.setText("Minimum version");
          _minVersionColumn.setWidth((int)(tableWidth * 0.2));         

          _pluginDependenciesModel = new PluginDependenciesModel(_model.getPluginDependencies());
          _pluginDependenciesModel.addListener(new BeanListTableModelListener() {
View Full Code Here

        tblLayoutData.minimumHeight = 200;
        _tblShortcuts.setLayoutData(tblLayoutData);     
        registerField("shortcuts", _tblShortcuts);
       
        int tableWidth = 700;         
        _nameColumn = new TableColumn(_tblShortcuts, SWT.NONE)
        _nameColumn.setText("Shortcut");
        _nameColumn.setWidth((int)(tableWidth * 0.3));
       
        _typeColumn = new TableColumn(_tblShortcuts, SWT.NONE);
        _typeColumn.setText("Type");
        _typeColumn.setWidth((int)(tableWidth * 0.3));         

        _referenceColumn = new TableColumn(_tblShortcuts, SWT.NONE);
      _referenceColumn.setText("Reference");
      _referenceColumn.setWidth((int)(tableWidth * 0.3));

       
       
View Full Code Here

        _tblMediaKeys = toolkit.createTable(sectionClient, SWT.BORDER|SWT.FULL_SELECTION);
        _tblMediaKeys.setHeaderVisible(true);         
        _tblMediaKeys.setLayoutData(GridDataFactory.copyData(tblLayoutData));  
        registerField("mediaKeys", _tblMediaKeys);
               
        _mediaKeyColumn = new TableColumn(_tblMediaKeys, SWT.NONE);               
        _mediaKeyColumn.setText("Key");
        _mediaKeyColumn.setWidth((int)(tableWidth * 0.25));
       
        _mediaMimeTypeColumn = new TableColumn(_tblMediaKeys, SWT.NONE)
        _mediaMimeTypeColumn.setText("Mime type");
        _mediaMimeTypeColumn.setWidth((int)(tableWidth * 0.25));
       
        _mediaBinaryColumn = new TableColumn(_tblMediaKeys, SWT.NONE)
        _mediaBinaryColumn.setText("Binary output");
        _mediaBinaryColumn.setWidth((int)(tableWidth * 0.25));

       
        _mediaHTTPLoginColumn = new TableColumn(_tblMediaKeys, SWT.NONE)
        _mediaHTTPLoginColumn.setText("Use HTTP login");
        _mediaHTTPLoginColumn.setWidth((int)(tableWidth * 0.25));

        _mediaKeysModel = new MediaKeysModel(_model.getMediaKeys());
        _mediaKeysModel.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();       
      }
         
        });
       
        _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() {
View Full Code Here

        tblLayoutData.minimumHeight = 200;
        _tblRemoteActions.setLayoutData(tblLayoutData);     
        registerField("remoteActions", _tblRemoteActions);
       
        int tableWidth = 450;         
        _actionModuleColumn = new TableColumn(_tblRemoteActions, SWT.NONE)
        _actionModuleColumn.setText("Action module");
        _actionModuleColumn.setWidth((int)(tableWidth * 0.3));
       
        _minAccessLevelColumn = new TableColumn(_tblRemoteActions, SWT.NONE);
        _minAccessLevelColumn.setText("Minimum access level");
        _minAccessLevelColumn.setWidth((int)(tableWidth * 0.3));         

        _callersColumn = new TableColumn(_tblRemoteActions, SWT.NONE);
      _callersColumn.setText("Callers (comma separated)");
      _callersColumn.setWidth((int)(tableWidth * 0.3));
       
        _remoteActionsModel = new RemoteActionsModel(_model.getRemoteActions());
        _remoteActionsModel.addListener(new BeanListTableModelListener() {
View Full Code Here

        tblLayoutData.minimumHeight = 200;
        _tblRemoteActions.setLayoutData(tblLayoutData);     
        registerField("remoteActions", _tblRemoteActions);
       
        int tableWidth = 450;         
        _actionModuleColumn = new TableColumn(_tblRemoteActions, SWT.NONE)
        _actionModuleColumn.setText("Action module");
        _actionModuleColumn.setWidth((int)(tableWidth * 0.3));
       
        _minAccessLevelColumn = new TableColumn(_tblRemoteActions, SWT.NONE);
        _minAccessLevelColumn.setText("Minimum access level");
        _minAccessLevelColumn.setWidth((int)(tableWidth * 0.3));         

        _callersColumn = new TableColumn(_tblRemoteActions, SWT.NONE);
      _callersColumn.setText("Callers (comma separated)");
      _callersColumn.setWidth((int)(tableWidth * 0.3));
       
        _remoteActionsModel = new RemoteActionsModel(_model.getRemoteActions());
        _remoteActionsModel.addListener(new BeanListTableModelListener() {
View Full Code Here

        tblLayoutData.minimumHeight = 200;
        _tblJobDefinitions.setLayoutData(tblLayoutData);     
        registerField("jobDefinitions", _tblJobDefinitions);
       
        int tableWidth = 700;         
        _jobNameColumn = new TableColumn(_tblJobDefinitions, SWT.NONE)
        _jobNameColumn.setText("Name");
        _jobNameColumn.setWidth((int)(tableWidth * 0.2));
       
        _jobTypeColumn = new TableColumn(_tblJobDefinitions, SWT.NONE);
        _jobTypeColumn.setText("Type");
        _jobTypeColumn.setWidth((int)(tableWidth * 0.2));         

        _jobResourceColumn = new TableColumn(_tblJobDefinitions, SWT.NONE);
      _jobResourceColumn.setText("Resource");
      _jobResourceColumn.setWidth((int)(tableWidth * 0.2));
     
        _jobDescriptionColumn = new TableColumn(_tblJobDefinitions, SWT.NONE);
        _jobDescriptionColumn.setText("Description");
        _jobDescriptionColumn.setWidth((int)(tableWidth * 0.2));
       
        _jobScheduleColumn = new TableColumn(_tblJobDefinitions, SWT.NONE);
        _jobScheduleColumn.setText("CRON schedule");
        _jobScheduleColumn.setWidth((int)(tableWidth * 0.2));
       
       
        _jobDefinitionsModel = new JobDefinitionsModel(_model.getJobDefinitions());
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.TableColumn

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.