當前位置: 首頁>>代碼示例>>Java>>正文


Java TabFolder.setBounds方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.TabFolder.setBounds方法的典型用法代碼示例。如果您正苦於以下問題:Java TabFolder.setBounds方法的具體用法?Java TabFolder.setBounds怎麽用?Java TabFolder.setBounds使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.TabFolder的用法示例。


在下文中一共展示了TabFolder.setBounds方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createContents

import org.eclipse.swt.widgets.TabFolder; //導入方法依賴的package包/類
/**
	 * Create contents of the application window.
	 * 
	 * @param parent
	 */
	@Override
	protected Control createContents(Composite parent)
	{
		/********************************************************************************
		 * Menu Bar
		 ********************************************************************************/
		// Menu menuBar = new Menu(parent.getShell(),SWT.BAR);
		// MenuItem menuItemRun = new MenuItem(menuBar,SWT.CASCADE);
		// menuItemRun.setText("&Run");
		// Menu menuRun = new Menu(menuItemRun);
		// menuItemRun.setMenu(menuRun);
		// parent.getShell().setMenuBar(menuBar);

		Composite containerMIPA = new Composite(parent, SWT.NONE);

		TabFolder tabFolderMIPA = new TabFolder(containerMIPA, SWT.BORDER);
		tabFolderMIPA.setBounds(0, 0, 943, 599);

//		TabItem tabItemPredicate = new TabItem(tabFolderMIPA, SWT.NONE);
//		tabItemPredicate
//				.setToolTipText("In this tab folder, the predicate is given in the form of xml file as well as the view of abstract syntax tree.");
//		tabItemPredicate.setText("Predicate");
//
//		SashForm sashPredicate = new SashForm(tabFolderMIPA, SWT.NONE);
//		sashPredicate
//				.setToolTipText("Drag to change the sizes of the two sides of the window.");
//		tabItemPredicate.setControl(sashPredicate);
//		
//		styledTextPredicate = new StyledText(sashPredicate, SWT.BORDER);
//		styledTextPredicate.setToolTipText("Predicate are shown here.");
//
//		Group grpPredicateTree = new Group(sashPredicate, SWT.NONE);
//		grpPredicateTree.setToolTipText("Tree view of predicate");
//		grpPredicateTree.setText("Predicate Tree View");
//
//		TreeViewer predicateTreeViewer = new TreeViewer(grpPredicateTree,
//				SWT.BORDER);
//		Tree treePredicate = predicateTreeViewer.getTree();
//		treePredicate.setBounds(10, 28, 444, 527);
//		sashPredicate.setWeights(new int[] { 1, 1 });
//		predicateTreeViewer
//				.setContentProvider(new PredicateTreeContentProvider());
//		predicateTreeViewer.setLabelProvider(new PredicateTreeLabelProvider());

		PredicateTabUI.getInstance(tabFolderMIPA);
		
/*		TabItem tabItemLattice = new TabItem(tabFolderMIPA, SWT.NONE);
		tabItemLattice.setToolTipText("representation of lattice");
		tabItemLattice.setText("Lattice");

		SashForm sashLattice = new SashForm(tabFolderMIPA, SWT.NONE);
		tabItemLattice.setControl(sashLattice);

		StyledText styledTextLattice = new StyledText(sashLattice, SWT.BORDER
				| SWT.READ_ONLY);
		styledTextLattice.setText("Information for lattice are given here \n.");
		styledTextLattice.setToolTipText("Information for lattice.");

		Group grpLatticeTree = new Group(sashLattice, SWT.NONE);
		grpLatticeTree.setToolTipText("tree view of lattice");
		grpLatticeTree.setText("Lattice Tree View");
		
		latticeTreeViewer = new TreeViewer(grpLatticeTree, SWT.BORDER);
		Tree latticeTree = latticeTreeViewer.getTree();
		latticeTree.setBounds(10, 29, 444, 526);
		latticeTreeViewer.setLabelProvider(new LatticeTreeLabelProvider());
		latticeTreeViewer.setContentProvider(new LatticeTreeContentProvider());
		sashLattice.setWeights(new int[] { 1, 1 });*/
		
		LatticeTabUI.getInstance(tabFolderMIPA);

		return containerMIPA;
	}
 
開發者ID:alg-nju,項目名稱:mipa,代碼行數:79,代碼來源:MIPAAppllicationWindow.java


注:本文中的org.eclipse.swt.widgets.TabFolder.setBounds方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。