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


Java ExpandableComposite类代码示例

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


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

示例1: createSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入依赖的package包/类
/**
 * @see org.yakindu.sct.editor.sgen.extensions.IFeatureConfigurationSection#getSection()
 */
@Override
public Section createSection(final FormToolkit toolkit, final Composite parent) {
	this.section = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE);
	this.section.setText(convertCamelCaseName(getFeatureType().getName(), !getFeatureType().isOptional()));
	this.section.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.FILL_GRAB));

	final Composite composite = toolkit.createComposite(this.section);
	final TableWrapLayout layout = new TableWrapLayout();
	layout.numColumns = 2;
	composite.setLayout(layout);

	for (final FeatureParameter parameter : getFeatureType().getParameters()) {
		final Control control = createParameterControl(toolkit, composite, parameter);
		this.controls.put(parameter, control);
	}

	this.section.setClient(composite);

	return this.section;
}
 
开发者ID:wendehals,项目名称:arduino_sct_tools,代码行数:24,代码来源:GenericFeatureConfigurationSection.java

示例2: createCountDownSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入依赖的package包/类
private void createCountDownSection() {
	Section countDown = toolkit.createSection(form.getBody(), ExpandableComposite.TWISTIE | Section.DESCRIPTION| ExpandableComposite.TITLE_BAR);
	countDown.setText("Count Down Section");
	countDown.setExpanded(true);
	countDown.setDescription("Time left in the match.");
	Composite countDownClient = toolkit.createComposite(countDown);
	GridLayout gridLayout = new GridLayout();
	gridLayout.numColumns = 5;
	gridLayout.makeColumnsEqualWidth = false;
	countDownClient.setLayout(gridLayout);
	hourCountDownLabel = toolkit.createLabel(countDownClient, "00");
	toolkit.createLabel(countDownClient, ":");
	minuteCountDownLabel = toolkit.createLabel(countDownClient, "00");
	toolkit.createLabel(countDownClient, ":");
	secondsCountDownLabel = toolkit.createLabel(countDownClient, "00");
	countDown.setClient(countDownClient);
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:18,代码来源:CountDownTimerPage.java

示例3: createPlayerSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入依赖的package包/类
private void createPlayerSection() {
	Section playersSection = toolkit.createSection(form.getBody(), ExpandableComposite.TWISTIE | Section.DESCRIPTION| ExpandableComposite.TITLE_BAR);
	playersSection.setText("Player Section");
	playersSection.setExpanded(true);
	playersSection.setDescription("The players that are playing.");
	Composite playerClient = toolkit.createComposite(playersSection);
	GridLayout playerGridLayout = new GridLayout();
	playerGridLayout.numColumns = 2;
	playerClient.setLayout(playerGridLayout);
	
	firstPlayerName = createPlayerNameField(playerClient, "Player 1: ");
	secondPlayerName = createPlayerNameField(playerClient, "Player 2: ");
			
	Button updateButton = toolkit.createButton(playerClient, "Update", SWT.PUSH | SWT.RESIZE);
	GridData updateButtonData = new GridData();
	updateButtonData.horizontalSpan = 2;
	updateButtonData.widthHint = 60;
	updateButtonData.grabExcessHorizontalSpace = true;
	updateButton.setLayoutData(updateButtonData);
	updateButton.addSelectionListener(new PlayerNameUpdateButtonSelectionListener(this));
			
	playersSection.setClient(playerClient);
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:24,代码来源:GeneralFormPage.java

示例4: createScoringSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入依赖的package包/类
private void createScoringSection() {
	Section playersSection = toolkit.createSection(form.getBody(), ExpandableComposite.TWISTIE | Section.DESCRIPTION| ExpandableComposite.TITLE_BAR);
	playersSection.setText("Scoreboard Section");
	playersSection.setExpanded(false);
	playersSection.setDescription("Current scores for the game");
	Composite playerClient = toolkit.createComposite(playersSection);
	GridLayout playerGridLayout = new GridLayout();
	playerGridLayout.numColumns = 2;
	playerClient.setLayout(playerGridLayout);
	
	firstPlayerScore = createPlayerNameField(playerClient, "Player 1: ");
	secondPlayerScore = createPlayerNameField(playerClient, "Player 2: ");
			
	Button updateButton = toolkit.createButton(playerClient, "Update", SWT.PUSH | SWT.RESIZE);
	GridData updateButtonData = new GridData();
	updateButtonData.horizontalSpan = 2;
	updateButtonData.widthHint = 60;
	updateButtonData.grabExcessHorizontalSpace = true;
	updateButton.setLayoutData(updateButtonData);
	updateButton.addSelectionListener(new PlayerScoreUpdateButtonSelectionListener2(this));
			
	playersSection.setClient(playerClient);
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:24,代码来源:GeneralFormPage.java

示例5: createMapSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入依赖的package包/类
private void createMapSection() {
	Section mapSection = toolkit.createSection(form.getBody(),
			ExpandableComposite.TWISTIE | Section.DESCRIPTION | ExpandableComposite.TITLE_BAR);
	mapSection.setText("Skirmish Maps");

	mapSection.setExpanded(true);
	mapSection.setDescription("A list of available skirmish maps.");

	Composite mapComposite = toolkit.createComposite(mapSection);
	GridLayout squadGridLayout = new GridLayout();
	squadGridLayout.numColumns = 3;

	mapComposite.setLayout(squadGridLayout);

	listViewer = new ListViewer(mapComposite, SWT.WRAP | SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
	listViewer.add(SkirmishMapsLookup.getInstance().getMaps().toArray());
	listViewer.addSelectionChangedListener(new LoadMapImageSelectionListener());

	GridData mapSize = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 5);
	mapSize.minimumHeight = 300;
	mapSize.heightHint = 300;
	
	listViewer.getList().setLayoutData(mapSize);
	mapSection.setClient(mapComposite);
}
 
开发者ID:NineWorlds,项目名称:xstreamer,代码行数:26,代码来源:MapsFormPage.java

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

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

示例8: selectOption

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入依赖的package包/类
public void selectOption(Key key) {
	Control control = findControl(key);
	if (control != null) {
		if (!fExpandedComposites.isEmpty()) {
			ExpandableComposite expandable = getParentExpandableComposite(control);
			if (expandable != null) {
				for (int i = 0; i < fExpandedComposites.size(); i++) {
					ExpandableComposite curr = (ExpandableComposite) fExpandedComposites.get(i);
					curr.setExpanded(curr == expandable);
				}
				expandedStateChanged(expandable);
			}
		}
		control.setFocus();
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:17,代码来源:OptionsConfigurationBlock.java

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

示例10: createSection

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入依赖的package包/类
public void createSection(Composite parent) {

		// Don't create section if CF server is not the Pivotal CF server
		if (!CloudFoundryURLNavigation.canEnableCloudFoundryNavigation(getCloudFoundryServer())) {
			return;
		}
		super.createSection(parent);

		FormToolkit toolkit = getFormToolkit(parent.getDisplay());

		Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR);
		section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
		section.setText(Messages.SpringInsightSection_TEXT_SPRING_INSIGHT);
		section.setExpanded(false);

		Composite composite = toolkit.createComposite(section);
		section.setClient(composite);

		GridLayoutFactory.fillDefaults().numColumns(1).margins(10, 5).applyTo(composite);
		GridDataFactory.fillDefaults().grab(true, false).applyTo(composite);

		new GoToSpringLinkWidget(composite, toolkit).createControl();

	}
 
开发者ID:eclipse,项目名称:cft,代码行数:25,代码来源:SpringInsightSection.java

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

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

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

示例14: createControls

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入依赖的package包/类
/**
 * @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
 *      org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
 */
public void createControls(Composite parent,
		TabbedPropertySheetPage tabbedPropertySheetPage) {
	super.createControls(parent, tabbedPropertySheetPage);

	Composite group = getWidgetFactory().createSection(parent,
			com.jaspersoft.studio.messages.Messages.SubTitleSection_Subtitle_Label, true, 2);
	section = (ExpandableComposite)group.getParent();
	
	getWidgetFactory().createCLabel(group,
			com.jaspersoft.studio.messages.Messages.SubTitleSection_Expression_Label);
	createWidget4Property(group,
			JRDesignChart.PROPERTY_SUBTITLE_EXPRESSION, false);

	getWidgetFactory().createCLabel(group,
			com.jaspersoft.studio.messages.Messages.SubTitleSection_Color_Label);
	createWidget4Property(group, JRBaseChart.PROPERTY_SUBTITLE_COLOR, false);

	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 2;
	createWidget4Property(group, JRDesignChart.PROPERTY_SUBTITLE_FONT,
			false).getControl().setLayoutData(gd);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:27,代码来源:SubTitleSection.java

示例15: createControls

import org.eclipse.ui.forms.widgets.ExpandableComposite; //导入依赖的package包/类
@Override
public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
	super.createControls(parent, aTabbedPropertySheetPage);

	Composite group = getWidgetFactory().createComposite(parent);
	group.setLayout(new GridLayout(2, false));

	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 2;
	createWidget4Property(group, TitleSettings.PROPERTY_showTitle, false).getControl().setLayoutData(gd);
	createWidget4Property(group, TitleSettings.PROPERTY_position);
	createWidget4Property(group, TitleSettings.PROPERTY_horizontalAlignment);
	createWidget4Property(group, TitleSettings.PROPERTY_verticalAlignment);
	createWidget4Property(group, TitleSettings.PROPERTY_foregroundPaint);
	createWidget4Property(group, TitleSettings.PROPERTY_backgroundPaint);

	Composite paddingComposite = PadUtil.createWidgets4Property(parent, "", com.jaspersoft.studio.messages.Messages.common_padding, this);
	paddingSection = (ExpandableComposite)paddingComposite.getParent();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:20,代码来源:TitleSettingsSection.java


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