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


Java GridData.FILL_BOTH属性代码示例

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


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

示例1: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);

	try {
		Constructor<? extends Composite> constructor = dialogAreaClass.getConstructor(new Class[] {
				Composite.class, int.class, AbstractDialogCellEditor.class });

		GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_BOTH);

		dialogComposite = (AbstractDialogComposite) constructor.newInstance(new Object[] { composite,
				new Integer(SWT.NONE), cellEditor });
		dialogComposite.setLayoutData(gridData);
		dialogComposite.setParentDialog(this);
	} catch (Exception e) {
		ConvertigoPlugin.logException(e, "Unexpected exception");
	}

	
	return composite;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:21,代码来源:EditorFrameworkDialog.java

示例2: addDtoParentsSection

private void addDtoParentsSection(Composite parent) {
	Composite composite = createDefaultComposite(parent);

	// Label for owner field
	Label ownerLabel = new Label(composite, SWT.NONE);
	ownerLabel.setText(DTO_PARENTS_TITLE);

	// Owner text field
	dtoParentsText = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
	GridData gridData = new GridData(GridData.FILL_BOTH);
	gridData.heightHint = 100;
	dtoParentsText.setLayoutData(gridData);

	// Populate owner text field
	String text = PropertyUtils.getDtoParentClasses(getProject());
	if (text == null) {
		text = "";
	}
	dtoParentsText.setText(text);
}
 
开发者ID:sebez,项目名称:vertigo-chroma-kspplugin,代码行数:20,代码来源:VertigoPropertyPage.java

示例3: createTableControl

private void createTableControl(Composite container) {
	tableViewer = new TableViewer(container, SWT.FULL_SELECTION | SWT.BORDER);
	String[] columnIndex = new String[] { "主键", "外键", "列名", "名称", "类型", "不能为空", "是否唯一" };
	Integer[] columnWidth = new Integer[] { 40, 40, 120, 120, 120, 80, 80 };
	Integer[] columnAlign = new Integer[] { SWT.CENTER, SWT.CENTER, SWT.LEFT, SWT.LEFT, SWT.LEFT, SWT.CENTER, SWT.CENTER };
	for (int i = 0; i < columnIndex.length; i++) {
		TableViewerColumn choice = new TableViewerColumn(tableViewer, SWT.BORDER);
		choice.getColumn().setText(columnIndex[i]);
		choice.getColumn().setWidth(columnWidth[i]);
		choice.getColumn().setAlignment(columnAlign[i]);
	}
	tableViewer.getTable().setHeaderVisible(true);
	tableViewer.getTable().setLinesVisible(true);
	GridData gd = new GridData(GridData.FILL_BOTH);
	gd.horizontalSpan = 4;
	tableViewer.getTable().setLayoutData(gd);
	tableViewer.setContentProvider(new ArrayContentProvider());
	tableViewer.setLabelProvider(new TableColumnLabelProvider());
	tableViewer.setInput(model.getColumns());
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:20,代码来源:TableModifyWizardPage.java

示例4: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	
	try {
		GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_BOTH);
		
		if (xml == null)
			schemaObjectsDialogComposite = new XmlStructureDialogComposite(composite, SWT.NONE, parentObject);
		else
			schemaObjectsDialogComposite = new XmlStructureDialogComposite(composite, SWT.NONE, parentObject, xml);
		
		schemaObjectsDialogComposite.setLayoutData(gridData);
		labelProgression = schemaObjectsDialogComposite.labelProgression;
		progressBar = schemaObjectsDialogComposite.progressBar;
	}
	catch(Exception e) {
		
	}
	
	return composite;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:22,代码来源:XmlStructureDialog.java

示例5: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	
	try {
		Constructor<? extends Composite> constructor = dialogAreaClass.getConstructor(new Class[] { Composite.class, int.class });

		GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_BOTH);
		
		dialogComposite = (MyAbstractDialogComposite) constructor.newInstance(new Object[] { composite, new Integer(SWT.NONE) });
		dialogComposite.setLayoutData(gridData);
		dialogComposite.initialize();
		dialogComposite.setParentDialog(this);
	}
	catch(Exception e) {
		ConvertigoPlugin.logException(e, "Unexpected exception");
	}
	
	return composite;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:20,代码来源:MyAbstractDialog.java

示例6: createDialogArea

@Override
protected Control createDialogArea(Composite parent)
{
	Composite dialogArea = (Composite) super.createDialogArea(parent);
	Composite composite = new Composite(dialogArea, SWT.NONE);
	createMessageArea(composite);
	listViewer = new TableViewer(composite, SWT.TOP | SWT.BORDER);

	GridData data = new GridData(GridData.FILL_BOTH);
	data.widthHint = 400;
	data.heightHint = 400;
	listViewer.getTable().setLayoutData(data);
	listViewer.setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
	listViewer.setContentProvider(new JarProjectContentProvider(null));
	listViewer.setComparator(new ViewerComparator());
	listViewer.setInput(ResourcesPlugin.getWorkspace());
	applyDialogFont(composite);

	listViewer.setSelection(new StructuredSelection(initialSelection));
	GridLayoutFactory.fillDefaults().generateLayout(composite);
	return dialogArea;
}
 
开发者ID:equella,项目名称:Equella,代码行数:22,代码来源:JPFProjectSelectionDialog.java

示例7: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
    Composite area = (Composite) super.createDialogArea(parent);

    Composite container = new Composite(area, SWT.NONE);
    GridLayout gridLayout = new GridLayout();
    gridLayout.marginWidth = gridLayout.marginHeight = 0;
    container.setLayout(gridLayout);
    GridData gd = new GridData(GridData.FILL_BOTH);
    gd.minimumHeight = 600;
    gd.minimumWidth = 1024;
    container.setLayoutData(gd);

    diffPane = new DiffPaneViewer(container, SWT.NONE);
    diffPane.setDbSources(dbProject, dbRemote);
    diffPane.setInput(input, availableElements);

    return area;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:19,代码来源:DiffPaneDialog.java

示例8: createProjectList

/**
 * Creates the checkbox tree and list for selecting resources.
 *
 * @param parent
 *            the parent control
 */
protected void createProjectList(Composite parent) {

	// create the input element, which has the root resource
	// as its only child
	List<IProject> input = new ArrayList<>();
	IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
			.getProjects();
	for (int i = 0; i < projects.length; i++) {
		if (projects[i].isOpen()) {
			input.add(projects[i]);
		}
	}

	listViewer = CheckboxTableViewer.newCheckList(parent, SWT.TOP
			| SWT.BORDER);
	GridData data = new GridData(GridData.FILL_BOTH);
	listViewer.getTable().setLayoutData(data);

	listViewer.setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
	listViewer.setContentProvider(getContentProvider());
	listViewer.setComparator(new ViewerComparator());

	// check for initial modification to avoid work if no changes are made
	listViewer.addCheckStateListener(new ICheckStateListener() {
		@Override
		public void checkStateChanged(CheckStateChangedEvent event) {
			if (event.getChecked()) {
				for (Object currentlyChecked : listViewer.getCheckedElements()) {
					if (currentlyChecked != event.getElement()) {
						listViewer.setChecked(currentlyChecked, false);
					}
				}
			}
			updateWidgetEnablements();
		}
	});
	listViewer.setInput(workspace);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:44,代码来源:AbstractExportToSingleFileWizardPage.java

示例9: createModelFormContent

@Override
protected final void createModelFormContent(IManagedForm managedForm, Composite client) {
    ScrolledForm form = managedForm.getForm();
    FormToolkit toolkit = managedForm.getToolkit();

    _PrimarySection = createPrimarySection(form, client, toolkit);
    _DetailSection = createDetailSection(form, client, toolkit);
    _InfoSection = createInfoSection(form, client, toolkit);
    _DescriptorSection = createDescriptorSection(form, client, toolkit);

    if (_PrimarySection != null) {
        GridData primarySectionGridData = new GridData(GridData.FILL_HORIZONTAL);
        _PrimarySection.setLayoutData(primarySectionGridData);
    }

    if (_DetailSection != null) {
        GridData detailSectionGridData = new GridData(GridData.FILL_HORIZONTAL);
        _DetailSection.setLayoutData(detailSectionGridData);
    }

    if (_InfoSection != null) {
        Table infoSectionTable = getInfoTable();
        initTableEdit(infoSectionTable, null, 1);
        GridData infoSectionGridData = new GridData(GridData.FILL_BOTH);
        _InfoSection.setLayoutData(infoSectionGridData);
    }

    if (_DescriptorSection != null) {
        Table descriptorSectionTable = getDescriptorTable();
        initTableEdit(descriptorSectionTable, null, 1);
        GridData descriptorSectionGridData = new GridData(GridData.FILL_BOTH);
        _DescriptorSection.setLayoutData(descriptorSectionGridData);
    }

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:35,代码来源:BaseJmxModelMainFormPage.java

示例10: createTable

/**
 * This method initializes table	
 *
 */
private void createTable() {
	int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | 
	SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
	
	table = new Table(this, style);
	
	GridData gridData = new GridData(GridData.FILL_BOTH);
	gridData.grabExcessVerticalSpace = true;
	gridData.horizontalSpan = 3;
	table.setLayoutData(gridData);		
	table.setLinesVisible(true);
	table.setHeaderVisible(true);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:17,代码来源:ArrayEditorComposite.java

示例11: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	
	try {
		GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_BOTH);
		
		objectsExplorerComposite = new ObjectsExplorerComposite(composite, SWT.NONE,
				parentObject, ExtractionRule.class);
		objectsExplorerComposite.setLayoutData(gridData);
	}
	catch(Exception e) {;}
	
	return composite;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:15,代码来源:CreateExtractionRuleDialog.java

示例12: createDialogArea

@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	
	try {
		GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_BOTH);
		
		createHandlerDialogComposite = new CreateHandlerDialogComposite(composite,SWT.NONE,parentObject);
		createHandlerDialogComposite.setLayoutData(gridData);
	}
	catch(Exception e) {;}
	
	return composite;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:14,代码来源:CreateHandlerDialog.java

示例13: createTreeViewer

private void createTreeViewer(Composite container) {
	checkboxTreeViewer = new CheckboxTreeViewer(container, SWT.BORDER);
	GridData gd = new GridData(GridData.FILL_BOTH);
	checkboxTreeViewer.getTree().setLayoutData(gd);
	checkboxTreeViewer.setLabelProvider(new TableTreeNodeLabelProvider());
	checkboxTreeViewer.setContentProvider(new TableTreeNodeContentProvider());

}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:8,代码来源:ImportFromDatabaseWizardPage.java

示例14: createDialogArea

protected Control createDialogArea(Composite parent) {
	createMessageArea(parent);

	// Create a composite to hold the label
	Composite composite = new Composite(parent, SWT.NONE);
	GridData data = new GridData(GridData.FILL_BOTH);
	data.horizontalSpan = 2;
	composite.setLayoutData(data);
	composite.setLayout(new FillLayout());

	// Create the label for the "hidden" message
	label = new Label(composite, SWT.LEFT);

	return composite;
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:15,代码来源:IconAndMessageDialogEx.java

示例15: SummaryPanel

SummaryPanel(Composite parent) {
    summary = new StyledText(parent, SWT.WRAP | SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL);
    summary.setCaret(null);
    summary.setEditable(false);

    GridData gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL | GridData.GRAB_HORIZONTAL);
    gd.horizontalSpan = 2;
    // gd.heightHint = 100;
    summary.setLayoutData(gd);
    BookNotifier.getInstance().addListener(this);
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:11,代码来源:SummaryPanel.java


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