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