本文整理汇总了Java中org.eclipse.swt.layout.GridData.HORIZONTAL_ALIGN_FILL属性的典型用法代码示例。如果您正苦于以下问题:Java GridData.HORIZONTAL_ALIGN_FILL属性的具体用法?Java GridData.HORIZONTAL_ALIGN_FILL怎么用?Java GridData.HORIZONTAL_ALIGN_FILL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.layout.GridData
的用法示例。
在下文中一共展示了GridData.HORIZONTAL_ALIGN_FILL属性的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
示例3: 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;
}
示例4: createDestinationGroup
/**
* 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
}
示例5: createPageControl
/**
* Creates custom control for user-defined query text.
*/
private Control createPageControl( Composite parent )
{
Composite composite = new Composite( parent, SWT.NONE );
composite.setLayout( new GridLayout( 1, false ) );
GridData gridData = new GridData( GridData.HORIZONTAL_ALIGN_FILL
| GridData.VERTICAL_ALIGN_FILL );
composite.setLayoutData( gridData );
Label fieldLabel = new Label( composite, SWT.NONE );
fieldLabel.setText( "&Query Text:" );
m_queryTextField = new Text( composite, SWT.BORDER
| SWT.V_SCROLL | SWT.H_SCROLL );
GridData data = new GridData( GridData.FILL_HORIZONTAL );
data.heightHint = 100;
m_queryTextField.setLayoutData( data );
m_queryTextField.addModifyListener( new ModifyListener( )
{
public void modifyText( ModifyEvent e )
{
validateData();
}
} );
setPageComplete( false );
return composite;
}
示例6: createFieldEditors
@Override
protected void createFieldEditors() {
createJenkinsCLIFieldEditors();
Label spacer2 = new Label(getFieldEditorParent(), SWT.LEFT);
GridData gd2 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd2.horizontalSpan = 2;
gd2.heightHint = convertHeightInCharsToPixels(1) / 2;
spacer2.setLayoutData(gd2);
/* -------------------------------------------------------------- */
/* ------------------------ APPEARANCE -------------------------- */
/* -------------------------------------------------------------- */
GridData appearanceLayoutData = new GridData();
appearanceLayoutData.horizontalAlignment = GridData.FILL;
appearanceLayoutData.verticalAlignment = GridData.BEGINNING;
appearanceLayoutData.grabExcessHorizontalSpace = true;
appearanceLayoutData.grabExcessVerticalSpace = false;
appearanceLayoutData.verticalSpan = 2;
appearanceLayoutData.horizontalSpan = 3;
Composite appearanceComposite = new Composite(getFieldEditorParent(), SWT.NONE);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
appearanceComposite.setLayout(layout);
appearanceComposite.setLayoutData(appearanceLayoutData);
createOtherFieldEditors(appearanceComposite);
createBracketsFieldEditors(appearanceComposite);
}
示例7: 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;
}
示例8: 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;
}
示例9: setButtonLayoutData
protected void setButtonLayoutData(FontMetrics metrics, Control button,
boolean visible) {
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
int widthHint = Dialog.convertHorizontalDLUsToPixels(metrics,
IDialogConstants.BUTTON_WIDTH);
Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
data.widthHint = Math.max(widthHint, minSize.x);
data.exclude = !visible;
button.setLayoutData(data);
}
示例10: createDestinationGroup
/**
* Create the export destination specification widgets
*
* @param parent
* org.eclipse.swt.widgets.Composite
*/
@SuppressWarnings("unused")
@Override
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("npm Target Folder");
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);
BidiUtils.applyBidiProcessing(destinationNameField, StructuredTextTypeHandlerFactory.FILE);
// destination browse button
destinationBrowseButton = new Button(destinationSelectionGroup,
SWT.PUSH);
destinationBrowseButton.setText(DataTransferMessages.DataTransfer_browse);
destinationBrowseButton.addListener(SWT.Selection, this);
destinationBrowseButton.setFont(font);
setButtonLayoutData(destinationBrowseButton);
new Label(parent, SWT.NONE); // vertical spacer
}
示例11: fill
protected GridData fill(Control control, int span) {
GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.horizontalSpan = span;
control.setLayoutData(gd);
return gd;
}
示例12: createDialogArea
protected Control createDialogArea(Composite parent) {
// create composite
Composite composite = (Composite) super.createDialogArea(parent);
// create message
if (message != null) {
Label label = new Label(composite, SWT.WRAP);
label.setText(message);
GridData data = new GridData(GridData.GRAB_HORIZONTAL
| GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL
| GridData.VERTICAL_ALIGN_CENTER);
data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
label.setLayoutData(data);
label.setFont(parent.getFont());
}
viewer = new ComboViewer(composite);
viewer.setContentProvider(new ArrayContentProvider());
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(
SelectionChangedEvent event) {
valueSelected(valueFromSelection(event.getSelection()));
}
});
viewer.setLabelProvider(new LabelProvider() {
@Override
public String getText(Object element) {
if (element instanceof String) {
return PrefUIUtil.getFolderLabel((String) element, MAX_FOLDER_PATH_LEN);
}
return super.getText(element);
}
});
viewer.getControl().setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
| GridData.HORIZONTAL_ALIGN_FILL));
createLink(composite, "From folder", ()->addFolder());
createLink(composite, "From workspace prefs", ()->addWorkspace());
createLink(composite, "From installation", ()->addInstallation());
createLink(composite, "From launch config", ()->addLaunchCfg());
errorMessageText = new Text(composite, SWT.READ_ONLY | SWT.WRAP);
errorMessageText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
| GridData.HORIZONTAL_ALIGN_FILL));
errorMessageText.setBackground(errorMessageText.getDisplay()
.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
// Set the error message text
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=66292
setErrorMessage(errorMessage);
applyDialogFont(composite);
return composite;
}