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


Java Composite.setLayout方法代码示例

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


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

示例1: createPartControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createPartControl ( final Composite parent )
{
    parent.setLayout ( new FillLayout () );

    this.wrapper = new Composite ( parent, SWT.NONE );
    this.wrapper.setLayout ( GridLayoutFactory.slimStack () );

    this.shell = parent.getShell ();

    PlatformUI.getWorkbench ().getHelpSystem ().setHelp ( this.wrapper, "org.eclipse.scada.ui.chart.view.chartView" ); //$NON-NLS-1$

    fillMenu ( getViewSite ().getActionBars ().getMenuManager () );
    fillToolbar ( getViewSite ().getActionBars ().getToolBarManager () );

    createChartControl ( parent );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:AbstractChartView.java

示例2: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public void createControl(Composite parent) {
	Composite container = new Composite(parent, SWT.NULL);
	GridLayout layout = new GridLayout();
	container.setLayout(layout);
	layout.numColumns = numColumns;
	layout.verticalSpacing = 10;
	
	createXPath(container);
	createInfos(container);
	createTable(container);
	//createKTable(container);
	
	fillXMLTableDescription();
	
	setControl(container);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:17,代码来源:XMLTableWizardPage.java

示例3: createComposite

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * This method initializes composite	
 *
 */
private void createComposite() {
	GridData gridData7 = new org.eclipse.swt.layout.GridData();
	gridData7.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData7.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	GridData gridData4 = new org.eclipse.swt.layout.GridData();
	gridData4.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gridData4.grabExcessHorizontalSpace = false;
	gridData4.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
	GridLayout gridLayout4 = new GridLayout();
	gridLayout4.numColumns = 2;
	compositeOutputFooter = new Composite(compositeOutput, SWT.NONE);
	compositeOutputFooter.setBackground(new Color(Display.getCurrent(), 162, 194, 250));
	compositeOutputFooter.setLayout(gridLayout4);
	compositeOutputFooter.setLayoutData(gridData4);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:20,代码来源:SequenceEditorPart.java

示例4: createPartControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createPartControl ( final Composite parent )
{
    final GridLayout layout = new GridLayout ( 1, false );
    layout.horizontalSpacing = layout.verticalSpacing = 0;
    layout.marginHeight = layout.marginWidth = 0;

    parent.setLayout ( layout );

    this.stateLabel = new Label ( parent, SWT.NONE );
    this.stateLabel.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, false ) );

    final Composite wrapper = new Composite ( parent, SWT.NONE );
    wrapper.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true ) );

    this.viewer = EventViewHelper.createTableViewer ( wrapper, getViewSite (), this.events );

    hookContextMenu ();
    addSelectionListener ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:21,代码来源:EventQueryView.java

示例5: createViewerToolTipContentArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Composite createViewerToolTipContentArea(Event event, ViewerCell cell, Composite parent) {
    final Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));
    composite.setBackground(rowColorBack);
    Plugin plugin = (Plugin) cell.getElement();

    Hyperlink button = new Hyperlink(composite, SWT.FLAT);
    button.setText("\uf05A");
    button.setFont(fontAwesome);
    button.setBackground(composite.getBackground());
    button.setForeground(rowColorTitle);
    button.setUnderlined(false);
    button.addListener (SWT.MouseDown, e -> Program.launch(GLUON_PLUGIN_URL + plugin.getUrl()));
    button.setToolTipText("Click to access the service's JavaDoc");

    Label text = new Label(composite, SWT.LEFT);
    final String description = plugin.getDescription();
    text.setText(description.contains(".") ? description.substring(0, description.indexOf(".")) : description);
    text.setBackground(composite.getBackground());
    text.setForeground(rowColorTitle);
    composite.pack();
    return composite;
}
 
开发者ID:gluonhq,项目名称:ide-plugins,代码行数:25,代码来源:PluginsSWT.java

示例6: createPartControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createPartControl(Composite content) {

	content.setLayout(new GridLayout(1, false));
	Util.removeMargins(content);

	this.viewer   = new TableViewer(content, SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
	viewer.setUseHashlookup(true);
	viewer.getTable().setHeaderVisible(true);
	viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

	createColumns();
	viewer.setContentProvider(createContentProvider());

	try {
		queueConnection = service.createSubmitter(getUri(), getSubmissionQueueName());
		queueConnection.setStatusTopicName(getTopicName());
		updateQueue();

		String name = getSecondaryIdAttribute("partName");
		if (name!=null) setPartName(name);

		createActions();

		// We just use this submitter to read the queue
		createTopicListener(getUri());

	} catch (Exception e) {
		logger.error("Cannot listen to topic of command server!", e);
	}

	selectionProvider = new DelegatingSelectionProvider(viewer);
	getViewSite().setSelectionProvider(selectionProvider);
	viewer.addSelectionChangedListener(event -> updateSelected() );
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:36,代码来源:StatusQueueView.java

示例7: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {

	isAnyUpdatePerformed = false;
    getShell().setText(Constants.PARTITION_KEYS_WINDOW_TITLE);
	
	container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(1, false));
	
	SashForm outterSashForm = new SashForm(container, SWT.BORDER);
	outterSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	PartKeyComposite = new Composite(outterSashForm, SWT.NONE);
	addButtonPanel(PartKeyComposite);
	SashForm srcTgtTableSashForm = new SashForm(PartKeyComposite, SWT.NONE);
	srcTgtTableSashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	createSourceTable(srcTgtTableSashForm);
	createTargetTable(srcTgtTableSashForm);
	
	partkeyValueComposite = new Composite(outterSashForm, SWT.NONE);
	createKeyValueComposite(partkeyValueComposite);
	
	outterSashForm.setWeights(new int[] {451, 176});
	
	checkTargetFieldsSequence();
	
	getShell().setMinimumSize(400,500);
	return container;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:35,代码来源:HivePartitionKeyValueDialog.java

示例8: main

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public static void main(String[] args) {
  // create a shell...
  Display display = new Display();
  Shell shell = new Shell(display);
  shell.setLayout(new FillLayout());
  shell.setText("KTable examples");

  // put a tab folder in it...
  TabFolder tabFolder = new TabFolder(shell, SWT.NONE);

  // Item 1: a Text Table
  TabItem item1 = new TabItem(tabFolder, SWT.NONE);
  item1.setText("Text Table");
  Composite comp1 = new Composite(tabFolder, SWT.NONE);
  item1.setControl(comp1);
  comp1.setLayout(new FillLayout());

  // put a table in tabItem1...
  KTable table = new KTable(comp1, SWT.V_SCROLL | SWT.H_SCROLL);
  table.setRowSelectionMode(true);
  //table.setMultiSelectionMode(true);
  table.setModel(new KTableModelExample());

  // display the shell...
  shell.setSize(600, 600);
  shell.open();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch())
      display.sleep();
  }
  display.dispose();
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:33,代码来源:KTable.java

示例9: createPropertiesGroup

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * 
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
	Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
	propertiesSection.setText(MetamodelMessages.DiracDeltaPropertiesEditionPart_PropertiesGroupLabel);
	GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
	propertiesSectionData.horizontalSpan = 3;
	propertiesSection.setLayoutData(propertiesSectionData);
	Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
	GridLayout propertiesGroupLayout = new GridLayout();
	propertiesGroupLayout.numColumns = 3;
	propertiesGroup.setLayout(propertiesGroupLayout);
	propertiesSection.setClient(propertiesGroup);
	return propertiesGroup;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:17,代码来源:DiracDeltaPropertiesEditionPartForm.java

示例10: createFigure

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
 * 			createFigure(org.eclipse.swt.widgets.Composite)
 * @generated
 */
public Composite createFigure(final Composite parent) {
	view = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	view.setLayout(layout);
	createControls(view);
	return view;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:16,代码来源:AnalyzedSystemPropertiesEditionPartImpl.java

示例11: createFigure

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
 * 			createFigure(org.eclipse.swt.widgets.Composite)
 * 
 */
public Composite createFigure(final Composite parent) {
	view = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	view.setLayout(layout);
	createControls(view);
	return view;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:16,代码来源:GeometricPropertiesEditionPartImpl.java

示例12: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Control createDialogArea ( final Composite parent )
{
    final Composite composite = (Composite)super.createDialogArea ( parent );
    getShell ().setMinimumSize ( 100, 360 );
    composite.setLayout ( new FillLayout () );
    this.view = new DetailsViewComposite ( composite, SWT.NONE );
    this.view.setDataItem ( this.item );

    return composite;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:12,代码来源:DataItemDetailsDialog.java

示例13: createPropertiesGroup

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * 
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
	Section propertiesSection = widgetFactory.createSection(parent,
			Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
	propertiesSection.setText(HrmMessages.GeneralPropertiesEditionPart_PropertiesGroupLabel);
	GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
	propertiesSectionData.horizontalSpan = 3;
	propertiesSection.setLayoutData(propertiesSectionData);
	Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
	GridLayout propertiesGroupLayout = new GridLayout();
	propertiesGroupLayout.numColumns = 3;
	propertiesGroup.setLayout(propertiesGroupLayout);
	propertiesSection.setClient(propertiesGroup);
	return propertiesGroup;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:18,代码来源:GeneralPropertiesEditionPartForm.java

示例14: createInputFieldExpandBarSection

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private void createInputFieldExpandBarSection(Composite composite) {
	Composite composite_1 = new Composite(composite, SWT.NONE);
	GridLayout gl_composite_1 = new GridLayout(1, false);
	gl_composite_1.horizontalSpacing = 0;
	gl_composite_1.verticalSpacing = 0;
	gl_composite_1.marginWidth = 0;
	gl_composite_1.marginHeight = 0;
	composite_1.setLayout(gl_composite_1);
	GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, false, true,
			1, 1);
	gd_composite_1.widthHint = 276;
	composite_1.setLayoutData(gd_composite_1);
	composite_1.setBounds(0, 0, 64, 64);

	final ScrolledComposite scrolledComposite_1 = new ScrolledComposite(
			composite_1, SWT.BORDER | SWT.V_SCROLL );
	scrolledComposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
			true, true, 1, 1));
	scrolledComposite_1.setExpandHorizontal(true);
	scrolledComposite_1.setExpandVertical(true);
	
	Composite composite_7 = new Composite(scrolledComposite_1, SWT.NONE);
	composite_7.setLayout(new GridLayout(1, false));

	final ExpandBar expandBar = new ExpandBar(composite_7, SWT.H_SCROLL);
	expandBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,
			1));
	
	expandBar.setBackground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 240, 240, 240));
	populateInputFieldExpandBarSection(expandBar);

	expandBar.getItem(0).setExpanded(true);

	scrolledComposite_1.setContent(composite_7);
	scrolledComposite_1.setMinSize(composite_7.computeSize(SWT.DEFAULT,
			SWT.DEFAULT));
	
	
	composite_7.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent e) {
			
			for(ExpandItem expandItem:expandBar.getItems()){
				((TableColumn)expandItem.getData("TableColumn")).setWidth(scrolledComposite_1.getSize().x);
			}
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:49,代码来源:JoinMapDialog.java

示例15: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
	/* Titre dialogue. */
	this.getShell().setText("About KSP Plugin");

	/* Layout */
	Composite container = (Composite) super.createDialogArea(parent);
	GridLayout layout = new GridLayout(1, false);
	layout.marginRight = 5;
	layout.marginLeft = 10;
	Color white = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);
	container.setBackground(white);
	container.setLayout(layout);

	/* Logo */
	Label lblLogo = new Label(container, SWT.NONE);
	lblLogo.setBackgroundImage(getImage());
	lblLogo.setBackground(white);
	lblLogo.setText("      ");
	lblLogo.setSize(LOGO_SIZE, LOGO_SIZE);

	/* Produit */
	Label lblProduct = new Label(container, SWT.NONE);
	lblProduct.setText("Vertigo Chroma KSP Plugin");
	lblProduct.setBackground(white);

	/* Version */
	Version version = FrameworkUtil.getBundle(getClass()).getVersion();
	String fullVersion = version.toString();
	Label lblVersion = new Label(container, SWT.NONE);
	lblVersion.setText("Version : " + fullVersion);
	lblVersion.setBackground(white);

	/* Version */
	Label lblAuthor = new Label(container, SWT.NONE);
	lblAuthor.setText("Author : @sebez");
	lblAuthor.setBackground(white);

	/* Libellé documentation */
	Label lblDoc = new Label(container, SWT.NONE);
	lblDoc.setText("Documentation, sources, releases are published in the KSP plugin github repository : ");
	lblDoc.setBackground(white);

	/* Lien vers le github */
	Link link = new Link(container, SWT.NONE);
	String message = "<a href=\"" + GITHUB_URL + "\">" + GITHUB_URL + "</a>";
	link.setText(message);
	link.setBackground(white);
	link.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			Program.launch(GITHUB_URL);
		}
	});

	return container;
}
 
开发者ID:sebez,项目名称:vertigo-chroma-kspplugin,代码行数:58,代码来源:AboutDialog.java


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