本文整理汇总了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);
}
示例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);
}
}
}
示例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 ));
}
}
示例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);
}
}
}
示例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 );
}
示例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( );
}