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


Java ExpandableComposite.setLayoutData方法代码示例

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


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

示例1: initAdditionalParametersUi

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initAdditionalParametersUi() {
		ExpandableComposite exp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
		exp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
		
		additonalParameters = new Text(exp, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
	    additonalParameters.setLayoutData(new GridData(GridData.FILL_BOTH));
		additonalParameters.setToolTipText("Advanced parameters for Text2Image - use key=value format in each line!");
//		advancedParameters.setText("hyphen=null\n");
		
//		advancedPropertiesTable = buildPropertyTable(exp, true);
		
		exp.setClient(additonalParameters);
		exp.setText("Additional Parameters");
//		Fonts.setBoldFont(exp);
		exp.setExpanded(true);
		exp.addExpansionListener(new ExpansionAdapter() {
			public void expansionStateChanged(ExpansionEvent e) {
				layout();
			}
		});
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:22,代码来源:Text2ImageConfComposite.java

示例2: initRecogTools

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initRecogTools() {
	ExpandableComposite exp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
	exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	trComp = new TextRecognitionComposite(exp, 0);
	trComp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
	
	exp.setClient(trComp);
	exp.setText("Text Recognition");
	Fonts.setBoldFont(exp);
	exp.setExpanded(true);
	exp.addExpansionListener(new ExpansionAdapter() {
		public void expansionStateChanged(ExpansionEvent e) {
			layout();
		}
	});
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:18,代码来源:ToolsWidget.java

示例3: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) {
	ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE,
			ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
	excomposite.setText(label);
	excomposite.setExpanded(false);
	excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
	excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
	excomposite.addExpansionListener(new ExpansionAdapter() {
		public void expansionStateChanged(ExpansionEvent e) {
			expandedStateChanged((ExpandableComposite) e.getSource());
		}
	});
	fExpandedComposites.add(excomposite);
	makeScrollableCompositeAware(excomposite);
	return excomposite;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:17,代码来源:OptionsConfigurationBlock.java

示例4: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) {
	ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE
			| ExpandableComposite.CLIENT_INDENT);
	excomposite.setText(label);
	excomposite.setExpanded(false);
	excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
	excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
	excomposite.addExpansionListener(new ExpansionAdapter() {
		@Override
		public void expansionStateChanged(ExpansionEvent e) {
			expandedStateChanged((ExpandableComposite) e.getSource());
		}
	});
	expandedComposites.add(excomposite);
	makeScrollableCompositeAware(excomposite);
	return excomposite;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:18,代码来源:OptionsConfigurationBlock.java

示例5: createProblemCategory

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private Composite createProblemCategory(Composite parent, String label) {
  // Expandable panel for each category of problems
  ExpandableComposite expandPanel = new ExpandableComposite(parent, SWT.NONE,
      ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
  expandPanel.setText(label);
  expandPanel.setExpanded(false);
  expandPanel.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
  expandPanel.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
  expandPanel.addExpansionListener(new ExpansionAdapter() {
    @Override
    public void expansionStateChanged(ExpansionEvent e) {
      topPanel.layout(true, true);
      scrollPanel.setMinSize(topPanel.computeSize(SWT.DEFAULT, SWT.DEFAULT));
    }
  });

  // Create panel to store the actual problems
  Composite categoryPanel = new Composite(expandPanel, SWT.NONE);
  categoryPanel.setLayout(new GridLayout(2, false));
  expandPanel.setClient(categoryPanel);

  return categoryPanel;
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:24,代码来源:ErrorsWarningsPage.java

示例6: createDiffViewer

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
/**
 * Creates an individual diff viewer in the given composite.
 */
private void createDiffViewer(final FormToolkit toolkit, Composite composite,
    final TaskAttribute diffTaskAttribute) {

  int style = ExpandableComposite.TREE_NODE | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT
      | ExpandableComposite.COMPACT;
  ExpandableComposite diffComposite = toolkit.createExpandableComposite(composite, style);
  diffComposite.clientVerticalSpacing = 0;
  diffComposite.setLayout(new GridLayout());
  diffComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  diffComposite.setTitleBarForeground(toolkit.getColors().getColor(IFormColors.TITLE));
  diffComposite.setText(calculateDiffChangeHeader(diffTaskAttribute));

  final Composite diffViewerComposite = toolkit.createComposite(diffComposite);
  diffComposite.setClient(diffViewerComposite);
  diffViewerComposite.setLayout(
      new FillWidthLayout(EditorUtil.getLayoutAdvisor(getTaskEditorPage()), 15, 0, 0, 3));

  diffComposite.addExpansionListener(new ExpansionAdapter() {
    @Override
    public void expansionStateChanged(ExpansionEvent event) {
      expandCollapseDiff(toolkit, diffViewerComposite, diffTaskAttribute, event.getState());
    }
  });
  GridDataFactory.fillDefaults().grab(true, false).applyTo(diffComposite);
}
 
开发者ID:google,项目名称:git-appraise-eclipse,代码行数:29,代码来源:AppraiseDiffViewerPart.java

示例7: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns, Key key) {
	ExpandableComposite excomposite= new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
	excomposite.setText(label);
	if (key != null) {
		excomposite.setData(key);
	}
	excomposite.setExpanded(false);
	excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
	excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
	excomposite.addExpansionListener(new ExpansionAdapter() {
		@Override
		public void expansionStateChanged(ExpansionEvent e) {
			expandedStateChanged((ExpandableComposite) e.getSource());
		}
	});
	fExpandableComposites.add(excomposite);
	makeScrollableCompositeAware(excomposite);
	return excomposite;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:OptionsConfigurationBlock.java

示例8: createSecondSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void createSecondSection( ScrolledForm form, FormToolkit toolkit) {
	ExpandableComposite ec = toolkit.createExpandableComposite(form.getBody(), 
		     ExpandableComposite.TREE_NODE|
		     ExpandableComposite.CLIENT_INDENT);
		 ec.setText("Expandable Composite title");
		 String ctext = "We will now create a somewhat long text so that "+
		 "we can use it as content for the expandable composite. "+
		 "Expandable composite is used to hide or show the text using the " +
		 "toggle control";
		 Label client = toolkit.createLabel(ec, ctext, SWT.WRAP);
		 ec.setClient(client);
		 TableWrapData  td = new TableWrapData();
		 td.colspan = 2;
		 ec.setLayoutData(td);
		 ec.addExpansionListener(new ExpansionAdapter() {
		  @Override
		public void expansionStateChanged(ExpansionEvent e) {
		   form.reflow(true);
		  }
		 });

	
}
 
开发者ID:vogellacompany,项目名称:codeexamples-eclipse,代码行数:24,代码来源:FormsPart.java

示例9: createExpandableComposite

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void createExpandableComposite() {
  expandableComposite = new ExpandableComposite(this, SWT.NONE, ExpandableComposite.TWISTIE);
  FontUtil.convertFontToBold(expandableComposite);
  expandableComposite.setText(Messages.getString("settings.advanced"));
  expandableComposite.setExpanded(false);
  GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
  gridData.horizontalSpan = 2;
  expandableComposite.setLayoutData(gridData);

  formToolkit.adapt(expandableComposite, true, true);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:12,代码来源:AppEngineDeployPreferencesPanel.java

示例10: optionsTypeSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private ExpandableComposite optionsTypeSection(PipelineLaunchConfiguration launchConfiguration,
    String optionsTypeName, Collection<String> optionsTypeProperties,
    Map<String, Optional<String>> optionsDescriptions, int style) {
  ExpandableComposite expandable = formToolkit.createSection(form.getBody(), style);
  expandable.setLayout(new GridLayout());
  expandable.setBackground(parent.getBackground());
  expandable.setForeground(parent.getForeground());
  expandable.setText(optionsTypeName);
  expandable.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

  LabeledTextMapComponent typeArgs = new LabeledTextMapComponent(formToolkit, expandable,
      new GridData(SWT.FILL, SWT.CENTER, true, false), argumentSeparator);

  for (ModifyListener modifyListener : modifyListeners) {
    typeArgs.addModifyListener(modifyListener);
  }
  for (IExpansionListener expandListener : expansionListeners) {
    expandable.addExpansionListener(expandListener);
  }
  for (String property : optionsTypeProperties) {
    typeArgs.addLabeledText(property, optionsDescriptions.get(property));
  }

  optionsComponents.put(expandable, typeArgs);
  expandable.setClient(typeArgs.getControl());
  typeArgs.setTextValuesForExistingLabels(launchConfiguration.getArgumentValues());

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

示例11: initOtherTools

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initOtherTools() {
	ExpandableComposite exp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
	exp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	Composite c = new Composite(exp, SWT.SHADOW_ETCHED_IN);
	c.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	c.setLayout(new GridLayout(1, true));
	
	otherToolsPagesSelector = new CurrentTranscriptOrCurrentDocPagesSelector(c, SWT.NONE, true);
	otherToolsPagesSelector.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	polygon2baselinesBtn = new Button(c, SWT.PUSH);
	polygon2baselinesBtn.setText("Add Baselines to Polygons");
	polygon2baselinesBtn.setToolTipText("Creates baselines for all surrounding polygons - warning: existing baselines will be lost (text is retained however!)");
	polygon2baselinesBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	
	baseline2PolygonBtn = new Button(c, SWT.PUSH);
	baseline2PolygonBtn.setText("Add Polygons to Baselines");
	baseline2PolygonBtn.setToolTipText("Creates polygons for all baselines - warning: existing polygons will be lost (text is retained however!)");
	baseline2PolygonBtn.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
			
	exp.setClient(c);
	new Label(c, SWT.NONE);
	exp.setText("Other Tools");
	Fonts.setBoldFont(exp);
	exp.setExpanded(true);
	exp.addExpansionListener(new ExpansionAdapter() {
		public void expansionStateChanged(ExpansionEvent e) {
			layout();
		}
	});
}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:32,代码来源:ToolsWidget.java

示例12: initWerGroup

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
private void initWerGroup() {
		werExp = new ExpandableComposite(this, ExpandableComposite.COMPACT);
		werExp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
		werGroup = new Composite(werExp, SWT.SHADOW_ETCHED_IN);
		werGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
//		metadatagroup.setText("Document metadata");
		werGroup.setLayout(new GridLayout(2, false));
		
		refVersionChooser = new TranscriptVersionChooser("Reference:\n(Correct Text) ", werGroup, 0);
		refVersionChooser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
		
		hypVersionChooser = new TranscriptVersionChooser("Hypothesis:\n(HTR Text) ", werGroup, 0);
		hypVersionChooser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));		
				
		Label emptyLabel = new Label(werGroup,0);
		computeWerBtn = new Button(werGroup, SWT.PUSH);
		computeWerBtn.setText("Compare");
		computeWerBtn.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 2, 1));
		computeWerBtn.setToolTipText("Compares the two selected transcripts and computes word error rate and character error rate.");
//		computeWerBtn.pack();
		
		compareVersionsBtn = new Button(werGroup, SWT.PUSH);
		compareVersionsBtn.setText("Compare Versions in Textfile");
		compareVersionsBtn.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true, 2, 1));
		compareVersionsBtn.setToolTipText("Shows the difference of the two selected versions");
		
		werExp.setClient(werGroup);
		werExp.setText("Compute Accuracy");
		Fonts.setBoldFont(werExp);
		werExp.setExpanded(true);
		werExp.addExpansionListener(new ExpansionAdapter() {
			public void expansionStateChanged(ExpansionEvent e) {
				layout();
			}
		});
	}
 
开发者ID:Transkribus,项目名称:TranskribusSwtGui,代码行数:37,代码来源:ToolsWidget.java

示例13: createSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
/**
 * Creates an expandable section within the parent created previously by calling
 * <code>createSectionComposite</code>. Controls can be added directly to the returned
 * composite, which has no layout initially.
 *
 * @param label the display name of the section
 * @return a composite within the expandable section
 */
public Composite createSection(String label) {
	Assert.isNotNull(fBody);
	final ExpandableComposite excomposite = new ExpandableComposite(fBody, SWT.NONE,
			ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT | ExpandableComposite.COMPACT);
	if (fFirstChild == null) fFirstChild = excomposite;
	excomposite.setText(label);
	String last = null;
	if (fLastOpenKey != null && fDialogSettingsStore != null)
		last = fDialogSettingsStore.getString(fLastOpenKey);

	if (fFirstChild == excomposite && !__NONE.equals(last) || label.equals(last)) {
		excomposite.setExpanded(true);
		if (fFirstChild != excomposite) fFirstChild.setExpanded(false);
	} else {
		excomposite.setExpanded(false);
	}
	excomposite.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));

	updateSectionStyle(excomposite);
	manage(excomposite);

	Composite contents = new Composite(excomposite, SWT.NONE);
	excomposite.setClient(contents);

	return contents;
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:35,代码来源:AbstractConfigurationBlock.java

示例14: createStyleSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
protected ExpandableComposite createStyleSection(Composite parent, String label, int nColumns) {
	ExpandableComposite excomposite= new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT);
	excomposite.setText(label);
	excomposite.setExpanded(false);
	excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
	excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1));
	excomposite.addExpansionListener(new ExpansionAdapter() {
		public void expansionStateChanged(ExpansionEvent e) {
			expandedStateChanged((ExpandableComposite) e.getSource());
		}
	});
	//fExpandables.add(excomposite);
	makeScrollableCompositeAware(excomposite);
	return excomposite;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:16,代码来源:AbstractWizardNewTypeScriptProjectCreationPage.java

示例15: createSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入方法依赖的package包/类
/**
 * Creates an expandable section within the parent created previously by
 * calling <code>createSectionComposite</code>. Controls can be added
 * directly to the returned composite, which has no layout initially.
 *
 * @param label the display name of the section
 * @return a composite within the expandable section
 */
public Composite createSection(String label) {
	Assert.isNotNull(fBody);
	final ExpandableComposite excomposite= new ExpandableComposite(fBody, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT | ExpandableComposite.COMPACT);
	if (fFirstChild == null)
		fFirstChild= excomposite;
	excomposite.setText(label);
	String last= null;
	if (fLastOpenKey != null && fDialogSettingsStore != null)
		last= fDialogSettingsStore.getString(fLastOpenKey);

	if (fFirstChild == excomposite && !__NONE.equals(last) || label.equals(last)) {
		excomposite.setExpanded(true);
		if (fFirstChild != excomposite)
			fFirstChild.setExpanded(false);
	} else {
		excomposite.setExpanded(false);
	}
	excomposite.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));

	updateSectionStyle(excomposite);
	manage(excomposite);

	Composite contents= new Composite(excomposite, SWT.NONE);
	excomposite.setClient(contents);

	return contents;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:36,代码来源:AbstractConfigurationBlock.java


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