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


Java ScrolledComposite.setLayout方法代码示例

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


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

示例1: createFeatureListTab

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createFeatureListTab(TabFolder tabFolder, ActiveTab type) {
	TabItem tabItem = new TabItem(tabFolder, SWT.NULL);
	if (type == ActiveTab.ALL_FEATURES) {
		tabItem.setText(ALL_FEATURES_TAB_TITLE);
	} else {
		tabItem.setText(UPDATES_TAB_TITLE);
	}
	ScrolledComposite scroll = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
	scroll.setLayout(new GridLayout());
	scroll.setLayoutData(new GridData());

	Group group = new Group(scroll, SWT.NONE);
	group.setLayout(new GridLayout());
	group.setLayoutData(new GridData());
	listFeatures(group, type);
	scroll.setContent(group);
	scroll.setExpandHorizontal(true);
	scroll.setExpandVertical(true);
	scroll.setMinSize(group.computeSize(SWT.DEFAULT, SWT.DEFAULT));
	tabItem.setControl(scroll);
}
 
开发者ID:wso2,项目名称:developer-studio,代码行数:22,代码来源:UpdaterDialog.java

示例2: NotesCheckinControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected NotesCheckinControl(final Composite parent, final int style, final CheckinControlOptions options) {
    super(parent, style, Messages.getString("NotesCheckinControl.Title"), CheckinSubControlType.CHECKIN_NOTES); //$NON-NLS-1$

    this.options = options;

    final FillLayout layout = new FillLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    setLayout(layout);

    final int rootStyle = options.isForDialog() ? SWT.BORDER : SWT.NONE;
    rootComposite = new ScrolledComposite(this, SWT.V_SCROLL | rootStyle);
    rootComposite.setLayout(new FillLayout());
    rootComposite.setExpandHorizontal(true);
    rootComposite.setExpandVertical(true);

    addDisposeListener(new DisposeListener() {
        @Override
        public void widgetDisposed(final DisposeEvent e) {
            if (pendingCheckin != null) {
                pendingCheckin.getPendingChanges().removeAffectedTeamProjectsChangedListener(teamProjectsListener);
            }
        }
    });
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:26,代码来源:NotesCheckinControl.java

示例3: createPartControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
public void createPartControl(final Composite parent) {
	try {
		final Composite outer = toolkit.createComposite(parent, SWT.NONE);
		final GridLayout layout = new GridLayout(1, false);
		layout.marginHeight = layout.marginWidth = 0;
		outer.setLayout(layout);
		final GridData layoutData = new GridData(GridData.FILL_BOTH);
		outer.setLayoutData(layoutData);

		createValidationComposite(outer);

		final ScrolledComposite content = new ScrolledComposite(outer, SWT.H_SCROLL | SWT.V_SCROLL);
		content.setExpandHorizontal(true);
		content.setExpandVertical(true);
		content.setLayout(layout);
		content.setLayoutData(layoutData);
		final Composite children = initUi(content);
		content.setMinSize(children.computeSize(SWT.DEFAULT, SWT.DEFAULT));
		content.setContent(children);
		createBinding();
		additionalTasks();
	} catch (final ConnectException e) {
		handle(e);
	}
}
 
开发者ID:FI13,项目名称:afbb-bibo,代码行数:27,代码来源:AbstractView.java

示例4: createControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
	Composite mainComposite = new Composite(parent, SWT.NONE);
	mainComposite.setLayout(GridLayoutFactory.fillDefaults().create());
	
	Label titleLabel = new Label(mainComposite, SWT.NONE);
	titleLabel.setText(Messages.ShowServersPage_label);
	
	ScrolledComposite scrollComp = new ScrolledComposite(mainComposite, SWT.V_SCROLL | SWT.H_SCROLL);
	scrollComp.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200).create());
	scrollComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	scrollComp.setLayout(new GridLayout(1,false));
	scrollComp.setExpandHorizontal(true);
	scrollComp.setExpandVertical(true);
	content = new Composite(scrollComp, SWT.NONE);
	scrollComp.setContent(content);
	content.setLayout(new GridLayout(1,false));
	content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	setControl(mainComposite);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:ShowServersPage.java

示例5: createControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {	
	
	Composite mainComposite = new Composite(parent, SWT.NONE);
	mainComposite.setLayout(GridLayoutFactory.fillDefaults().create());

	
	Label titleLabel = new Label(mainComposite, SWT.NONE);
	titleLabel.setText(Messages.ShowAdaptersPage_label);
	ScrolledComposite scrollComp = new ScrolledComposite(mainComposite, SWT.V_SCROLL | SWT.H_SCROLL);
	scrollComp.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200).create());
	scrollComp.setLayout(new GridLayout(1,false));
	scrollComp.setExpandHorizontal(true);
	scrollComp.setExpandVertical(true);
	content = new Composite(scrollComp, SWT.NONE);
	scrollComp.setContent(content);
	content.setLayout(new GridLayout(1,false));
	content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	setControl(mainComposite);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:ShowAdaptersPage.java

示例6: createPartControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
public void createPartControl(Composite parent) {
	scrollComp = new ScrolledComposite(parent, SWT.V_SCROLL);
	scrollComp.setLayoutData(new GridData(GridData.FILL_BOTH));
	scrollComp.setLayout(new GridLayout(1,false));
	scrollComp.setExpandVertical(true);
	scrollComp.setExpandHorizontal(true);
	scrollComp.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent e) {
			refreshScrolledHeight();
		}
	});
	mainContainer = new Composite(scrollComp, SWT.BORDER);
	mainContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	scrollComp.setContent(mainContainer);
   mainContainer.setLayout(new ButtonFillLayout());
   
	IWorkbenchPart editor = getContributingPart();
	if (editor instanceof CachedSelectionProvider){
		CachedSelectionProvider cachedSelEditor = (CachedSelectionProvider)editor;
		cachedSelEditor.getSelectionCache().addSelectionChangeListener(selectionListener);
	} 
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:25,代码来源:FormattingToolsView.java

示例7: designControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected void designControl(Composite theControl) {
	
	theControl.setLayout( new FillLayout(SWT.HORIZONTAL));

  scrolledComposite = new ScrolledComposite( theControl, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
	scrolledComposite.setLayout( new FillLayout( SWT.HORIZONTAL));
	scrolledComposite.setLayoutData( new GridData(SWT.FILL, SWT.TOP, true, true, 0, 0));
	scrolledComposite.setExpandHorizontal(true);
	scrolledComposite.setExpandVertical(true);
	
	editorsContainer = new Composite( scrolledComposite, SWT.None);
	editorsContainer.setLayout( new GridLayout( 1, true));
	editorsContainer.setLayoutData( new GridData(SWT.FILL, SWT.TOP, true, false, 0, 0));
	
	createParameterEditors();
	
	scrolledComposite.setContent( editorsContainer);
	scrolledComposite.setMinSize( editorsContainer.computeSize( SWT.DEFAULT, SWT.DEFAULT));
}
 
开发者ID:SpirentTechnologies,项目名称:PlayCustomParameters,代码行数:21,代码来源:IPv6Widget.java

示例8: createBottomTypeArea

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected void createBottomTypeArea( Composite parent )
{
	ScrolledComposite sc = new ScrolledComposite( parent, SWT.V_SCROLL
			| SWT.H_SCROLL );
	{
		GridLayout layout = new GridLayout( );
		sc.setLayout( layout );
		GridData gridData = new GridData( GridData.FILL_BOTH );
		sc.setLayoutData( gridData );
		sc.setExpandHorizontal( true );
		sc.setExpandVertical( true );
	}

	cmpType = new Composite( sc, SWT.NONE );
	cmpType.setLayout( new GridLayout( 2, false ) );
	cmpType.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
	sc.setContent( cmpType );

	createLeftTypeTable( cmpType );
	populateChartTypes( );

	createRightDetails( cmpType );

	Point size = cmpType.computeSize( SWT.DEFAULT, SWT.DEFAULT );
	sc.setMinSize( size );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:27,代码来源:TaskSelectType.java

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

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

示例11: setupCanvas

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void setupCanvas() {
    imageScrolledComposite = new ScrolledComposite(shell, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
    imageScrolledComposite.setLayout(new GridLayout());
    imageScrolledComposite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
    imageScrolledComposite.setExpandVertical(true);
    imageScrolledComposite.setExpandHorizontal(true);
    canvas = new Canvas(imageScrolledComposite, SWT.NONE);
    imageScrolledComposite.setMinSize(image.getBounds().width, image.getBounds().height);
    imageScrolledComposite.setContent(canvas);

    setupCanvasListeners();
}
 
开发者ID:kamil-karkus,项目名称:EasySnap,代码行数:13,代码来源:ImageCaptureTool.java

示例12: createDialogArea

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

  final GridData parentData = new GridData(SWT.FILL, SWT.FILL, true, true);
  parent.setLayout(new GridLayout());
  parent.setLayoutData(parentData);

  final ScrolledComposite wrapper = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
  wrapper.setExpandHorizontal(true);
  wrapper.setExpandVertical(true);
  final FillLayout wrapperLayout = new FillLayout();
  wrapperLayout.marginHeight = 10;
  wrapperLayout.marginWidth = 10;
  wrapper.setLayout(wrapperLayout);
  wrapper.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

  final Composite emfFormsParent = new Composite(wrapper, SWT.NONE);
  wrapper.setContent(emfFormsParent);
  emfFormsParent.setLayout(new GridLayout());
  emfFormsParent.setLayoutData(new GridData(500, 500));

  try {
    view = ECPSWTViewRenderer.INSTANCE.render(emfFormsParent, namedObj);
  } catch (final ECPRendererException e) {
  }

  wrapper.setMinSize(wrapper.computeSize(SWT.DEFAULT, SWT.DEFAULT));

  return parent;
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:31,代码来源:NamedObjDialog.java

示例13: init

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public void init(){
			//all
			wholeSash=new SashForm(parent, SWT.VERTICAL);
			//top
			SashForm topSash=new SashForm(wholeSash, SWT.HORIZONTAL);		
			//bottom
			botSash=new SashForm(wholeSash, SWT.HORIZONTAL);
			
			//top.left
			wiScrollComp=new ScrolledComposite(topSash, SWT.H_SCROLL|SWT.V_SCROLL);
			wiScrollComp.setLayout(new FillLayout());
			wiComp=new Composite(wiScrollComp, SWT.FILL);
			wiComp.setSize(width0, height0);
//			wiComp.setLayout(new FillLayout());
			GridLayout layout = new GridLayout();
			layout.numColumns=1;			
			wiComp.setLayout(layout);
			wiScrollComp.setContent(wiComp);

			//top.right
			eplTable=new EplTable(topSash, SWT.MULTI|SWT.V_SCROLL|SWT.H_SCROLL|SWT.FULL_SELECTION);
			eplTable.getTable().addMouseListener(eplTableListener);

			Composite flowGraphComp=new Composite(botSash, SWT.NONE);
			flowGraphComp.setLayout(new FillLayout());
			flowGraph=new CGraph(flowGraphComp, SWT.NONE);
			flowGraph.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED);

			//bottom.right
			//flowText=new Text(botSash, SWT.NONE);
			initInstanceStatTable(botSash);
			
			//set weights
			topSash.setWeights(new int[]{3,1});
			botSash.setWeights(new int[]{3,1});
			wholeSash.setWeights(new int[]{3,1});
		}
 
开发者ID:HoratiusTang,项目名称:EsperDist,代码行数:38,代码来源:WorkerInstancesComposite2.java

示例14: createPreferenceContent

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected Control createPreferenceContent(Composite parent) {
  scrollPanel = new ScrolledComposite(parent, SWT.V_SCROLL);
  GridData scrollPanelGridData = new GridData(GridData.FILL_BOTH);
  scrollPanel.setLayoutData(scrollPanelGridData);
  GridLayout scrollPanelLayout = new GridLayout(1, false);
  scrollPanel.setLayout(scrollPanelLayout);

  topPanel = new Composite(scrollPanel, SWT.NONE);
  GridLayout layout = new GridLayout(1, false);
  layout.marginHeight = 0;
  layout.marginWidth = 0;
  topPanel.setLayout(layout);

  // Set up main composite to be scrollable
  scrollPanel.setContent(topPanel);
  scrollPanel.setExpandHorizontal(true);
  scrollPanel.setExpandVertical(true);

  // Create the list of problems (grouped by category)
  createProblemsList(topPanel);

  ExpandableComposite firstChild = (ExpandableComposite) problemsPanel.getChildren()[0];
  firstChild.setExpanded(true);

  // Initialize the severity combos
  populateSeverityCombosFromWorkingCopy();

  return topPanel;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:31,代码来源:ErrorsWarningsPage.java

示例15: createErrorsSection

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
/**
 * Create the composite with the controls to show the errors
 * 
 * @param parent 
 * @return the parent composite where the controls are contained
 */
private Composite createErrorsSection(Composite parent){
	Composite container = new Composite(parent, SWT.NULL);
	GridLayout layout = new GridLayout(1,false);
	layout.marginTop = 20;
	layout.verticalSpacing = 10;
	container.setLayout(layout);
	
	Label lblCongratulations = new Label(container, SWT.NONE);
	Font font = lblCongratulations.getFont();
	lblCongratulations.setFont(SWTResourceManager.getFont(font.getFontData()[0].getName(), 18, SWT.NORMAL));
	lblCongratulations.setForeground(ColorConstants.red);
	lblCongratulations.setText(Messages.FinalPage_errorTitle);
	lblCongratulations.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
	
	scrolledComposite = new ScrolledComposite(container, SWT.V_SCROLL);
   scrolledComposite.setLayout(new FillLayout(SWT.VERTICAL));
   Composite areaComp = new Composite(scrolledComposite, SWT.NONE);
   areaComp.setLayout(new FillLayout(SWT.VERTICAL));
	errorsArea = new StyledText(areaComp, SWT.NONE);
	errorsArea.setEditable(false);
	errorsArea.setBackground(areaComp.getBackground());
   scrolledComposite.setContent(areaComp);
   scrolledComposite.getVerticalBar().setIncrement(10);
	
	Label lblPressFinishTo = new Label(container, SWT.WRAP);
	lblPressFinishTo.setText(Messages.FinalPage_errorConclusiveMessage);
	GridData finishData = new GridData(SWT.FILL, SWT.LEFT, true, false);
	finishData.widthHint = 170;
	finishData.heightHint = 130;
	lblPressFinishTo.setLayoutData(finishData);
	return container;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:39,代码来源:FinalPage.java


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