本文整理汇总了Java中org.eclipse.swt.layout.GridLayout类的典型用法代码示例。如果您正苦于以下问题:Java GridLayout类的具体用法?Java GridLayout怎么用?Java GridLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GridLayout类属于org.eclipse.swt.layout包,在下文中一共展示了GridLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createControl
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
@Override
public void createControl(Composite parent) {
Composite area = new Composite(parent, SWT.NONE);
area.setLayout(new GridLayout(2, false));
area.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
new Label(area, SWT.NONE).setText(Messages.PgObject_project_name);
viewerProject = new ComboViewer(area, SWT.READ_ONLY | SWT.DROP_DOWN);
new Label(area, SWT.NONE).setText(Messages.PgObject_object_type);
viewerType = new ComboViewer(area, SWT.READ_ONLY | SWT.DROP_DOWN);
new Label(area, SWT.NONE).setText(Messages.PgObject_object_name);
final Text txtName = new Text(area, SWT.BORDER);
txtName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
txtName.addModifyListener(e -> {
name = txtName.getText();
getWizard().getContainer().updateButtons();
});
fillProjects();
fillTypes();
setControl(area);
}
示例2: initialize
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
/**
* This method initializes this
*
*/
private void initialize() {
if(display==null)display = Display.getDefault();
composite = new CompositeCheckWidget(tabManager, SWT.NONE);
GridLayout gl = new GridLayout(1,false);
gl.marginHeight = gl.marginWidth = gl.verticalSpacing = 0;
composite.setLayout(gl);
createToolBar();
createXulContainer();
//toolBar.setMozillaBrowser(mozillaBrowser);
composite.setSize(new org.eclipse.swt.graphics.Point(347,141));
tabManager.add(this, composite, true);
toolBar.setXulWebViewer(this);
}
示例3: createDialogArea
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
@Override
protected Control createDialogArea(final Composite parent) {
final Composite composite = (Composite) super.createDialogArea(parent);
createMessageArea(composite);
final Composite inner = new Composite(composite, SWT.NONE);
inner.setLayoutData(new GridData(GridData.FILL_BOTH));
final GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.marginHeight = 0;
layout.marginWidth = 0;
inner.setLayout(layout);
createTableViewer(inner);
createOrderButtons(inner);
// New, Edit and Remove is allowed only for mutable managers.
if (manager instanceof MutableWorkingSetManager) {
createModifyButtons(composite);
}
tableViewer.setInput(allWorkingSets);
applyDialogFont(composite);
return composite;
}
示例4: createContents
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
@Override
protected Control createContents ( final Composite parent )
{
final Composite wrapper = new Composite ( parent, SWT.NONE );
wrapper.setLayout ( new GridLayout ( 1, false ) );
final Label label = new Label ( wrapper, SWT.NONE );
label.setText ( "Preferences for Eclipse SCADA Security" );
final Button testButton = new Button ( wrapper, SWT.NONE );
testButton.setText ( "Test key selection…" );
testButton.addSelectionListener ( new SelectionAdapter () {
@Override
public void widgetSelected ( final SelectionEvent e )
{
openDialog ();
}
} );
return wrapper;
}
示例5: createCompositeOutput
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
private void createCompositeOutput() {
GridLayout gridLayout = new GridLayout();
gridLayout.horizontalSpacing = 0;
gridLayout.marginHeight = 0;
gridLayout.verticalSpacing = 0;
gridLayout.numColumns = 1;
gridLayout.marginWidth = 0;
GridData gridData = new org.eclipse.swt.layout.GridData();
gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
compositeOutput = new Composite(tabFolderOutputDesign, SWT.NONE);
compositeOutput.setLayout(gridLayout);
createCompositeOutputHeader();
createSashForm();
createComposite();
}
示例6: createControl
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
public void createControl(Composite parent) {
Composite fileSelectionArea = new Composite(parent, SWT.NONE);
GridData fileSelectionData = new GridData(GridData.GRAB_HORIZONTAL
| GridData.FILL_HORIZONTAL);
fileSelectionArea.setLayoutData(fileSelectionData);
GridLayout fileSelectionLayout = new GridLayout();
fileSelectionLayout.numColumns = 3;
fileSelectionLayout.makeColumnsEqualWidth = false;
fileSelectionLayout.marginWidth = 0;
fileSelectionLayout.marginHeight = 0;
fileSelectionArea.setLayout(fileSelectionLayout);
editor = new ProjectFileFieldEditor("fileSelect","Select File: ",fileSelectionArea);
editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
public void modifyText(ModifyEvent e) {
IPath path = new Path(ImportWizardPage.this.editor.getStringValue());
filePath = path.toString();
updateStatus();
}
});
fileSelectionArea.moveAbove(null);
updateStatus();
setControl(fileSelectionArea);
}
示例7: OperationComposite
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
/**
* Create the composite.
*
* @param parent
* @param style
*/
public OperationComposite(FilterExpressionOperationDialog dialog, Composite parent, int style) {
super(parent, style);
this.dialog = dialog;
this.operationDataStructure = dialog.getDataStructure().getOperationClassData();
setLayout(new GridLayout(1, false));
setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Composite middleComposite = new Composite(this, SWT.BORDER);
middleComposite.setLayout(new GridLayout(2, false));
middleComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
inputFieldComposite = new InputFieldsComposite(middleComposite, dialog,SWT.NONE,
operationDataStructure.getInputFields());
GridData gd_composite2 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
gd_composite2.widthHint = 170;
inputFieldComposite.setLayoutData(gd_composite2);
createOtherFieldComposite(middleComposite);
createExternalComposite();
refresh();
}
示例8: createSelectionComposite
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
private void createSelectionComposite(final Composite parent) {
final Composite pane = new Composite(parent, SWT.NONE);
final GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
gridData.horizontalAlignment = SWT.FILL;
gridData.widthHint = 200;
pane.setLayoutData(gridData);
final GridLayout gridLayout = new GridLayout();
gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
gridLayout.numColumns = 1;
pane.setLayout(gridLayout);
final Label label = new Label(pane, SWT.NONE);
label.setText(selectedValuesMessage);
final GridData labelGridData = new GridData();
labelGridData.verticalAlignment = SWT.FILL;
labelGridData.horizontalAlignment = SWT.FILL;
label.setLayoutData(labelGridData);
selectedElementsTableViewer = createTableViewer(pane);
selectedElementsTableViewer.setInput(this.selectedElements);
}
示例9: createButtonBar
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
@Override
protected Control createButtonBar(Composite parent) {
final Composite buttonBar = new Composite(parent, SWT.NONE);
buttonBar.setBackground(backColor);
final GridLayout layout = new GridLayout();
layout.marginLeft = 10;
layout.numColumns = 2;
layout.makeColumnsEqualWidth = false;
layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
buttonBar.setLayout(layout);
final GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
data.grabExcessHorizontalSpace = true;
data.grabExcessVerticalSpace = false;
buttonBar.setLayoutData(data);
buttonBar.setFont(parent.getFont());
// add the dialog's button bar to the right
buttonControl = super.createButtonBar(buttonBar);
buttonControl.setBackground(backColor);
buttonControl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));
return buttonBar;
}
示例10: createSaveJobPromtGroup
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
/**
* @param selection
*/
private void createSaveJobPromtGroup(String selection) {
HydroGroup hydroGroup = new HydroGroup(this, SWT.NONE);
hydroGroup.setHydroGroupText(Messages.SAVE_JOBS_BEFORE_LAUNCHING_MESSAGE);
hydroGroup.setLayout(new GridLayout(1, false));
hydroGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
hydroGroup.getHydroGroupClientArea().setLayout(new GridLayout(2, false));
hydroGroup.getHydroGroupClientArea().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
btnRadioButtonAlways = new Button(hydroGroup.getHydroGroupClientArea(), SWT.RADIO);
btnRadioButtonAlways.setText(StringUtils.capitalize((MessageDialogWithToggle.ALWAYS)));
btnRadioButtonPrompt = new Button(hydroGroup.getHydroGroupClientArea(), SWT.RADIO);
btnRadioButtonPrompt.setText(StringUtils.capitalize(MessageDialogWithToggle.PROMPT));
if (StringUtils.equals(selection, MessageDialogWithToggle.ALWAYS)) {
btnRadioButtonAlways.setSelection(true);
} else {
btnRadioButtonPrompt.setSelection(true);
}
}
示例11: createShell
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
@Override
protected Shell createShell(Display display) throws Exception {
this.viewer = new ScannableViewer();
Shell shell = new Shell(display);
shell.setText("Monitors");
shell.setLayout(new GridLayout(1, false));
viewer.createPartControl(shell);
shell.pack();
shell.setSize(500, 500);
shell.open();
return shell;
}
示例12: createPropertiesGroup
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
/**
* @generated
*/
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
propertiesSection.setText(AnalysisMessages.EventModelPropertiesEditionPart_PropertiesGroupLabel);
GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
propertiesSectionData.horizontalSpan = 3;
propertiesSection.setLayoutData(propertiesSectionData);
Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
GridLayout propertiesGroupLayout = new GridLayout();
propertiesGroupLayout.numColumns = 3;
propertiesGroup.setLayout(propertiesGroupLayout);
propertiesSection.setClient(propertiesGroup);
return propertiesGroup;
}
示例13: createFigure
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
* createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
* @generated
*/
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
Form form = scrolledForm.getForm();
view = form.getBody();
GridLayout layout = new GridLayout();
layout.numColumns = 3;
view.setLayout(layout);
createControls(widgetFactory, view);
return scrolledForm;
}
示例14: addChild
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
void addChild ( final BreadcrumbItem item )
{
this.items.add ( item );
if ( this.horizontal )
{
( (GridLayout)this.composite.getLayout () ).numColumns = this.items.size ();
}
this.composite.layout ();
}
示例15: createDestinationGroup
import org.eclipse.swt.layout.GridLayout; //导入依赖的package包/类
/**
* Create the export destination specification widgets
*/
protected void createDestinationGroup(Composite parent) {
Font font = parent.getFont();
// destination specification group
Composite destinationSelectionGroup = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 3;
destinationSelectionGroup.setLayout(layout);
destinationSelectionGroup.setLayoutData(new GridData(
GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
destinationSelectionGroup.setFont(font);
Label destinationLabel = new Label(destinationSelectionGroup, SWT.NONE);
destinationLabel.setText(getTargetLabel());
destinationLabel.setFont(font);
// destination name entry field
destinationNameField = new Combo(destinationSelectionGroup, SWT.SINGLE
| SWT.BORDER);
destinationNameField.addListener(SWT.Modify, this);
destinationNameField.addListener(SWT.Selection, this);
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
| GridData.GRAB_HORIZONTAL);
data.widthHint = SIZING_TEXT_FIELD_WIDTH;
destinationNameField.setLayoutData(data);
destinationNameField.setFont(font);
// destination browse button
destinationBrowseButton = new Button(destinationSelectionGroup,
SWT.PUSH);
destinationBrowseButton.setText(N4ExportMessages.DataTransfer_browse);
destinationBrowseButton.addListener(SWT.Selection, this);
destinationBrowseButton.setFont(font);
setButtonLayoutData(destinationBrowseButton);
// new Label(parent, SWT.NONE); // vertical spacer
}