当前位置: 首页>>代码示例>>Java>>正文


Java ScrolledComposite.setMinHeight方法代码示例

本文整理汇总了Java中org.eclipse.swt.custom.ScrolledComposite.setMinHeight方法的典型用法代码示例。如果您正苦于以下问题:Java ScrolledComposite.setMinHeight方法的具体用法?Java ScrolledComposite.setMinHeight怎么用?Java ScrolledComposite.setMinHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.custom.ScrolledComposite的用法示例。


在下文中一共展示了ScrolledComposite.setMinHeight方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updatePageMinimumSize

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
/**
 * Calculate the real height of displayed sections in the properties tab.
 * Then Update the minimum height of the scrolled composite, to make the scrollbars
 * appear only when they are needed. The update is done only if it is necessary
 *
 */
public void updatePageMinimumSize(){
	Control topControl = cachedLayout.topControl;
	if (topControl != null && topControl instanceof ScrolledComposite){
		int height = 0;
		int width = getBounds().width;
		ScrolledComposite scrolledComposite = (ScrolledComposite)topControl;
		// When i calculate the height it is really important to give the real width
		// of the composite, since it is used to calculate the number of columns
		height = scrolledComposite.getContent().computeSize(width, SWT.DEFAULT).y;
		int actualMinheight = scrolledComposite.getMinHeight();
		boolean barVisible = scrolledComposite.getVerticalBar().isVisible();
		if (barVisible || height > actualMinheight) {
			scrolledComposite.setMinHeight(height);
		}
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:23,代码来源:TabbedPropertyComposite.java

示例2: createControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public void createControl(Composite parent) {		
	// Create a scrollable container to hold components
	// This is useful when users are using a lower resolution.
	ScrolledComposite comp = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
	Composite container = new Composite(comp, SWT.NONE);
	container.setLayout(new GridLayout(1, false));
	container.setLayoutData(new GridData(GridData.FILL_BOTH));
       
	createConfigurationArea(container);
	
	createLanguagePackFilteredListArea(container);
	
	createCoverageReportFilteredListArea(container);
	
	setControl(container);
	Dialog.applyDialogFont(container);
	setPageComplete(!"".equals(fWorkingDirectoryLocationText.getText()) && !"".equals(fTranslationCatalogueLocationText.getText()));
	
	// Scrollable container properties
	comp.setContent(container);
	comp.setMinHeight(500);
	comp.setExpandHorizontal(true);
	comp.setExpandVertical(true);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:25,代码来源:BuildToolWizardConfigurationPage.java

示例3: createPageControls

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public Composite createPageControls( Composite parent )
{
	ScrolledComposite scrolledComposite = new ScrolledComposite( parent,
			SWT.V_SCROLL | SWT.H_SCROLL );
	scrolledComposite.setAlwaysShowScrollBars( false );
	scrolledComposite.setExpandHorizontal(true);
	scrolledComposite.setExpandVertical(true);
	scrolledComposite.setLayout( new FillLayout( ) );
	Composite composite = new Composite( scrolledComposite, SWT.NONE );
	composite.setLayout( new GridLayout( ) );

	createURIRadioButtonsArea( composite );

	createClientSettingsArea( composite );
	
	createKerberosSettingsArea( composite );
	Point size = composite.computeSize( SWT.DEFAULT, SWT.DEFAULT );
	scrolledComposite.setMinWidth( size.x + 250 );
	scrolledComposite.setMinHeight( size.y + 20 );
	scrolledComposite.setContent( composite );
	return composite;

}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:MongoDBDataSourcePageHelper.java

示例4: addSettingTab

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void addSettingTab() {
  // ////////////////////////
  // START OF SETTING TAB ///
  // ////////////////////////

  wSettingTab = new CTabItem( wTabFolder, SWT.NONE );
  wSettingTab.setText( BaseMessages.getString( PKG, "SdmxDialog.SettingTab.TabTitle" ) );

  wSettingsSComp = new ScrolledComposite( wTabFolder, SWT.V_SCROLL | SWT.H_SCROLL );
  wSettingsSComp.setLayout( new FillLayout() );

  wSettingComp = new Composite( wSettingsSComp, SWT.NONE );
  props.setLook(wSettingComp);

  FormLayout settingLayout = new FormLayout();
  settingLayout.marginWidth = 3;
  settingLayout.marginHeight = 3;

  wSettingComp.setLayout( settingLayout );

  addProviderLabel();
  addProviderCombo();

  addFlowLabel();
  addFlowTextInput();
  addFlowBrowsingButton();

  addDimensionTableView();
  addDimensionButton();

  addCodeListTableView();
  addCodeButton();

  addViewTimeSeriesButton();

  wSettingComp.pack();
  Rectangle bounds = wSettingComp.getBounds();

  wSettingsSComp.setContent( wSettingComp );
  wSettingsSComp.setExpandHorizontal( true );
  wSettingsSComp.setExpandVertical( true );
  wSettingsSComp.setMinWidth( bounds.width );
  wSettingsSComp.setMinHeight( bounds.height );

  fdSettingComp = new FormData();
  fdSettingComp.left = new FormAttachment( 0, 0 );
  fdSettingComp.top = new FormAttachment( 0, 0 );
  fdSettingComp.right = new FormAttachment( 100, 0 );
  fdSettingComp.bottom = new FormAttachment( 100, 0 );
  wSettingComp.setLayoutData( fdSettingComp );

  wSettingTab.setControl( wSettingsSComp );
}
 
开发者ID:andtorg,项目名称:sdmx-kettle,代码行数:54,代码来源:SdmxStepDialog.java

示例5: createScrolledArea

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private ScrolledComposite createScrolledArea(Composite parent) {
	final ScrolledComposite scrolledComp = new ScrolledComposite(parent,
		SWT.V_SCROLL | SWT.H_SCROLL);
	scrolledComp.setMinHeight(CONTENT_MIN_HEIGHT);
	scrolledComp.setMinWidth(CENTER_AREA_WIDTH);
	scrolledComp.setExpandVertical(true);
	scrolledComp.setExpandHorizontal(true);
	return scrolledComp;
}
 
开发者ID:amgaera,项目名称:emf-forms-rap-showcase,代码行数:10,代码来源:MainUi.java

示例6: createContents

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
	protected Control createContents(@Nullable Composite parent) {
//		new StringFieldEditor(WurstConstants.WURST_WC3_PATH, "Warcraft installation path: ", comp1);
		final Composite rootComposite = new Composite(parent, SWT.NONE);
		rootComposite.setLayout(GridLayoutFactory.fillDefaults().create());
		
		final ScrolledComposite sc = new ScrolledComposite(rootComposite, SWT.BORDER | SWT.V_SCROLL);
		sc.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200).create());
		sc.setExpandHorizontal(true);
		sc.setExpandVertical(true);
		
		final Composite comp = new Composite(sc, SWT.NONE);
		sc.setContent(comp);
		comp.setLayout(new GridLayout(1, false));
		
//		createReconcilationControls(comp);
//		createAutocompleteControls(comp);
		createPathControls(comp);
		createAdditionalOptions(comp);
		
		loadSettings();
		
		sc.setMinWidth(0);
		
		comp.addListener(SWT.Resize, new Listener() {
			@Override
			public void handleEvent(@Nullable Event event) {
				sc.setMinHeight(comp.computeSize(comp.getSize().x, SWT.DEFAULT).y);
			}
		});
		sc.setMinHeight(comp.computeSize(comp.getSize().x, SWT.DEFAULT).y);
		sc.setContent(comp);
		return rootComposite;
	}
 
开发者ID:peq,项目名称:rustyeclipse,代码行数:35,代码来源:RustPreferencePage.java

示例7: createPageCustomControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public void createPageCustomControl( Composite parent )
{	
	this.parent = parent;
	ScrolledComposite sComposite = new ScrolledComposite( parent,
			SWT.H_SCROLL | SWT.V_SCROLL );
	sComposite.setLayout( new GridLayout( ) );
	sComposite.setMinWidth( 560 );
	sComposite.setExpandHorizontal( true );
	sComposite.setMinHeight( 400 );
	sComposite.setExpandVertical( true );

	Composite composite = new Composite( sComposite, SWT.NONE );
	GridLayout layout = new GridLayout( 1, false );
	layout.horizontalSpacing = 10;
	composite.setLayout( layout );
	
	createTabFolderArea( composite );
	
	createCheckboxArea( composite );

	Point size = composite.computeSize( SWT.DEFAULT, SWT.DEFAULT );
	composite.setSize( size.x, size.y );

	sComposite.setContent( composite );

	HelpUtil.setSystemHelp( parent, HelpUtil.CONEXT_ID_DATASOURCE_POJO );
	
}
 
开发者ID:eclipse,项目名称:birt,代码行数:29,代码来源:ClassPathsPageHelper.java

示例8: setMinHeight

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public void setMinHeight(Position pos, int height) {
	ScrolledComposite sc = widgets.get(pos);
	if (sc!=null) {
		sc.setMinHeight(height);
	}
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:7,代码来源:PortalWidget.java

示例9: postConstruct

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@PostConstruct
public void postConstruct(Composite parent) {
	GridLayout gl_parent = new GridLayout(1, false);
	gl_parent.verticalSpacing = 0;
	gl_parent.marginWidth = 0;
	gl_parent.marginHeight = 0;
	gl_parent.horizontalSpacing = 0;
	parent.setLayout(gl_parent);
	
	part = partService
			.findPart("org.bbaw.bts.ui.corpus.part.AnnotationsPart");
	resizeListener = new Listener() {

		@Override
		public void handleEvent(
				org.eclipse.swt.widgets.Event event) {
			Rectangle r = scrollComposite
					.getClientArea();
			composite.layout();
			scrollComposite.setMinSize(composite
					.computeSize(r.width, SWT.DEFAULT));
		}

	};

	selectionListener = new Listener() {

		@Override
		public void handleEvent(
				org.eclipse.swt.widgets.Event event) {
			RelatedObjectGroup roGroup = (RelatedObjectGroup) event.widget;
			selfselection = true;
			setSelectedInternal(new Vector<>(Arrays.asList(roGroup)), true);
			selfselection = false;
		}

	};
	
	scrollComposite = new ScrolledComposite(parent,
			SWT.V_SCROLL | SWT.H_SCROLL);
	scrollComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
	scrollComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	scrollComposite.setMinWidth(100);
	scrollComposite.setMinHeight(400);
	composite = new Composite(scrollComposite, SWT.BORDER);
	scrollComposite.setExpandHorizontal(true);

	scrollComposite.setExpandVertical(true);
	scrollComposite.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent e) {
			Rectangle r = scrollComposite.getClientArea();
			scrollComposite.setMinSize(composite.computeSize(r.width,
					SWT.DEFAULT));
		}
	});
	composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
	composite.setLayout(new GridLayout(1, false));
	((GridLayout)composite.getLayout()).marginHeight = 0;
	((GridLayout)composite.getLayout()).marginWidth = 0;
	((GridLayout)composite.getLayout()).verticalSpacing = 0;

	// populate extended annotation filter menu and initialize context node
	extendAnnotationsFilterMenu();

	scrollComposite.setContent(composite);
	constructed = true;
	// request input from text editor
	eventBroker.post(BTSUIConstants.EVENT_EGY_TEXT_EDITOR_INPUT_REQUESTED+"annotations_part", relatingObjectsEvent);
}
 
开发者ID:cplutte,项目名称:bts,代码行数:71,代码来源:AnnotationsPart.java

示例10: createDBMetaDataSelectionComposite

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
/**
 * Creates the composite, for displaying the list of available db objects
 * 
 * @param parent
 */
private Control createDBMetaDataSelectionComposite( Composite parent )
{
	sComposite = new ScrolledComposite( parent, SWT.H_SCROLL
			| SWT.V_SCROLL );
	sComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
	sComposite.setExpandHorizontal( true );
	sComposite.setExpandVertical( true );
	sComposite.setMinHeight( 500 );
	sComposite.setMinWidth( 250 );
	
	sComposite.addControlListener( new ControlAdapter( ) {

		public void controlResized( ControlEvent e )
		{
			computeSize( );
		}
	} );
	
	boolean supportsSchema = false ; 
	boolean supportsProcedure = false; 
	
	if ( continueConnect )
	{
		supportsSchema = JdbcMetaDataProvider.getInstance( )
				.isSupportSchema( );
		supportsProcedure = JdbcMetaDataProvider.getInstance( )
				.isSupportProcedure( );
	}
	
	tablescomposite = new Composite( sComposite, SWT.NONE );

	tablescomposite.setLayout( new GridLayout( ) );
	GridData data = new GridData( GridData.FILL_BOTH );
	data.grabExcessVerticalSpace = true;
	tablescomposite.setLayoutData( data );

	createDBObjectTree( tablescomposite );
	createObjectTreeMenu();

	createSchemaFilterComposite( supportsSchema,
			supportsProcedure,
			tablescomposite );

	createSQLOptionGroup( tablescomposite );

	addDragSupportToTree( );
	// bidi_hcg: pass value of metadataBidiFormatStr
	addFetchDbObjectListener( metadataBidiFormatStr );
	
	sComposite.setContent( tablescomposite );

	return tablescomposite;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:59,代码来源:SQLDataSetEditorPage.java


注:本文中的org.eclipse.swt.custom.ScrolledComposite.setMinHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。