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


Java ScrolledComposite.setShowFocusedControl方法代碼示例

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


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

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

示例2: designControl

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
protected void designControl(Composite theControl) {
	
	theControl.setLayout(new GridLayout());

	mainContainer = theControl;
	// PRAGMA according to eclipse doc use of GridData styles is not recommended. Use SWT styles instead.  
	mainContainer.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true, 0, 0));
	mainContainer.setLayout( new GridLayout());
	
  // display message panel above the scrollbox with the editors 
	//createMessagePanel( mainContainer); 
	createMessageDisplay( mainContainer);
			
	// scrollbox with the editors
  scrolledComposite = new ScrolledComposite( mainContainer, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
	// TODO adjust layout to layout data
  scrolledComposite.setLayout( new FillLayout( SWT.HORIZONTAL));
	scrolledComposite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true, 0, 0));
   scrolledComposite.setExpandHorizontal(true);
	scrolledComposite.setExpandVertical(true);
	// important! to show causer of an error when click on the corresponding message
	scrolledComposite.setShowFocusedControl( true);
	
	editorsContainer = new Composite( scrolledComposite, SWT.None);
	GridLayout editorsLayout = new GridLayout();
	editorsLayout.marginHeight = 0;
	editorsContainer.setLayout( editorsLayout);
	editorsContainer.setLayoutData( new GridData(SWT.FILL, SWT.FILL, true, false, 0, 0));
	
	createFreshEditors();
	
	scrolledComposite.setContent( editorsContainer);
	scrolledComposite.setMinSize( editorsContainer.computeSize( SWT.DEFAULT, SWT.DEFAULT));
}
 
開發者ID:SpirentTechnologies,項目名稱:PlayCustomParameters,代碼行數:36,代碼來源:CustomWidget.java

示例3: createHorizantalViewTabItem

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void createHorizantalViewTabItem() {
	CTabItem tbtmHorizantalView = new CTabItem(tabFolder, SWT.CLOSE);
	tbtmHorizantalView.setData(Views.VIEW_NAME_KEY, Views.HORIZONTAL_VIEW_NAME);
	tbtmHorizantalView.setText(Views.HORIZONTAL_VIEW_DISPLAY_NAME);
	{
		Composite composite = new Composite(tabFolder, SWT.NONE);
		tbtmHorizantalView.setControl(composite);
		composite.setLayout(new GridLayout(1, false));
		{
			ScrolledComposite scrolledComposite = new ScrolledComposite(composite, SWT.BORDER | SWT.H_SCROLL
					| SWT.V_SCROLL);
			scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
			scrolledComposite.setExpandHorizontal(true);
			scrolledComposite.setExpandVertical(true);

			Composite stackLayoutComposite = new Composite(scrolledComposite, SWT.NONE);
			StackLayout stackLayout = new StackLayout();
			stackLayoutComposite.setLayout(stackLayout);

			{
				Composite composite_4 = new Composite(stackLayoutComposite, SWT.NONE);
				GridLayout gl_composite_4 = new GridLayout(1, false);
				gl_composite_4.verticalSpacing = 0;
				gl_composite_4.marginWidth = 0;
				gl_composite_4.marginHeight = 0;
				gl_composite_4.horizontalSpacing = 0;
				composite_4.setLayout(gl_composite_4);
				{
					horizontalViewTableViewer = new TableViewer(composite_4, SWT.BORDER | SWT.FULL_SELECTION);
					Table table_1 = horizontalViewTableViewer.getTable();
					table_1.setLinesVisible(true);
					table_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
				}
				stackLayout.topControl = composite_4;
			}

			scrolledComposite.getShowFocusedControl();
			scrolledComposite.setShowFocusedControl(true);

			scrolledComposite.setContent(stackLayoutComposite);
			scrolledComposite.setMinSize(stackLayoutComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));

			installMouseWheelScrollRecursively(scrolledComposite);

			setTableLayoutToMappingTable(horizontalViewTableViewer);
			horizontalViewTableViewer.setContentProvider(new ArrayContentProvider());

			dataViewLoader.updateDataViewLists();
			horizontalViewTableViewer.setInput(gridViewData);
			horizontalViewTableViewer.refresh();

			for (int i = 0, n = horizontalViewTableViewer.getTable().getColumnCount(); i < n; i++)
				horizontalViewTableViewer.getTable().getColumn(i).pack();

			horizontalViewTableViewer.refresh();
		}
	}
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:59,代碼來源:DebugDataViewer.java

示例4: createControl

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
public void createControl(Composite parent) {
  launchConfiguration = PipelineLaunchConfiguration.createDefault();
  composite = new ScrolledComposite(parent, SWT.V_SCROLL);
  composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
  composite.setLayout(new GridLayout(1, false));

  internalComposite = new Composite(composite, SWT.NULL);

  GridData internalCompositeGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
  internalComposite.setLayoutData(internalCompositeGridData);
  internalComposite.setLayout(new GridLayout(1, false));

  runnerGroup = new Group(internalComposite, SWT.NULL);
  runnerGroup.setText(Messages.getString("runner")); //$NON-NLS-1$
  runnerGroup.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
  runnerGroup.setLayout(new GridLayout(2, false));

  createDefaultOptionsComponent(internalComposite, new GridData(SWT.FILL, SWT.FILL, true, false));

  Composite inputsComposite = new Composite(internalComposite, SWT.NULL);
  inputsComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
  inputsComposite.setLayout(new FillLayout(SWT.VERTICAL));

  Set<String> filterProperties =
      ImmutableSet.<String>builder()
          .addAll(DataflowPreferences.SUPPORTED_DEFAULT_PROPERTIES)
          .add("runner") //$NON-NLS-1$
          .build();

  Group runnerOptionsGroup = new Group(inputsComposite, SWT.NULL);
  runnerOptionsGroup.setText(Messages.getString("pipeline.options")); //$NON-NLS-1$
  runnerOptionsGroup.setLayout(new GridLayout());

  userOptionsSelector = new TextAndButtonComponent(
      runnerOptionsGroup,
      new GridData(SWT.FILL, SWT.BEGINNING, true, false), 
      Messages.getString("search")); //$NON-NLS-1$
  userOptionsSelector.addButtonSelectionListener(openPipelineOptionsSearchListener());

  pipelineOptionsForm =
      new PipelineOptionsFormComponent(runnerOptionsGroup, ARGUMENTS_SEPARATOR, filterProperties);
  pipelineOptionsForm.addModifyListener(dialogChangedListener);
  pipelineOptionsForm.addExpandListener(dialogChangedListener);

  composite.setContent(internalComposite);
  composite.setExpandHorizontal(true);
  composite.setExpandVertical(true);
  composite.setMinSize(inputsComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
  composite.setShowFocusedControl(true);
  composite.pack(true);

  setControl(composite);
}
 
開發者ID:GoogleCloudPlatform,項目名稱:google-cloud-eclipse,代碼行數:55,代碼來源:PipelineArgumentsTab.java

示例5: createPageContainer

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
/**
 * Creates the inner page container.
 * 
 * @param parent
 * @return Composite
 */
protected Composite createPageContainer(Composite parent) {

	Composite outer = new Composite(parent, SWT.NONE);
	
	GridData outerData = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL
			| GridData.GRAB_VERTICAL);
	outerData.horizontalIndent = IDialogConstants.HORIZONTAL_MARGIN;
			
	outer.setLayout(new GridLayout());
	outer.setLayoutData(outerData);
	
	//Create an outer composite for spacing
	scrolled = new ScrolledComposite(outer, SWT.V_SCROLL | SWT.H_SCROLL);

	// always show the focus control
	scrolled.setShowFocusedControl(true);
	scrolled.setExpandHorizontal(true);
	scrolled.setExpandVertical(true);
	
	GridData scrolledData = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL
			| GridData.GRAB_VERTICAL);
			
	scrolled.setLayoutData(scrolledData);
	
	Composite result = new Composite(scrolled, SWT.NONE);
	
	GridData resultData = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL
			| GridData.GRAB_VERTICAL);
			
	result.setLayout(getPageLayout());
	result.setLayoutData(resultData);
	
	scrolled.setContent(result);
	
	return result;
}
 
開發者ID:ghillairet,項目名稱:gef-gwt,代碼行數:43,代碼來源:PreferenceDialog.java


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