當前位置: 首頁>>代碼示例>>Java>>正文


Java ScrolledComposite.setAlwaysShowScrollBars方法代碼示例

本文整理匯總了Java中org.eclipse.swt.custom.ScrolledComposite.setAlwaysShowScrollBars方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrolledComposite.setAlwaysShowScrollBars方法的具體用法?Java ScrolledComposite.setAlwaysShowScrollBars怎麽用?Java ScrolledComposite.setAlwaysShowScrollBars使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.custom.ScrolledComposite的用法示例。


在下文中一共展示了ScrolledComposite.setAlwaysShowScrollBars方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createControl

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
protected Control createControl(Composite parent) {
	scompo = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
	scompo.setExpandHorizontal(true);
	scompo.setExpandVertical(true);
	scompo.setAlwaysShowScrollBars(false);
	scompo.setMinSize(100, 100);

	composite = new Composite(scompo, SWT.BORDER);
	composite.setBackgroundMode(SWT.INHERIT_FORCE);
	composite.setBackground(parent.getBackground());
	GridLayout layout = new GridLayout();
	layout.marginBottom = 20;
	composite.setLayout(layout);
	scompo.setContent(composite);

	return scompo;
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:19,代碼來源:VExporter.java

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

示例3: createDialogArea

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
protected Control createDialogArea( Composite parent )
{

	Composite composite = (Composite) super.createDialogArea( parent );
	ScrolledComposite sc = new ScrolledComposite( composite, SWT.V_SCROLL );
	sc.setAlwaysShowScrollBars( false );
	sc.setExpandHorizontal( true );
	sc.setLayoutData( new GridData( GridData.FILL_BOTH ) );

	Composite content = new Composite( sc, SWT.NONE );
	sc.setContent( content );
	content.setLayout( new GridLayout( ) );

	// sc.setBackground( Display.getCurrent( ).getSystemColor(
	// SWT.COLOR_BLACK ) );
	// content.setBackground( Display.getCurrent( ).getSystemColor(
	// SWT.COLOR_BLUE ) );
	// composite.setBackground( Display.getCurrent( ).getSystemColor(
	// SWT.COLOR_RED ) );

	dialogHelper.setExpressionProvider( expressionProvider );
	dialogHelper.createContent( content );
	UIUtil.bindHelp( content, isTimePeriod || isEditTimePeriod()? IHelpContextIds.RELATIVE_TIME_PERIOD_DIALOG : IHelpContextIds.DATA_COLUMN_BINDING_DIALOG );
	return content;
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:26,代碼來源:DataColumnBindingDialog.java

示例4: addScrolledCompositeToTab

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private ScrolledComposite addScrolledCompositeToTab(CTabFolder tabFolder,CTabItem tabItem) {
	ScrolledComposite scrolledComposite = new ScrolledComposite(tabFolder,SWT.V_SCROLL);
	tabItem.setControl(scrolledComposite);
	//scrolledComposite.setLayout(new GridLayout(1, false));
	scrolledComposite.setExpandHorizontal(true);
	scrolledComposite.setExpandVertical(true);
	scrolledComposite.setAlwaysShowScrollBars(false);
	attachMouseScrollButtonListener(scrolledComposite);
	return scrolledComposite;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:11,代碼來源:PropertyDialogBuilder.java

示例5: createDialogArea

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
protected Control createDialogArea(Composite parent) {
	Composite tparent = (Composite) super.createDialogArea(parent);
	tparent.setLayout(new GridLayout());
	GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).hint(300, 250).grab(true, true).applyTo(tparent);

	ScrolledComposite cmpScrolled = new ScrolledComposite(tparent, SWT.V_SCROLL);
	cmpScrolled.setAlwaysShowScrollBars(false);
	cmpScrolled.setLayoutData(new GridData(GridData.FILL_BOTH));
	cmpScrolled.setExpandHorizontal(true);
	cmpScrolled.setShowFocusedControl(true);

	Composite cmpContent = new Composite(cmpScrolled, SWT.None);
	cmpScrolled.setContent(cmpContent);
	cmpContent.setLayout(new GridLayout(2, false));
	cmpContent.setLayoutData(new GridData(GridData.FILL_BOTH));

	arrCmbLangs = new Combo[size];
	for (int i = 0; i < size; i++) {
		createLabel(cmpContent, languages.get(i) + " : ");
		arrCmbLangs[i] = new Combo(cmpContent, SWT.READ_ONLY);
		arrCmbLangs[i].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		arrCmbLangs[i].setItems(LocaleService.getLanguages());
		String name = LocaleService.getLanguage(languages.get(i));
		if (!name.equals(languages.get(i))) {
			arrCmbLangs[i].setText(name);
		}
	}

	cmpContent.setSize(cmpContent.computeSize(SWT.DEFAULT, SWT.DEFAULT));

	return tparent;
}
 
開發者ID:heartsome,項目名稱:translationstudio8,代碼行數:34,代碼來源:CSV2TMXConverterDialog.java

示例6: createDialogArea

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
protected Control createDialogArea( Composite parent )
{
	UIUtil.bindHelp( parent, IHelpContextIds.MEASURE_DIALOG );

	Composite area = (Composite) super.createDialogArea( parent );

       ScrolledComposite sc = new ScrolledComposite( area, SWT.V_SCROLL );
       sc.setAlwaysShowScrollBars( false );
       sc.setExpandHorizontal( true );
       sc.setLayoutData( new GridData( GridData.FILL_BOTH ) );
       
	Composite contents = new Composite( sc, SWT.NONE);
       sc.setContent( contents );

       GridLayout layout = new GridLayout( );
       layout.verticalSpacing = 0;
       layout.marginWidth = 20;
       contents.setLayout( layout );

       GridData data = new GridData( GridData.FILL_BOTH );
       data.widthHint = convertWidthInCharsToPixels( 70 );
       contents.setLayoutData( data );
       
	createMeasureArea( contents );

	createVisibilityGroup( contents);

	WidgetUtil.createGridPlaceholder( contents, 1, true );

	initMeasureDialog( );

       // calculate the size explicitly as it is in scrollable composite
       Point size = contents.computeSize( SWT.DEFAULT, SWT.DEFAULT );
       contents.setSize( Math.max( size.x, 400 ), Math.max( size.y, 320 ) );

	return contents;
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:39,代碼來源:MeasureDialog.java

示例7: createDialogArea

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
protected Control createDialogArea( Composite parent )
{
	Composite composite = (Composite) super.createDialogArea( parent );
	ScrolledComposite scrollContent = new ScrolledComposite( composite,
			SWT.H_SCROLL | SWT.V_SCROLL );
	scrollContent.setAlwaysShowScrollBars( false );
	scrollContent.setExpandHorizontal( true );
	scrollContent.setLayout( new FillLayout( ) );
	scrollContent.setLayoutData( new GridData( GridData.FILL_BOTH ) );
	switch ( type )
	{
		case STRING :
			page = new FormatStringPage( scrollContent,
					SWT.NONE,
					IFormatPage.PAGE_ALIGN_VIRTICAL,
					false );
			break;
		case NUMBER :
			page = new FormatNumberPage( scrollContent,
					SWT.NONE,
					IFormatPage.PAGE_ALIGN_VIRTICAL,
					false );
			break;
		case DATETIME :
		case DATE :
		case TIME :
			page = new FormatDateTimePage( scrollContent,
					type,
					SWT.NONE,
					IFormatPage.PAGE_ALIGN_VIRTICAL,
					false );
			break;
	}
	Point size = ( (Composite) page ).computeSize( SWT.DEFAULT, SWT.DEFAULT );
	( (Composite) page ).setSize( size );
	scrollContent.setContent( (Composite) page );
	UIUtil.bindHelp( composite, IHelpContextIds.FORMAT_BUILDER_ID );
	return composite;
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:40,代碼來源:FormatBuilder.java

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

示例9: createMainWindowComposite

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
public Composite createMainWindowComposite(Composite parent) {
	removeImage = CloudFoundryImages.REMOVE.createImage();

	group = new Group(parent, SWT.SHADOW_IN);
	group.setText(Messages.CloudFoundryServiceWizardPageRightPanel_SERVICES_TO_CREATE);
	group.setLayout(new FillLayout());

	group.addDisposeListener(new DisposeListener() {
		@Override
		public void widgetDisposed(DisposeEvent e) {
			if (boldFont != null && !boldFont.isDisposed()) {
				boldFont.dispose();
			}
			if (removeImage != null && !removeImage.isDisposed()) {
				removeImage.dispose();
			}
		}
	});

	scrollComp = new ScrolledComposite(group, SWT.V_SCROLL);
	scrollComp.setAlwaysShowScrollBars(false);

	layoutList = createLayoutList(scrollComp);
	scrollComp.setContent(layoutList);

	scrollComp.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent event) {
			Control c = scrollComp.getContent();
			if (c == null) {
				return;
			}
			Rectangle r = scrollComp.getClientArea();

			r.height = c.computeSize(r.width, SWT.DEFAULT).y;

			c.setBounds(r);
		}
	});

	return group;
}
 
開發者ID:eclipse,項目名稱:cft,代碼行數:43,代碼來源:CloudFoundryServiceWizardPageRightPanel.java

示例10: createMainWindowComposite

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
public Composite createMainWindowComposite(Composite parent) {
	removeImage = DockerFoundryImages.REMOVE.createImage();

	group = new Group(parent, SWT.SHADOW_IN);
	group.setText(Messages.DockerFoundryServiceWizardPageRightPanel_SERVICES_TO_CREATE);
	group.setLayout(new FillLayout());

	group.addDisposeListener(new DisposeListener() {
		@Override
		public void widgetDisposed(DisposeEvent e) {
			if (boldFont != null && !boldFont.isDisposed()) {
				boldFont.dispose();
			}
			if (removeImage != null && !removeImage.isDisposed()) {
				removeImage.dispose();
			}
		}
	});

	scrollComp = new ScrolledComposite(group, SWT.V_SCROLL);
	scrollComp.setAlwaysShowScrollBars(false);

	layoutList = createLayoutList(scrollComp);
	scrollComp.setContent(layoutList);

	scrollComp.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent event) {
			Control c = scrollComp.getContent();
			if (c == null) {
				return;
			}
			Rectangle r = scrollComp.getClientArea();

			r.height = c.computeSize(r.width, SWT.DEFAULT).y;

			c.setBounds(r);
		}
	});

	return group;
}
 
開發者ID:osswangxining,項目名稱:dockerfoundry,代碼行數:43,代碼來源:DockerFoundryServiceWizardPageRightPanel.java

示例11: createDialogArea

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
/**
 * Create contents of the dialog.
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(1, false));

	Composite composite = new Composite(container, SWT.NONE);
	composite.setLayout(new GridLayout(2, false));
	composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	Label filterNameLabel = new Label(composite, SWT.NONE);
	filterNameLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
	filterNameLabel.setText(Messages.getString("dialog.ExportFilterSettingDialog.filterNameLabel"));

	filterNameText = new Text(composite, SWT.BORDER);
	filterNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	Composite optionComposite = new Composite(container, SWT.NONE);
	optionComposite.setLayout(new GridLayout(2, false));
	optionComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	isAllCbtn = new Button(optionComposite, SWT.RADIO);
	isAllCbtn.setSize(152, 26);
	isAllCbtn.setText(Messages.getString("dialog.ExportFilterSettingDialog.isAllCbtn"));
	isAllCbtn.setSelection(true);

	isAnyCbtn = new Button(optionComposite, SWT.RADIO);
	isAnyCbtn.setText(Messages.getString("dialog.ExportFilterSettingDialog.isAnyCbtn"));

	ScrolledComposite scrolledComposite = new ScrolledComposite(container, SWT.V_SCROLL | SWT.BORDER);
	scrolledComposite.setAlwaysShowScrollBars(false);
	scrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
	scrolledComposite.setExpandHorizontal(true);
	scrolledComposite.setExpandVertical(true);

	dynaComposite = new Composite(scrolledComposite, SWT.NONE);
	dynaComposite.setBackground(Display.getDefault().getSystemColor((SWT.COLOR_WHITE)));
	scrolledComposite.setContent(dynaComposite);
	scrolledComposite.setMinSize(dynaComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
	GridLayout gl_dynaComposite = new GridLayout(1, false);
	dynaComposite.setLayout(gl_dynaComposite);

	ExportFilterComposite exportFilterComponent = new ExportFilterComposite(dynaComposite, SWT.None, ruleType);
	exportFilterComponent.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	exportFilterComponent.setDeleteButtonEnabled(false);
	dynaComposite.setData("currentNumber", 1);

	scrolledComposite.setMinSize(dynaComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));

	initData();

	return container;
}
 
開發者ID:heartsome,項目名稱:translationstudio8,代碼行數:57,代碼來源:ExportFilterSettingDialog.java

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


注:本文中的org.eclipse.swt.custom.ScrolledComposite.setAlwaysShowScrollBars方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。