當前位置: 首頁>>代碼示例>>Java>>正文


Java Section.setLayoutData方法代碼示例

本文整理匯總了Java中org.eclipse.ui.forms.widgets.Section.setLayoutData方法的典型用法代碼示例。如果您正苦於以下問題:Java Section.setLayoutData方法的具體用法?Java Section.setLayoutData怎麽用?Java Section.setLayoutData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.ui.forms.widgets.Section的用法示例。


在下文中一共展示了Section.setLayoutData方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createGeneralInformationSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
private void createGeneralInformationSection(Composite parent) {
	FormToolkit toolkit = super.getToolkit();
	Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
	section.setDescription(AngularCLIMessages.AngularCLIEditor_OverviewPage_GeneralInformationSection_desc);
	section.setText(AngularCLIMessages.AngularCLIEditor_OverviewPage_GeneralInformationSection_title);
	TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
	section.setLayoutData(data);

	Composite body = createBody(section);

	// Project name
	createText(body, AngularCLIMessages.AngularCLIEditor_OverviewPage_projectName_label, new JSONPath("project.name"));
	// project version
	createText(body, AngularCLIMessages.AngularCLIEditor_OverviewPage_projectVersion_label, new JSONPath("project.version"));

}
 
開發者ID:angelozerr,項目名稱:angular-eclipse,代碼行數:17,代碼來源:OverviewPage.java

示例2: createDebuggingSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
private void createDebuggingSection(Composite parent) {
	FormToolkit toolkit = super.getToolkit();
	Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
	section.setDescription(TsconfigEditorMessages.OutputPage_DebuggingSection_desc);
	section.setText(TsconfigEditorMessages.OutputPage_DebuggingSection_title);
	TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
	section.setLayoutData(data);
	Composite body = createBody(section);

	createCheckbox(body, TsconfigEditorMessages.OutputPage_sourceMap_label,
			new JSONPath("compilerOptions.sourceMap"));
	createTextAndBrowseButton(body, TsconfigEditorMessages.OutputPage_sourceRoot_label,
			new JSONPath("compilerOptions.sourceRoot"), false);
	createTextAndBrowseButton(body, TsconfigEditorMessages.OutputPage_mapRoot_label,
			new JSONPath("compilerOptions.mapRoot"), false);
	createCheckbox(body, TsconfigEditorMessages.OutputPage_inlineSourceMap_label,
			new JSONPath("compilerOptions.inlineSourceMap"));
	createCheckbox(body, TsconfigEditorMessages.OutputPage_inlineSources_label,
			new JSONPath("compilerOptions.inlineSources"));
}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:21,代碼來源:OutputPage.java

示例3: createReportingSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
private void createReportingSection(Composite parent) {
	FormToolkit toolkit = super.getToolkit();
	Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
	section.setDescription(TsconfigEditorMessages.OutputPage_ReportingSection_desc);
	section.setText(TsconfigEditorMessages.OutputPage_ReportingSection_title);
	TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
	section.setLayoutData(data);

	Composite body = createBody(section);

	createCheckbox(body, TsconfigEditorMessages.OutputPage_diagnostics_label,
			new JSONPath("compilerOptions.diagnostics"));
	createCheckbox(body, TsconfigEditorMessages.OutputPage_pretty_label, new JSONPath("compilerOptions.pretty"));
	createCheckbox(body, TsconfigEditorMessages.OutputPage_traceResolution_label,
			new JSONPath("compilerOptions.traceResolution"));
	createCheckbox(body, TsconfigEditorMessages.OutputPage_listEmittedFiles_label,
			new JSONPath("compilerOptions.listEmittedFiles"));
}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:19,代碼來源:OutputPage.java

示例4: createScopeSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
private void createScopeSection(Composite parent) {
	FormToolkit toolkit = super.getToolkit();
	Section section = toolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
	section.setDescription(TsconfigEditorMessages.FilesPage_ScopeSection_desc);
	section.setText(TsconfigEditorMessages.FilesPage_ScopeSection_title);
	TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
	section.setLayoutData(data);

	Composite client = toolkit.createComposite(section);
	section.setClient(client);
	GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	layout.marginWidth = 2;
	layout.marginHeight = 2;
	client.setLayout(layout);

	Table table = toolkit.createTable(client, SWT.NONE);
	GridData gd = new GridData(GridData.FILL_BOTH);
	gd.heightHint = 200;
	gd.widthHint = 100;
	table.setLayoutData(gd);
}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:23,代碼來源:FilesPage.java

示例5: createSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的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

示例6: createBackCompatibilitySection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
private void createBackCompatibilitySection() {
	Section backCompatibilitySection = new Section(this, ExpandableComposite.TREE_NODE);
	GridData backCompSectionGD = new GridData(SWT.FILL,SWT.FILL,true,false);
	backCompSectionGD.verticalIndent=10;
	backCompatibilitySection.setLayoutData(backCompSectionGD);
	backCompatibilitySection.setLayout(new FillLayout());
	backCompatibilitySection.setText(Messages.JavaExpressionEditorComposite_BackCompatibilitySection);
	Composite composite = new Composite(backCompatibilitySection, SWT.NONE);
	composite.setLayout(new GridLayout(2, false));
	Label lbl1 = new Label(composite, SWT.NONE);
	lbl1.setText(Messages.JavaExpressionEditorComposite_ValueClassMessage); 
	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 2;
	lbl1.setLayoutData(gd);

	valueType = new ClassType(composite, Messages.JavaExpressionEditorComposite_ClassTypeDialogTitle);
	valueType.addListener(new ModifyListener() {

		public void modifyText(ModifyEvent e) {
			valueClassName = valueType.getClassType();
		}
	});
	backCompatibilitySection.setClient(composite);
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:25,代碼來源:JavaExpressionEditorComposite.java

示例7: createSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
/**
 * 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,代碼行數:29,代碼來源:DetailFormToolkit.java

示例8: createCategorySection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
public static Section createCategorySection(FormToolkit toolkit, Composite parent, String category, Image icon, boolean hasTwistie) {
	if (EMFDetailUtils.isCategoryHeaderHidden(category)) {
		category = null;
	}
	Section categorySection = DetailFormToolkit.createSection(toolkit, parent, category, icon, hasTwistie);
    categorySection.clientVerticalSpacing = 0;
    if ((parent.getLayout() instanceof RowLayout) || (parent.getLayout() instanceof ColumnLayout)) {
    	categorySection.setLayoutData(null);
    }
    Composite categorySubSection = toolkit.createComposite(categorySection);
    GridLayout layout = new GridLayout(2, false);
    layout.marginHeight = 3;
    layout.verticalSpacing = 2;
    layout.horizontalSpacing = 10;
    categorySubSection.setLayout(layout);
    categorySection.setClient(categorySubSection);
	return categorySection;
}
 
開發者ID:nasa,項目名稱:OpenSPIFe,代碼行數:19,代碼來源:EMFDetailFormPart.java

示例9: createSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
static public Section createSection(FormToolkit toolkit, Composite parent, String title, int hSpan, int vSpan) {

    	Section section = toolkit.createSection(parent, Section.SHORT_TITLE_BAR);
        GridData osectionGridData = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
        osectionGridData.horizontalSpan = hSpan;
        osectionGridData.verticalSpan = vSpan;
        osectionGridData.horizontalIndent = 5;
        section.setLayoutData(osectionGridData);
        section.setText(title);
        
        GridLayout osectionGL = new GridLayout(1, true);
        osectionGL.marginHeight = 0;
        osectionGL.marginWidth = 0;
        section.setLayout(osectionGL);
        
        return section;
    }
 
開發者ID:OpenNTF,項目名稱:XPagesExtensionLibrary,代碼行數:18,代碼來源:XSPEditorUtil.java

示例10: createPluginsSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
private void createPluginsSection(Composite parent) {
	Section sctnPlugins = createSection(parent, "Plug-ins");
	sctnPlugins.setLayout(FormUtils.createClearTableWrapLayout(false, 1));
	TableWrapData data = new TableWrapData(TableWrapData.FILL_GRAB);
	sctnPlugins.setLayoutData(data);

	FormText text = formToolkit.createFormText(sctnPlugins, true);
	ImageDescriptor idesc = HybridUI.getImageDescriptor(HybridUI.PLUGIN_ID, "/icons/etool16/cordovaplug_wiz.png");
	text.setImage("plugin", idesc.createImage());

	text.setText(PLUGINS_SECTION_CONTENT, true, false);

	sctnPlugins.setClient(text);
	text.addHyperlinkListener(this);

}
 
開發者ID:eclipse,項目名稱:thym,代碼行數:17,代碼來源:EssentialsPage.java

示例11: createAuthorSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
private void createAuthorSection(Composite parent) {
	Section sctnAuthor = createSection(parent, "Author");
	sctnAuthor.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));

	Composite composite = formToolkit.createComposite(sctnAuthor, SWT.WRAP);
	formToolkit.paintBordersFor(composite);
	sctnAuthor.setClient(composite);
	composite.setLayout(FormUtils.createSectionClientGridLayout(false, 2));

	createFormFieldLabel(composite, "Name:");

	txtAuthorname = formToolkit.createText(composite, "", SWT.WRAP);
	txtAuthorname.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	createFormFieldLabel(composite, "Email:");

	txtEmail = formToolkit.createText(composite, "", SWT.NONE);
	txtEmail.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

	createFormFieldLabel(composite, "URL:");

	txtUrl = formToolkit.createText(composite, "", SWT.NONE);
	txtUrl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
}
 
開發者ID:eclipse,項目名稱:thym,代碼行數:25,代碼來源:EssentialsPage.java

示例12: createClient

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
protected void createClient(Section section, FormToolkit toolkit) {
    section.setText("Configurations"); //$NON-NLS-1$
    String desc = "This section describe the configurations defined in your project";
    section.setDescription(desc);

    Composite client = toolkit.createComposite(section);
    TableWrapLayout layout = new TableWrapLayout();
    layout.rightMargin = toolkit.getBorderStyle() != SWT.NULL ? 0 : 2;
    layout.leftMargin = layout.rightMargin;
    layout.numColumns = NUM_COLUMNS;
    client.setLayout(layout);

    toolkit.paintBordersFor(client);
    section.setClient(client);
    TableWrapData td = new TableWrapData(TableWrapData.FILL_GRAB);
    td.colspan = 2;
    section.setLayoutData(td);
}
 
開發者ID:apache,項目名稱:ant-ivyde,代碼行數:19,代碼來源:IvyConfSection.java

示例13: createPlanSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
private void createPlanSection(Composite composite) {
		// 		
		Section planSection     = toolkit.createSection(composite,
														Section.TITLE_BAR
													  | ExpandableComposite.EXPANDED);
//		Composite planComposite = toolkit.createComposite(planSection, SWT.NULL);
		planComposite = toolkit.createComposite(planSection, SWT.NULL);
		planSection.setText("Plan");
		planSection.setLayout(new GridLayout(1, Boolean.TRUE));
		planSection.setLayoutData(new GridData(SWT.FILL, SWT.FILL, Boolean.TRUE, Boolean.TRUE));
		planSection.marginHeight = 20;
		planSection.titleBarTextMarginWidth = 20;

		planComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, Boolean.TRUE, Boolean.TRUE));
		planComposite.setLayout(new GridLayout(1, Boolean.TRUE));		
		planSection.setClient(planComposite);
		
		createReleasesSection(planComposite);
		createTitleSection(planComposite);
		createIterationsSection(planComposite);
	}
 
開發者ID:jaloncad,項目名稱:redmine.rap,代碼行數:22,代碼來源:PlanView.java

示例14: createStaticSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
public static Composite createStaticSection( final FormToolkit toolkit, 
                                             final Composite parent, 
                                             final String sectionTitle, 
                                             final String sectionDescription, 
                                             final int numOfColumns ) {
  Section section;
  section = toolkit.createSection( parent, 
                                   ExpandableComposite.TITLE_BAR | 
                                   Section.DESCRIPTION | 
                                   SWT.WRAP );
  section.setText( sectionTitle );    
  section.setDescription( sectionDescription );
  
  toolkit.createCompositeSeparator( section );
  section.setLayout( AlignFormLayoutFactory.createClearTableWrapLayout( false, 1 ) );
  TableWrapData data = new TableWrapData( TableWrapData.FILL_GRAB );
  section.setLayoutData( data );
  Composite client = toolkit.createComposite( section );
  client.setLayout( AlignFormLayoutFactory.createSectionClientTableWrapLayout( false, numOfColumns ) );
  section.setClient( client );
  return client;
}
 
開發者ID:dozed,項目名稱:align-api-project,代碼行數:23,代碼來源:AlignFormSectionFactory.java

示例15: createHtmlSection

import org.eclipse.ui.forms.widgets.Section; //導入方法依賴的package包/類
public static Composite createHtmlSection( 	final FormToolkit toolkit, 
					final Composite parent, 
					final String sectionTitle) {
Section section = toolkit.createSection( parent, 
					 ExpandableComposite.TITLE_BAR | 
					 Section.DESCRIPTION | 
					 ExpandableComposite.TWISTIE | 
					 SWT.WRAP );
section.setText(sectionTitle);
TableWrapData td = new TableWrapData();
td.grabHorizontal = true;
td.heightHint = 400; //added
section.setLayoutData(td);
section.setExpanded( false ); 

Composite client = toolkit.createComposite( section );
   
section.setClient( client );
return client;
 }
 
開發者ID:dozed,項目名稱:align-api-project,代碼行數:21,代碼來源:AlignFormSectionFactory.java


注:本文中的org.eclipse.ui.forms.widgets.Section.setLayoutData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。