当前位置: 首页>>代码示例>>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;未经允许,请勿转载。