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


Java StackLayout类代码示例

本文整理汇总了Java中org.eclipse.swt.custom.StackLayout的典型用法代码示例。如果您正苦于以下问题:Java StackLayout类的具体用法?Java StackLayout怎么用?Java StackLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: attachTableButtonListner

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
/**
 * 
 * @param selectionComposite
 * @param layout
 */
private void attachTableButtonListner(final ELTSubGroupCompositeWithStack selectionComposite,
		final StackLayout layout) {
	final Button tableRadioBtn = (Button) tableNameRadioButton.getSWTWidgetControl();
	tableRadioBtn.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			if (tableRadioBtn.getSelection()) {
				unRegisterTableOrSQLQueryTextListner();
				layout.topControl = tableComposite.getContainerControl();
				selectionComposite.getContainerControl().layout();
				if (databaseSelectionConfig != null) {
					databaseSelectionConfig.setTableNameSelection(true);
					databaseSelectionConfig.setTableName(textBoxTableName.getText());
					populateWidget();
				}
				showHideErrorSymbol(widgets);
				propertyDialogButtonBar.enableApplyButton(true);
			}
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:27,代码来源:SelectionDatabaseWidget.java

示例2: attachSQLQueryListner

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
/**
 * 
 * @param selectionComposite
 * @param layout
 */
private void attachSQLQueryListner(final ELTSubGroupCompositeWithStack selectionComposite,
		final StackLayout layout) {
	final Button sqlRadioBtn = (Button) sqlQueryRadioButton.getSWTWidgetControl();
	sqlRadioBtn.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			if (sqlRadioBtn.getSelection()) {
				unRegisterTableOrSQLQueryTextListner();
				layout.topControl = sqlQueryComposite.getContainerControl();
				selectionComposite.getContainerControl().layout();
				if (databaseSelectionConfig != null) {
					databaseSelectionConfig.setTableNameSelection(false);
					databaseSelectionConfig.setSqlQuery(sqlQueryTextBox.getText());
					//databaseSelectionConfig.setSqlQueryCounter(sqlQueryCountertextbox.getText());
					populateWidget();
				}
				showHideErrorSymbol(widgets);
				propertyDialogButtonBar.enableApplyButton(true);
			}
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:28,代码来源:SelectionDatabaseWidget.java

示例3: testCorrectPanelIsShownForFacetedProject

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Test
public void testCorrectPanelIsShownForFacetedProject() {
  DeployPropertyPage page = new DeployPropertyPage(loginService, googleApiFactory);
  Shell parent = shellTestResource.getShell();
  page.setElement(getProject());
  page.createControl(parent);
  page.setVisible(true);
  Composite preferencePageComposite = (Composite) parent.getChildren()[0];
  for (Control control : preferencePageComposite.getChildren()) {
    if (control instanceof Composite) {
      Composite maybeDeployPageComposite = (Composite) control;
      Layout layout = maybeDeployPageComposite.getLayout();
      if (layout instanceof StackLayout) {
        StackLayout stackLayout = (StackLayout) layout;
        assertThat(stackLayout.topControl, instanceOf(getPanelClass()));
        return;
      }
    }
  }
  fail("Did not find the deploy preferences panel");
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:22,代码来源:DeployPropertyPageTest.java

示例4: createContents

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Override
protected Control createContents(Composite parent) {
  container = new Composite(parent, SWT.NONE);
  stackLayout = new StackLayout();
  container.setLayout(stackLayout);

  IProject project = AdapterUtil.adapt(getElement(), IProject.class);

  try {
    facetedProject = ProjectFacetsManager.create(project);
  } catch (CoreException ex) {
    logger.log(Level.WARNING, ex.getMessage());
    return container;
  }

  GridDataFactory.fillDefaults().grab(true, true).applyTo(container);

  return container;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:20,代码来源:DeployPropertyPage.java

示例5: initCardPanel

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
private void initCardPanel(final Composite composite) {
    cardPanel = new Composite(composite, SWT.NONE);

    stackLayout = new StackLayout();
    stackLayout.marginHeight = 0;
    stackLayout.marginWidth = 0;

    cardPanel.setLayout(stackLayout);

    final GridData gridData = new GridData();
    gridData.grabExcessHorizontalSpace = true;
    gridData.horizontalAlignment = GridData.FILL;
    gridData.horizontalSpan = 2;
    gridData.horizontalIndent = 0;
    gridData.verticalIndent = 0;
    cardPanel.setLayoutData(gridData);

    initNonePanel();
    initTemplatePanel();
    initForeignKeyPanel();
    initEnumPanel();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:RepeatTestDataSettingDialog.java

示例6: initCardPanel

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
private void initCardPanel(Composite composite) {
	this.cardPanel = new Composite(composite, SWT.NONE);

	this.stackLayout = new StackLayout();
	this.stackLayout.marginHeight = 0;
	this.stackLayout.marginWidth = 0;

	this.cardPanel.setLayout(this.stackLayout);

	GridData gridData = new GridData();
	gridData.grabExcessHorizontalSpace = true;
	gridData.horizontalAlignment = GridData.FILL;
	gridData.horizontalSpan = 2;
	gridData.horizontalIndent = 0;
	gridData.verticalIndent = 0;
	this.cardPanel.setLayoutData(gridData);

	this.initNonePanel();
	this.initTemplatePanel();
	this.initForeignKeyPanel();
	this.initEnumPanel();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:23,代码来源:RepeatTestDataSettingDialog.java

示例7: createFieldEditors

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
/** Create fields controlling converter selection */
@Override
public void createFieldEditors() {
	Composite parent = getFieldEditorParent();
	base = SwtUtil.makeGroupComposite(parent, 3, 1, "Conversion filter selection");

	// Converter selection
	combo = new ConverterSelectFieldEditor(EDITOR_MD_CONVERTER, "Converter:", converters, base);
	addField(combo);

	stack = SwtUtil.makeCompositeStack(parent, 3, 1);
	stackSel = (StackLayout) stack.getLayout();

	// stacked options
	pandoc = new ConverterPandocOps(this, stack, "Pandoc Options");
	bfriday = new ConverterBlackFridayOps(this, stack, "BlackFriday Options");
	txtmark = new ConverterTxtmarkOps(this, stack, "TxtMark Options");
	external = new ConverterExternalOps(this, stack, "External Options");
	other = new ConverterNullOps(this, stack, "Default Options");

	// rest
	dotgen = new ConverterDotOps(this, parent, "Graphviz Options");

	// Converter option selection
	updateOptionsBlock(stack, getPreferenceStore().getString(EDITOR_MD_CONVERTER));
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:27,代码来源:PrefPageConvert.java

示例8: PlotComposite

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
/**
 * The default constructor.
 * 
 * @param parent
 *            a widget which will be the parent of the new instance (cannot
 *            be null)
 * @param style
 *            the style of widget to construct
 */
public PlotComposite(Composite parent, int style) {
	super(parent, style);

	plottedSeries = new HashSet<ISeries>();

	// Configure the Composite settings.
	setFont(parent.getFont());
	setBackground(parent.getBackground());
	setLayout(new StackLayout());

	// Load the plot actions and context Menu.
	plotActions = getPlotActions();
	contextMenu = createContextMenu(this);

	return;
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:26,代码来源:PlotComposite.java

示例9: createSourceViewer

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
    Composite composite = new Composite(parent, SWT.NONE);
    GridLayout compositeLayout = new GridLayout(1, false);
    compositeLayout.marginHeight = 0;
    compositeLayout.marginWidth = 0;
    compositeLayout.horizontalSpacing = 0;
    compositeLayout.verticalSpacing = 0;
    composite.setLayout(compositeLayout);

    topPanel = new Composite(composite, SWT.NONE);
    topPanel.setLayout(new StackLayout());
    topPanel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));

    Composite editorComposite = new Composite(composite, SWT.NONE);
    editorComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    FillLayout fillLayout = new FillLayout(SWT.VERTICAL);
    fillLayout.marginHeight = 0;
    fillLayout.marginWidth = 0;
    fillLayout.spacing = 0;
    editorComposite.setLayout(fillLayout);

    ISourceViewer result = doCreateSourceViewer(editorComposite, ruler, styles);

    return result;
}
 
开发者ID:RepreZen,项目名称:KaiZen-OpenAPI-Editor,代码行数:27,代码来源:JsonEditor.java

示例10: createDataset

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
public void createDataset(Composite composite) {
	sComposite = new Composite(composite, SWT.NONE);
	stacklayout = new StackLayout();
	sComposite.setLayout(stacklayout);
	sComposite.setLayoutData(new GridData(GridData.FILL_BOTH));

	map.put(JRDesignCategoryDataset.class, new DSCategory(sComposite, this));
	map.put(JRDesignGanttDataset.class, new DSGantt(sComposite, this));
	map.put(JRDesignHighLowDataset.class, new DSHighLow(sComposite, this));
	map.put(JRDesignPieDataset.class, new DSPie(sComposite, this));
	map.put(JRDesignTimePeriodDataset.class, new DSTimePeriod(sComposite,
			this));
	map.put(JRDesignTimeSeriesDataset.class, new DSTimeSeries(sComposite,
			this));
	map.put(JRDesignValueDataset.class, new DSValue(sComposite, this));
	map.put(JRDesignXyDataset.class, new DSXy(sComposite, this));
	map.put(JRDesignXyzDataset.class, new DSXyz(sComposite, this));
	// here we can add other datasources ...
	map.put(StandardSpiderDataset.class, new DSSpider(sComposite, this));

	stacklayout.topControl = map.get(JRDesignCategoryDataset.class)
			.getControl();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:24,代码来源:DatasetSeriesWidget.java

示例11: TFContainer

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
public TFContainer(Composite parent, int style) {
	super(parent, style);
	GridLayout layout = new GridLayout(2,false);
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	layout.verticalSpacing = 0;
	setLayout(layout);

	toolBar = new ToolBar(this, SWT.HORIZONTAL | SWT.FLAT | SWT.WRAP | SWT.RIGHT);
	
	additionalToolbar = new ToolBar(this, SWT.HORIZONTAL | SWT.FLAT | SWT.WRAP | SWT.RIGHT);
	GridData additionalToolbarGD = new GridData(SWT.RIGHT, SWT.CENTER, true, false);
	additionalToolbar.setLayoutData(additionalToolbarGD);
	additionalToolbarManager = new ToolBarManager(additionalToolbar);
	
	content = new Composite(this, SWT.NONE);
	stackLayout = new StackLayout();
	stackLayout.marginWidth = 0;
	stackLayout.marginHeight = 0;
	content.setLayout(stackLayout);
	content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:23,代码来源:TFContainer.java

示例12: createPartControl

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Override
public void createPartControl(Composite parent) {

	fParent= new Composite(parent, SWT.NONE);
	fStackLayout= new StackLayout();
	fParent.setLayout(fStackLayout);

	fViewerComposite= new Composite(fParent, SWT.NONE);
	fViewerComposite.setLayout(new FillLayout());

	super.createPartControl(fViewerComposite);

	fStackLayout.topControl= fViewerComposite;
	fParent.layout();

	try {
		verifyInput(getEditorInput());
	} catch (CoreException e) {
		String title= JavaEditorMessages.ClassFileEditor_error_title;
		String message= JavaEditorMessages.ClassFileEditor_error_message;
		ExceptionHandler.handle(e, fParent.getShell(), title, message);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:24,代码来源:ClassFileEditor.java

示例13: performUpdate

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Override
public void performUpdate() {
	// TODO Auto-generated method stub
	//if (this.softwareService == data.getSoftwareService()) return;

	Overview overviewModel = data.getOverviewModel();
	this.softwareService = data.getSoftwareService();
	System.out.println("Model: "+overviewModel.getArchitecture().getCloudEnvironments().get(0).getSoftwareLayer().getServices().get(0).getName());
	System.out.println("Software Service: "+this.softwareService.getName());
	
	if (softwareService.getRequiredInterfaces().isEmpty())
	{
		((StackLayout)container.getLayout()).topControl = emptyComposite;
		checkComplete();
	}
	else
	{
		((StackLayout)container.getLayout()).topControl = mainComposite;
		initBindings();
		createServiceComponent();
		checkComplete();
	}

	container.layout();
	container.redraw();
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:27,代码来源:RequiredInterfacesWizardPage.java

示例14: updateServiceComopsite

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
private void updateServiceComopsite()
{
       StackLayout layout = (StackLayout)stackedComposite.getLayout();
       if (rbIaaS.getSelection())
       {
               layout.topControl = cIaaS;
       }
       if (rbPaaS.getSelection())
       {
               layout.topControl = cPaaS;
       }
       if (rbSaaS.getSelection())
       {
               layout.topControl = cSaaS;
               
       }
       if (rbExternal.getSelection())
       {
               layout.topControl = cExternal;
       }

       stackedComposite.layout();
	updateDeploymentComposite();
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:25,代码来源:ProvidedServiceComposite.java

示例15: createDataDragSource

import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Override
public Composite createDataDragSource( Composite parent )
{
	cmpStack = new Composite( parent, SWT.NONE );
	cmpStack.setLayoutData( new GridData( GridData.FILL_BOTH ) );
	stackLayout = new StackLayout( );
	stackLayout.marginHeight = 0;
	stackLayout.marginWidth = 0;
	cmpStack.setLayout( stackLayout );

	cmpCubeTree = this.createTreeViewComposite( cmpStack );
	cmpDataPreview = this.createTableViewComposite( cmpStack );
	cmpColumnsList = this.createColumnListViewComposite( cmpStack );

	updateDragDataSource( );
	return cmpStack;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:18,代码来源:StandardChartDataSheet.java


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