本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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());
}
示例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());
}