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


Java ExpandableComposite.TITLE_BAR属性代码示例

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


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

示例1: createSection

/**
 * Adds a standardized section to the form part. This is intended to give a unified look and feel to the forms parts.
 * 
 * @param parent
 *            component to contribute to
 * @param text
 *            title of the section
 * @param icon
 *            image to set in the section
 * @return Section object
 */
public static Section createSection(FormToolkit toolkit, Composite parent, String text, Image icon, int style) {
	style = style | (text == null ? ExpandableComposite.NO_TITLE : ExpandableComposite.TITLE_BAR);
	Section section = toolkit.createSection(parent, style);
	if (icon != null) {
		Label label = toolkit.createLabel(section, "");
		label.setImage(icon);
		section.setTextClient(label);
	}
	GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, false);
	layoutData.horizontalSpan = 2;
	layoutData.verticalIndent = 6;
	section.setLayoutData(layoutData);
	if (text != null) {
		section.setText(text);
	}
	return section;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:28,代码来源:DetailFormToolkit.java

示例2: addSection

/**
 * Adds a standardized section to the form part. This is intended
 * to give a unified look and feel to the forms parts
 */
protected Section addSection(Composite parent, String text) {
	IManagedForm mForm = getManagedForm();
	FormToolkit toolkit = mForm.getToolkit();
	int style = (text == null ? ExpandableComposite.NO_TITLE : ExpandableComposite.TITLE_BAR);
	Section section = toolkit.createSection(parent, style);
	// this ensures that the section will fill up as much space as is available
	section.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
	Control buttonComposite = buildButtonComposite(section);
	if (buttonComposite != null) section.setTextClient(buttonComposite);
	if (text != null) {
		section.setText(text);
	}
	return section;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:18,代码来源:DetailFormPart.java

示例3: IvyInfoSection

public IvyInfoSection(IFormPage page, Composite parent, int style, boolean titleBar) {
    super(parent, page.getManagedForm().getToolkit(),
            titleBar ? (ExpandableComposite.TITLE_BAR | style) : style);
    this.page = page;
    createClient(getSection(), page.getEditor().getToolkit());
    getSection().setText("General Information");
    // ((IvyFileEditorInput)page.getEditorInput()).addPropertyChangeListener(this);
}
 
开发者ID:apache,项目名称:ant-ivyde,代码行数:8,代码来源:IvyInfoSection.java

示例4: AbstractSection

public AbstractSection(AbstractFormPage page, Composite parent) {
	super(parent, page.getEditor().getToolkit(), Section.DESCRIPTION | 
													ExpandableComposite.TITLE_BAR | 
													ExpandableComposite.TWISTIE  | 
													ExpandableComposite.EXPANDED );
	this.page = page;
	initialize(page.getManagedForm());
	getSection().clientVerticalSpacing = 4;
	getSection().setData("part", this); //$NON-NLS-1$
	createClient(getSection(), page.getEditor().getToolkit());
}
 
开发者ID:chrisGerken,项目名称:transformAuthoring,代码行数:11,代码来源:AbstractSection.java

示例5: IvyConfSection

public IvyConfSection(IFormPage page, Composite parent, int style, boolean titleBar) {
    super(parent, page.getManagedForm().getToolkit(),
            titleBar ? (ExpandableComposite.TITLE_BAR | style) : style);
    this.page = page;
    createClient(getSection(), page.getEditor().getToolkit());
}
 
开发者ID:apache,项目名称:ant-ivyde,代码行数:6,代码来源:IvyConfSection.java


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