本文整理匯總了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( );
}