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


Java ScrolledComposite.setMinWidth方法代码示例

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


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

示例1: 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

示例2: 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

示例3: setMinWidth

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

示例4: 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

示例5: 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

示例6: 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

示例7: createDialogArea

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected Control createDialogArea( Composite parent )
{
	setMessage( Messages.getString( "ParameterDialog.message" ) ); //$NON-NLS-1$
	ScrolledComposite scrollContent = new ScrolledComposite( (Composite) super.createDialogArea( parent ),
			SWT.H_SCROLL | SWT.V_SCROLL );
	scrollContent.setAlwaysShowScrollBars( false );
	scrollContent.setExpandHorizontal( true );
	scrollContent.setMinWidth( 600 );
	scrollContent.setLayout( new FillLayout( ) );
	scrollContent.setLayoutData( new GridData( GridData.FILL_BOTH ) );

	displayArea = new Composite( scrollContent, SWT.NONE );

	Composite topComposite = new Composite( displayArea, SWT.NONE );
	topComposite.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
	topComposite.setLayout( new GridLayout( 2, false ) );

	createPropertiesSection( topComposite );
	createDisplayOptionsSection( topComposite );
	createValuesDefineSection( displayArea );
	displayArea.setLayout( new GridLayout( ) );

	Point size = displayArea.computeSize( SWT.DEFAULT, SWT.DEFAULT );
	displayArea.setSize( size );

	scrollContent.setContent( displayArea );

	UIUtil.bindHelp( parent, IHelpContextIds.PARAMETER_DIALOG_ID );
	return scrollContent;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:31,代码来源:ParameterDialog.java

示例8: 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

示例9: 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

示例10: createPageCustomControl

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

	Composite mainComposite = new Composite( sComposite, SWT.NONE );
	mainComposite.setLayout( new GridLayout( 1, false ) );
	GridData gridData = new GridData( GridData.FILL_BOTH );
	mainComposite.setLayoutData( gridData );

	createTopArea( mainComposite );

	createFieldsSelectionArea( mainComposite );

	createBottomArea( mainComposite );

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

	sComposite.setContent( mainComposite );
	setControl( sComposite );
	setPageComplete( false );

	try
	{
		initPageInfos( );
	}
	catch ( final OdaException e )
	{
		initializeControl( );
		Display.getDefault( ).asyncExec( new Runnable( ) {

			public void run( )
			{
				String errorMsg = UIHelper.getUserErrorMessage( "MongoDBDataSetWizardPage.MessageDialog.ErrorMessage.InitPage", e ); //$NON-NLS-1$
				ExceptionHandler.showException( sComposite.getShell( ),
						Messages.getString( "MongoDBDataSetWizardPage.MessageDialog.title.GeneralError" ), //$NON-NLS-1$
						errorMsg,
						e );
			}
		} );

		return;
	}

	initializeControl( );

	resetLabelWidth( );

	modelChanged = false;

	UIHelper.setSystemHelp( getControl( ),
			IHelpConstants.CONTEXT_ID_WIZARD_DATASET_MONGODB );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:58,代码来源:MongoDBDataSetWizardPage.java

示例11: createDialogArea

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected Control createDialogArea( Composite parent )
{
	// Assert.isNotNull( dataSetList );

	if ( sytleChoicesAll == null )
	{
		sytleChoicesAll = getAllStyleChoices( );
	}

	// Composite topComposite = (Composite) super.createDialogArea( parent
	// );

	ScrolledComposite scrollContent = new ScrolledComposite( (Composite) super.createDialogArea( parent ),
			SWT.H_SCROLL | SWT.V_SCROLL );
	scrollContent.setAlwaysShowScrollBars( false );
	scrollContent.setExpandHorizontal( true );
	scrollContent.setMinWidth( 600 );
	scrollContent.setLayout( new FillLayout( ) );
	scrollContent.setLayoutData( new GridData( GridData.FILL_BOTH ) );

	applyDialogFont( scrollContent );

	Composite topComposite = new Composite( scrollContent, SWT.NONE );
	GridLayout layout = new GridLayout( );
	layout.marginHeight = convertVerticalDLUsToPixels( IDialogConstants.VERTICAL_MARGIN );
	layout.marginWidth = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_MARGIN );
	layout.verticalSpacing = convertVerticalDLUsToPixels( IDialogConstants.VERTICAL_SPACING );
	layout.horizontalSpacing = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_SPACING );
	topComposite.setLayout( layout );

	createTitleArea( topComposite );

	Composite composite = new Composite( topComposite, SWT.NONE );
	composite.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
	composite.setLayout( new GridLayout( 2, true ) );
	createFieldArea( composite );
	createGroupArea( composite );
	createBookmarkArea( topComposite );
	createTOCArea( topComposite );
	createFilterSortingArea( topComposite );
	UIUtil.bindHelp( parent, IHelpContextIds.GROUP_DIALOG_ID );

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

	scrollContent.setContent( topComposite );

	return scrollContent;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:50,代码来源:GroupDialog.java

示例12: createDialogArea

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected Control createDialogArea( Composite parent )
{
	// Composite composite = (Composite) super.createDialogArea( parent );

	ScrolledComposite sc = new ScrolledComposite( (Composite) super.createDialogArea( parent ),
			SWT.H_SCROLL | SWT.V_SCROLL );
	sc.setLayout( new FillLayout( ) );
	sc.setLayoutData( new GridData( GridData.FILL_BOTH ) );
	applyDialogFont( sc );

	mainContent = new Composite( sc, SWT.NONE );
	GridLayout layout = new GridLayout( );
	layout.marginHeight = convertVerticalDLUsToPixels( IDialogConstants.VERTICAL_MARGIN );
	layout.marginWidth = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_MARGIN );
	layout.verticalSpacing = convertVerticalDLUsToPixels( IDialogConstants.VERTICAL_SPACING );
	layout.horizontalSpacing = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_SPACING );
	mainContent.setLayout( layout );

	UIUtil.bindHelp( parent, IHelpContextIds.CASCADING_PARAMETER_DIALOG_ID );

	GridData data = new GridData( GridData.FILL_BOTH );

	maxStrLengthProperty = getMaxStrLength( PROPERTY_LABEL_STRING,
			mainContent );

	maxStrLengthOption = getMaxStrLength( OPTION_LABEL_STRING, mainContent );

	mainContent.setLayoutData( data );

	createGeneralPart( mainContent );

	createChoicePart( mainContent );

	createDynamicParamsPart( mainContent );

	createPropertiesPart( mainContent );

	createSortingArea( mainContent );

	createOptionsPart( mainContent );

	createLabel( mainContent, null );
	errorMessageLine = new CLabel( mainContent, SWT.NONE );
	GridData msgLineGridData = new GridData( GridData.FILL_HORIZONTAL );
	msgLineGridData.horizontalSpan = 2;
	errorMessageLine.setLayoutData( msgLineGridData );

	sc.setContent( mainContent );
	sc.setExpandHorizontal( true );
	// sc.setExpandVertical( true );
	sc.setMinWidth( 500 );
	// sc.setMinHeight( 570 );

	Point size = mainContent.computeSize( SWT.DEFAULT, SWT.DEFAULT );
	mainContent.setSize( size );

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


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