Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.TabItem


       
        TabFolder headerTabFolder = new TabFolder (container, SWT.NONE);
        headerTabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
        for (String current : _headerFileMap.keySet()) {
            String titel = _headerFileMap.get(current).getTitle();
            TabItem tabItem = new TabItem (headerTabFolder, SWT.FILL);
            Composite tabItemContainer = new Composite(headerTabFolder, SWT.NONE);
            layout = new GridLayout();
            layout.numColumns = 1;
            layout.marginWidth = 0;
            layout.marginHeight = 0;
            layout.horizontalSpacing = 0;
            layout.verticalSpacing = 0;
            tabItemContainer.setLayout(layout);                      
            tabItem.setText (titel);
           
            Text headerTabText = new Text(tabItemContainer, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
            headerTabText.setData(current);
            headerTabText.setText(_headerFileMap.get(current).getDefaultHeader());      
           
            headerTabText.addModifyListener(new ModifyListener() {               
                public void modifyText(ModifyEvent e) {
                    if(e.getSource() instanceof Text){
                        Text source = (Text)e.getSource();
                        _headerFileMap.get((String)source.getData()).setDefaultHeader(source.getText());
                    }                 
                }
            });
           
            GridData codeLayout = new GridData(GridData.FILL_BOTH);
            codeLayout.minimumHeight = WidgetFactory.computeFontHeight(headerTabText) * 20;
            headerTabText.setLayoutData(codeLayout);
            _headerTabTextMap.put(current, headerTabText);
            tabItem.setControl (tabItemContainer);
        }     

        return container;
    }
View Full Code Here


        GridData tabFolderLayout = new GridData(GridData.FILL_BOTH);
        tabFolderLayout.horizontalSpan = 1;
        _headerTabFolder.setLayoutData(tabFolderLayout);
        for (String current : _headerFileMap.keySet()) {
            String titel = _headerFileMap.get(current).getTitle();
            TabItem tabItem = new TabItem(_headerTabFolder, SWT.FILL);
            Composite tabItemContainer = new Composite(_headerTabFolder, SWT.NONE);
            layout = new GridLayout();
            layout.numColumns = 1;
            layout.marginWidth = 0;
            layout.marginHeight = 0;
            layout.horizontalSpacing = 0;
            layout.verticalSpacing = 0;
            tabItemContainer.setLayout(layout);
            tabItem.setText(titel);

            Text headerTabText = new Text(tabItemContainer, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
            headerTabText.setData(current);

            if (Plugin.getDefault().getProjectPreferences(_selectedProject).getBoolean("useSpecificHeader", false)) {
                headerTabText.setText(_headerFileMap.get(current).getSpecificHeader(_selectedProject));
                headerTabText.setEnabled(true);
                _importButton.setEnabled(true);
                _exportButton.setEnabled(true);
            }
            else {
                headerTabText.setText(_headerFileMap.get(current).getDefaultHeader());
                headerTabText.setEnabled(false);
                _importButton.setEnabled(false);
                _exportButton.setEnabled(false);
            }

            headerTabText.addModifyListener(new ModifyListener() {
                public void modifyText(ModifyEvent e) {
                    if (e.getSource() instanceof Text) {
                        Text source = (Text) e.getSource();
                        if (_specificHeaderCheckbox.getSelection()) {
                            _headerFileMap.get((String) source.getData()).setSpecificHeader(_selectedProject, source.getText());
                        }

                    }
                }
            });

            GridData codeLayout = new GridData(GridData.FILL_BOTH);
            codeLayout.minimumHeight = WidgetFactory.computeFontHeight(headerTabText) * 20;
            headerTabText.setLayoutData(codeLayout);
            _headerTabTextMap.put(current, headerTabText);
            tabItem.setControl(tabItemContainer);
        }

       
       
       
View Full Code Here

    viewVivaldis = new IView[vivaldis.size()];
   
    dhts.toArray( viewDHTs );
    vivaldis.toArray( viewVivaldis );
   
    itemActivity = new TabItem(folder, SWT.NULL);
    itemStats = new TabItem(folder, SWT.NULL);
    itemCache  = new TabItem(folder, SWT.NULL);
   
    itemDHTs = new TabItem[viewDHTs.length];
   
    for (int i=0;i<itemDHTs.length;i++){
      itemDHTs[i] = new TabItem(folder, SWT.NULL);
    }

    itemVivaldis = new TabItem[viewVivaldis.length];

    for (int i=0;i<itemVivaldis.length;i++){
      itemVivaldis[i] = new TabItem(folder,SWT.NULL);
    }

    viewActivity = new ActivityView();
    viewStats = new TransferStatsView();
    viewCache = new CacheView();
   
   
   
    Messages.setLanguageText(itemActivity, viewActivity.getData());
    Messages.setLanguageText(itemStats, viewStats.getData());
    Messages.setLanguageText(itemCache, viewCache.getData());
   
    for (int i=0;i<viewDHTs.length;i++){
      Messages.setLanguageText(itemDHTs[i], viewDHTs[i].getData());
      Messages.setLanguageText(itemVivaldis[i], viewVivaldis[i].getData());
    }
   
    TabItem items[] = {itemActivity};
    folder.setSelection(items);
   
    viewActivity.initialize(folder);
    itemActivity.setControl(viewActivity.getComposite());
   
View Full Code Here

   
    for (int i=0;i<mappers.length;i++){
   
      SpeedManagerPingMapper mapper = mappers[i];
     
      TabItem plot_item = new TabItem(folder, SWT.NULL);
     
      plot_item.setText( "Plot " + mapper.getName());
     
      Canvas plotCanvas = new Canvas(folder,SWT.NO_BACKGROUND);
      gridData = new GridData(GridData.FILL_BOTH);
      plotCanvas.setLayoutData(gridData);
     
      plot_views[i] = new plotView( mapper, plotCanvas, labels, formatters );
     
      plot_item.setControl( plotCanvas );
     
      TabItem zones_item = new TabItem(folder, SWT.NULL);
      zones_item.setText( "Zones " + mapper.getName() );
     
      Canvas zoneCanvas = new Canvas(folder,SWT.NO_BACKGROUND);
      gridData = new GridData(GridData.FILL_BOTH);
      zoneCanvas.setLayoutData(gridData);
 
      zone_views[i] = new zoneView( mapper, zoneCanvas, labels, formatters );
     
      zones_item.setControl( zoneCanvas );
    }
   
    autoSpeedDisabledPanel = new Composite(autoSpeedPanel,SWT.NULL);
    autoSpeedDisabledPanel.setLayout(new GridLayout());
    Label disabled = new Label(autoSpeedDisabledPanel,SWT.NULL);
View Full Code Here

  private void createGeneralGroup(TabFolder parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(1));

    TabItem item = new TabItem(parent, SWT.None);
    item.setText("General");
    item.setControl(group);

    /* Auto-Reload */
    Composite autoReloadContainer = new Composite(group, SWT.NONE);
    autoReloadContainer.setLayout(LayoutUtils.createGridLayout(3, 0, 0));
    autoReloadContainer.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
View Full Code Here

  private void createReadingGroup(TabFolder parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(1));

    TabItem item = new TabItem(parent, SWT.None);
    item.setText("Reading");
    item.setControl(group);

    /* Mark read after millis */
    Composite markReadAfterContainer = new Composite(group, SWT.None);
    markReadAfterContainer.setLayout(LayoutUtils.createGridLayout(3, 0, 0));

View Full Code Here

  private void createDisplayGroup(TabFolder parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(2));

    TabItem item = new TabItem(parent, SWT.None);
    item.setText("Display");
    item.setControl(group);

    /* Filter Settings */
    Label filterLabel = new Label(group, SWT.None);
    filterLabel.setText("Filter News: ");

View Full Code Here

  private void createCleanUpGroup(TabFolder parent) {
    Composite group = new Composite(parent, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(2, 5, 5, 10, 5, false));

    TabItem item = new TabItem(parent, SWT.None);
    item.setText("Clean-Up");
    item.setControl(group);

    /* Explanation Label */
    Label explanationLabel = new Label(group, SWT.WRAP);
    explanationLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
    explanationLabel.setText("To recover disk space, old news can be permanently deleted.");
View Full Code Here

      }
    });

    /* For each Page - create TabItem */
    for (EntityPropertyPageWrapper pageWrapper : fPages) {
      TabItem item = new TabItem(fTabFolder, SWT.None);
      IEntityPropertyPage page = pageWrapper.getPage();
      item.setData(page);
      item.setText(pageWrapper.getName());
      if (page.getImage() != null)
        item.setImage(OwlUI.getImage(fResources, page.getImage()));
      item.setControl(page.createContents(fTabFolder));
    }

    /* Focus first Page */
    if (!fPages.isEmpty())
      fPages.iterator().next().getPage().setFocus();
View Full Code Here

    fTabFolder = new TabFolder(composite, SWT.None);
    fTabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));

    /* For each Page - create TabItem */
    for (EntityPropertyPageWrapper pageWrapper : fPages) {
      TabItem item = new TabItem(fTabFolder, SWT.None);
      item.setData(pageWrapper.getPage());
      item.setText(pageWrapper.getName());
      item.setControl(pageWrapper.getPage().createContents(fTabFolder));
    }

    /* Focus first Page */
    if (!fPages.isEmpty())
      fPages.iterator().next().getPage().setFocus();
View Full Code Here

TOP

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

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.