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


Java ScrolledComposite.getContent方法代碼示例

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


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

示例1: setupSC

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void setupSC(ScrolledComposite sc) {
	Composite c = (Composite) sc.getContent();
	if (c != null) {
		Point size1 = c.computeSize(sc.getClientArea().width, SWT.DEFAULT);
		Point size = c.computeSize(SWT.DEFAULT, size1.y);
		sc.setMinSize(size);
	}
	sc.getVerticalBar().setPageIncrement(sc.getSize().y);
}
 
開發者ID:BiglySoftware,項目名稱:BiglyBT,代碼行數:10,代碼來源:ConfigView.java

示例2: ensureSectionBuilt

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void ensureSectionBuilt(TreeItem treeSection, boolean recreateIfAlreadyThere) {
   ScrolledComposite item = (ScrolledComposite)treeSection.getData("Panel");

   if (item != null) {

     ConfigSection configSection = (ConfigSection)treeSection.getData("ConfigSectionSWT");

     if (configSection != null) {

       Control previous = item.getContent();
       if (previous instanceof Composite) {
       	if (!recreateIfAlreadyThere) {
       		return;
       	}
       	configSection.configSectionDelete();
         sectionsCreated.remove(configSection);
         Utils.disposeComposite((Composite)previous,true);
       }

       Composite c = ((UISWTConfigSection)configSection).configSectionCreate(item);

       sectionsCreated.add(configSection);

       item.setContent(c);
     }
   }
}
 
開發者ID:BiglySoftware,項目名稱:BiglyBT,代碼行數:28,代碼來源:ConfigView.java

示例3: updateScrolledComposite

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
public static void updateScrolledComposite(ScrolledComposite sc) {
	Control content = sc.getContent();
	if (content != null && !content.isDisposed()) {
		Rectangle r = sc.getClientArea();
		sc.setMinSize(content.computeSize(r.width, SWT.DEFAULT ));
	}
}
 
開發者ID:BiglySoftware,項目名稱:BiglyBT,代碼行數:8,代碼來源:Utils.java

示例4: ensureSectionBuilt

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void ensureSectionBuilt(TreeItem treeSection, boolean recreateIfAlreadyThere) {
   ScrolledComposite item = (ScrolledComposite)treeSection.getData("Panel");

   if (item != null) {
   	
     ConfigSection configSection = (ConfigSection)treeSection.getData("ConfigSectionSWT");
     
     if (configSection != null) {
   	  
       Control previous = item.getContent();
       if (previous instanceof Composite) {
       	if (!recreateIfAlreadyThere) {
       		return;
       	}
       	configSection.configSectionDelete();
         sectionsCreated.remove(configSection);    	
         Utils.disposeComposite((Composite)previous,true);
       }
       
       Composite c = ((UISWTConfigSection)configSection).configSectionCreate(item);
       
       sectionsCreated.add(configSection);
       
       item.setContent(c);
     }
   }
}
 
開發者ID:AcademicTorrents,項目名稱:AcademicTorrents-Downloader,代碼行數:28,代碼來源:ConfigView.java

示例5: toggle

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
/** Toggles the visibility of the children of the given label */
private void toggle( AccordionLabel label, boolean performLayout,
		boolean autoClose )
{
	if ( autoClose )
	{
		collapseAll( true );
	}
	ScrolledComposite scrolledComposite = getContentArea( label );

	GridData scrollGridData = (GridData) scrolledComposite.getLayoutData( );
	boolean close = !scrollGridData.exclude;
	scrollGridData.exclude = close;
	scrolledComposite.setVisible( !close );
	updateIcon( label );

	if ( !scrollGridData.exclude && scrolledComposite.getContent( ) == null )
	{
		Composite composite = createChildContainer( scrolledComposite );
		Object header = getHeader( label );
		createChildren( composite, header );
		scrolledComposite.setContent( composite );
		scrolledComposite.setMinSize( composite.computeSize( SWT.DEFAULT,
				SWT.DEFAULT ) );
	}

	if ( performLayout )
	{
		layout( true );
	}

	Event event = new Event( );
	event.widget = this;
	notifyListeners( SWT.SELECTED, event );
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:36,代碼來源:AccordionControl.java

示例6: dealParentLayout

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void dealParentLayout( Composite container )
{
	if ( container == null )
		return;
	if ( !( container instanceof ScrolledComposite ) )
	{
		dealParentLayout( container.getParent( ) );
		return;
	}
	ScrolledComposite composite = (ScrolledComposite) container;
	Composite control = (Composite) composite.getContent( );
	composite.setMinSize( control.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
	control.layout( );
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:15,代碼來源:OutputPropertyDescriptor.java


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