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