當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。