當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。