当前位置: 首页>>代码示例>>Java>>正文


Java TabFolder.addSelectionListener方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.TabFolder.addSelectionListener方法的典型用法代码示例。如果您正苦于以下问题:Java TabFolder.addSelectionListener方法的具体用法?Java TabFolder.addSelectionListener怎么用?Java TabFolder.addSelectionListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.TabFolder的用法示例。


在下文中一共展示了TabFolder.addSelectionListener方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createPart

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
public Control createPart(Composite parent) {

		Composite composite = new Composite(parent, SWT.NONE);
		composite.setLayout(new GridLayout());
		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

		folder = new TabFolder(composite, SWT.NONE);
		folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		folder.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
				updateUI(false);
			}
		});

		try {
			createExistingUserComposite(folder);
			updateUI(false);
		}
		catch (Throwable e1) {
			CloudFoundryPlugin.logError(e1);
		}

		return composite;

	}
 
开发者ID:eclipse,项目名称:cft,代码行数:27,代码来源:CloudFoundryCredentialsPart.java

示例2: createPart

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
public Control createPart(Composite parent) {

		Composite composite = new Composite(parent, SWT.NONE);
		composite.setLayout(new GridLayout());
		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

		folder = new TabFolder(composite, SWT.NONE);
		folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		folder.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
				updateUI(false);
			}
		});

		try {
			createExistingUserComposite(folder);
			updateUI(false);
		}
		catch (Throwable e1) {
			DockerFoundryPlugin.logError(e1);
		}

		return composite;

	}
 
开发者ID:osswangxining,项目名称:dockerfoundry,代码行数:27,代码来源:DockerFoundryCredentialsPart.java

示例3: createParameterExceptionsFolder

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
private void createParameterExceptionsFolder(Composite composite) {
	TabFolder folder= new TabFolder(composite, SWT.TOP);
	folder.setLayoutData(new GridData(GridData.FILL_BOTH));

	TabItem item= new TabItem(folder, SWT.NONE);
	item.setText(RefactoringMessages.ChangeSignatureInputPage_parameters);
	item.setControl(createParameterTableControl(folder));

	TabItem itemEx= new TabItem(folder, SWT.NONE);
	itemEx.setText(RefactoringMessages.ChangeSignatureInputPage_exceptions);
	itemEx.setControl(createExceptionsTableControl(folder));

	folder.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			((TabItem) e.item).getControl().setFocus();
		}
	});
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:ChangeSignatureWizard.java

示例4: createLeftContainerTabFolder

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
private TabFolder createLeftContainerTabFolder(Composite leftContainer) {
	GridData tabGridData = new GridData();
	tabGridData.horizontalAlignment = GridData.FILL;
	tabGridData.verticalAlignment = GridData.FILL;
	tabGridData.horizontalSpan = 3;
	tabGridData.verticalSpan = 7;
	tabGridData.grabExcessVerticalSpace = true;
	tabGridData.heightHint = 600;
	tabGridData.widthHint = 700;

	final TabFolder tabFolder = new TabFolder(leftContainer, SWT.CHECK | SWT.BORDER | SWT.H_SCROLL);
	tabFolder.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent event) {
			if (tabFolder.getSelection()[0].getText().equals(ALL_FEATURES_TAB_TITLE)) {
				installBtn.setEnabled(!selectedFeatures.isEmpty());
			} else if (tabFolder.getSelection()[0].getText().equals(UPDATES_TAB_TITLE)) {
				installBtn.setEnabled(!selectedUpdates.isEmpty());
			}
		}
	});
	tabFolder.setLayoutData(tabGridData);
	tabFolder.setSize(400, 420);
	return tabFolder;
}
 
开发者ID:wso2,项目名称:developer-studio,代码行数:26,代码来源:UpdaterDialog.java

示例5: createPartControl

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
public void createPartControl(Composite parent) {
    //viewer
    this.parent = parent;
    documentListener = new ViewDocumentListener();
    tabfolder = new TabFolder(parent,0);
    tabfolder.addSelectionListener(new TabSelectionListener());
    viewer = new LogFileViewer(tabfolder,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);

    // DnD
    DropTarget target = new DropTarget(parent, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
    target.setTransfer(new Transfer[] {FileTransfer.getInstance(), TextTransfer.getInstance()});
    target.addDropListener (new DropTargetAdapter() {
        public void dragEnter(DropTargetEvent e) {
            if (e.detail == DND.DROP_NONE)
                e.detail = DND.DROP_COPY;
        }
        public void drop(DropTargetEvent event) {
            if (event.data == null || ((String[])event.data).length < 1) {
                event.detail = DND.DROP_NONE;
                return;
            }
            //File file = new File(((String[])event.data)[0]);
            if (!checkAndOpenFile(LogFileType.LOGFILE_SYSTEM_FILE,((String[])event.data)[0], false))
                event.detail = DND.DROP_NONE;
        }
    });

    // fill the menues
    makeActions();
    hookContextMenu();
    contributeToActionBars();
    openAllLastOpenFiles();
}
 
开发者ID:anb0s,项目名称:LogViewer,代码行数:34,代码来源:LogViewer.java

示例6: createControl

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
public void createControl(Composite parent) {
	tabFolder = new TabFolder(parent, SWT.TOP);
	tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));

	DataBindingContext bindingContext = new DataBindingContext();
	WizardPageSupport.create(this, bindingContext);
	helpContexts = new ArrayList<String>();
	for (APageContent pc : rcontent) {
		Control cmp = pc.createContent(tabFolder);
		if (cmp == null)
			continue;
		pc.setBindingContext(bindingContext);

		TabItem item = new TabItem(tabFolder, SWT.NONE);
		item.setText(pc.getName());
		helpContexts.add(pc.getHelpContext());
		item.setControl(cmp);
	}
	tabFolder.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			selectHelpByTab(tabFolder.getSelectionIndex());
		}
	});
	setControl(tabFolder);
	selectHelpByTab(1);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:28,代码来源:EditResourcePage.java

示例7: createDialogArea

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
/**
 * Create the controls of the dialog
 */
@Override
protected Control createDialogArea(Composite parent) {
	 Composite dialogArea = (Composite) super.createDialogArea(parent);
	 folder = new TabFolder(dialogArea, SWT.NONE);
	 advancedColors = new AdvancedColorWidget(folder, SWT.NONE, oldColor, hasAlpha);
	 advancedColors.setLayoutData(new GridData(GridData.FILL_BOTH));
	 TabItem tab1 = new TabItem(folder, SWT.NONE);
	 tab1.setText(Messages.ColorDialog_advancedColorsLabel);
	 tab1.setControl(advancedColors);
	 colorsWidgets.add(advancedColors);
	 
	 TabItem tab2 = new TabItem(folder, SWT.NONE);
	 tab2.setText(Messages.ColorDialog_webColorsLabel);
	 webColors = new WebColorsWidget(folder, SWT.NONE, oldColor);
	 tab2.setControl(webColors);
	 colorsWidgets.add(webColors);
	 
	 if (LastUsedColorsWidget.hasColors()){
		 lastColors = new LastUsedColorsWidget(folder, SWT.NONE, oldColor);
		 TabItem tab3 = new TabItem(folder, SWT.NONE);
		 tab3.setText(Messages.ColorDialog_lastUserdColorLabel);
		 tab3.setControl(lastColors);
		 colorsWidgets.add(lastColors);
	 }
	 
	 
	 folder.addSelectionListener(new SelectionAdapter() {
		 @Override
		public void widgetSelected(SelectionEvent e) {
			selectedTab = folder.getSelectionIndex();
		}
	 });
	 return folder;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:38,代码来源:ColorDialog.java

示例8: createDialogArea

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
protected Control createDialogArea( Composite parent )
{
	Composite composite = (Composite) super.createDialogArea( parent );
	tabFolder = new TabFolder( composite, SWT.TOP );
	tabFolder.setLayoutData( new GridData( GridData.FILL_BOTH ) );

	// add pages
	addTabPages( tabFolder );
	tabFolder.addSelectionListener(new SelectionListener( ) {

		public void widgetSelected( SelectionEvent event )
		{
			int index = tabFolder.getSelectionIndex();
			if ( index == 1 )
			{
				refreshDriverPage( );
			}
		}

		public void widgetDefaultSelected(SelectionEvent e)
		{
			
		}
		
	});
	initialize( );

	Utility.setSystemHelp( composite,
			IHelpConstants.CONEXT_ID_DATASOURCE_JDBC_MANAGEDRIVERS );
	
	return composite;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:33,代码来源:JdbcDriverManagerDialog.java

示例9: fillTabFolder

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
public void fillTabFolder() {
    tabFolder = new TabFolder(this, SWT.NONE);

    int ix = 0;
    for (final Iterator<PropertiesTab> it = propertiesTabs.iterator(); it.hasNext();) {
        final PropertiesTab tab = it.next();
        final TabItem item = new TabItem(tabFolder, SWT.NONE, ix++);
        item.setText(tab.getTabItemText());

        /*
         * Build a container composite to add padding around the control for
         * the tab item
         */
        final Composite tabItemContainer = new Composite(tabFolder, SWT.NONE);
        final FillLayout tabItemContainerLayout = new FillLayout();
        tabItemContainerLayout.marginWidth = getHorizontalMargin();
        tabItemContainerLayout.marginHeight = getVerticalMargin();
        tabItemContainer.setLayout(tabItemContainerLayout);

        tab.setupTabItemControl(tabItemContainer);

        item.setControl(tabItemContainer);
        mapTabItemsToPropertiesTabs.put(item, tab);
    }

    tabFolder.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(final SelectionEvent e) {
            ensureSelectedTabItemsInitialized();
        }
    });

    tabFolder.setSelection(0);

    // sizeConstraint = new TableMinimumSizeConstraint(3, 10, new int[]
    // {40,40,40});
    // sizeConstraint.computeMinimumSize(table, getShell());

    ensureSelectedTabItemsInitialized();

    final FillLayout layout = new FillLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    setLayout(layout);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:46,代码来源:PropertiesComposite.java

示例10: AccountTabFolder

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
public AccountTabFolder(Composite parent, int style, final Long accountId,
    final INxtService nxt, final IStylingEngine engine,
    final IUserService userService, final UISynchronize sync,
    final IContactsService contactsService) {
  super(parent, style);
  this.accountId = accountId;
  this.userService = userService;
  this.contactsService = contactsService;
  this.nxt = nxt;
  this.engine = engine;
  this.sync = sync;
  setLayout(new FillLayout());
  tabFolder = new TabFolder(this, SWT.NONE);

  transactionsTab = new TabItem(tabFolder, SWT.NONE);
  transactionsTab.setText("Transactions");

  generatedBlocksTab = new TabItem(tabFolder, SWT.NONE);
  generatedBlocksTab.setText("Blocks");

  aliasesTab = new TabItem(tabFolder, SWT.NONE);
  aliasesTab.setText("Aliases");

  assetsTab = new TabItem(tabFolder, SWT.NONE);
  assetsTab.setText("Assets");

  messagesTab = new TabItem(tabFolder, SWT.NONE);
  messagesTab.setText("Messages");

  tabFolder.addSelectionListener(new SelectionAdapter() {

    @Override
    public void widgetSelected(SelectionEvent e) {
      TabItem[] items = tabFolder.getSelection();
      if (items != null && items.length > 0) {
        TabItem tab = items[0];
        if (selectedTab == null || !selectedTab.equals(tab)) {
          selectedTab = tab;
          refresh();
        }
      }
    }
  });
}
 
开发者ID:incentivetoken,项目名称:offspring,代码行数:45,代码来源:AccountTabFolder.java

示例11: createRightHandComposite

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
/**
 * Create the right side which consists of a progress bar and four tabs for
 * Code Coverage, Stack Trace, System Debug Log, and User Debug Log.
 */
private void createRightHandComposite() {
	GridLayout gridLayout = new GridLayout();
    Composite rightHandComposite = new Composite(sashForm, SWT.NONE);
    rightHandComposite.setLayout(gridLayout);
    
	// A folder with three tabs
	tabFolder = new TabFolder(rightHandComposite, SWT.NONE);
	
	// Code coverage
	TabItem tab1 = new TabItem(tabFolder, SWT.NONE);
	tab1.setText(Messages.View_CodeCoverage);
	codeCovArea = createTableForTabItem(tabFolder, tab1);
	// Stack trace
	TabItem tab2 = new TabItem(tabFolder, SWT.NONE);
	tab2.setText(Messages.View_StackTrace);
	stackTraceArea = createTextAreaForTabItem(tabFolder, tab2);
	// System debug log
	TabItem tab3 = new TabItem(tabFolder, SWT.NONE);
	tab3.setText(Messages.View_SystemLog);
	systemLogsTextArea = createTextAreaForTabItem(tabFolder, tab3);
	// User debug log
	TabItem tab4 = new TabItem(tabFolder, SWT.NONE);
	tab4.setText(Messages.View_UserLog);
	userLogsTextArea = createTextAreaForTabItem(tabFolder, tab4);
	
	tabFolder.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(org.eclipse.swt.events.SelectionEvent event) {
			TreeItem selectedTreeItem = null;
        	String selectedTabName = null;
        	
        	if (resultsTree != null && resultsTree.getSelectionCount() > 0) {
        		selectedTreeItem = resultsTree.getSelection()[0];
        	}
        	
        	if (event.getSource() != null && event.getSource() instanceof TabFolder) {
        		selectedTabName = ((TabFolder) event.getSource()).getSelection()[0].getText();
        	}
        	
        	// No need to open the source because a tab was selected
        	runView.updateView(selectedTreeItem, selectedTabName, false);
		}
	});
	
	GridData gridData1 = new GridData();
    gridData1.grabExcessHorizontalSpace = true;
    gridData1.horizontalAlignment = SWT.FILL;
    gridData1.verticalAlignment = SWT.FILL;
    gridData1.grabExcessVerticalSpace = true;
    tabFolder.setLayoutData(gridData1);
    
    GridData gridData2 = new GridData();
    gridData2.grabExcessHorizontalSpace = true;
    gridData2.horizontalAlignment = SWT.FILL;
    gridData2.verticalAlignment = SWT.END;
    progressBar = new ProgressBar(rightHandComposite, SWT.SMOOTH);
    progressBar.setLayoutData(gridData2);
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:62,代码来源:RunTestsViewComposite.java

示例12: createControl

import org.eclipse.swt.widgets.TabFolder; //导入方法依赖的package包/类
public void createControl(Composite parent) {
    setTitle("IvyDE Managed Libraries");
    setDescription("Choose ivy file and its configurations.");

    tabs = new TabFolder(parent, SWT.BORDER);
    tabs.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));

    TabItem mainTab = new TabItem(tabs, SWT.NONE);
    mainTab.setText("Main");
    mainTab.setControl(createMainTab(tabs));

    IProject p = project == null ? null : project.getProject();
    settingsSetupTab = new SettingsSetupTab(tabs, p) {
        protected void settingsUpdated() {
            try {
                conf.setSettingsProjectSpecific(isProjectSpecific());
                conf.setIvySettingsSetup(getSettingsEditor().getIvySettingsSetup());
                state.setIvySettingsLastModified(-1);
                state.getIvy();
                getSettingsEditor().setSettingsError(null);
                checkIvyXmlPath();
            } catch (IvyDEException e) {
                getSettingsEditor().setSettingsError(e);
            }
        }
    };

    classpathSetupTab = new ClasspathSetupTab(tabs, p);

    mappingSetupTab = new MappingSetupTab(tabs, p);

    advancedSetupTab = new AdvancedSetupTab(tabs, p);

    tabs.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            ivyFilePathText.updateErrorMarker();
            settingsSetupTab.getSettingsEditor().updateErrorMarker();
        }
    });

    setControl(tabs);

    loadFromConf();
    checkCompleted();
    tabs.setFocus();
}
 
开发者ID:apache,项目名称:ant-ivyde,代码行数:47,代码来源:IvydeContainerPage.java


注:本文中的org.eclipse.swt.widgets.TabFolder.addSelectionListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。