当前位置: 首页>>代码示例>>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;未经允许,请勿转载。