本文整理匯總了Java中org.eclipse.swt.layout.GridData.BEGINNING屬性的典型用法代碼示例。如果您正苦於以下問題:Java GridData.BEGINNING屬性的具體用法?Java GridData.BEGINNING怎麽用?Java GridData.BEGINNING使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.eclipse.swt.layout.GridData
的用法示例。
在下文中一共展示了GridData.BEGINNING屬性的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createCombo
/**
* This method initializes combo
*
*/
private void createCombo() {
GridData gridData1 = new GridData();
gridData1.grabExcessHorizontalSpace = false;
gridData1.verticalAlignment = GridData.CENTER;
gridData1.horizontalAlignment = GridData.BEGINNING;
combo = new Combo(this, SWT.NONE);
combo.setLayoutData(gridData1);
combo.add("*");
combo.add("Screen class");
combo.add("Criteria");
combo.add("Extraction rule");
combo.add("Sheet");
combo.add("Transaction");
combo.add("Statement");
combo.add("Sequence");
combo.add("Step");
}
示例2: createStandardCombo
public void createStandardCombo ( final Composite parent, final String attributeName, final String label, final String[] items, final IObservableMap data, final Object valueType )
{
this.toolkit.createLabel ( parent, label + ":" );
final Combo combo = new Combo ( parent, SWT.DROP_DOWN );
combo.setItems ( items );
this.toolkit.adapt ( combo );
final GridData gd = new GridData ( GridData.FILL, GridData.BEGINNING, true, true );
gd.horizontalSpan = 2;
combo.setLayoutData ( gd );
final IObservableValue value = Observables.observeMapEntry ( data, attributeName, valueType );
this.dbc.bindValue ( WidgetProperties.text ().observe ( combo ), value );
}
示例3: createGroup
/**
* This method initializes group
*
*/
private void createGroup() {
GridData gridData1 = new GridData();
gridData1.horizontalAlignment = GridData.BEGINNING;
gridData1.grabExcessHorizontalSpace = true;
gridData1.verticalAlignment = GridData.CENTER;
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
gridData.verticalAlignment = GridData.CENTER;
GridLayout gridLayout1 = new GridLayout();
gridLayout1.numColumns = 2;
GridData gridData3 = new GridData();
gridData3.horizontalAlignment = GridData.FILL;
gridData3.horizontalSpan = 2;
gridData3.grabExcessHorizontalSpace = true;
gridData3.grabExcessVerticalSpace = false;
gridData3.verticalAlignment = GridData.FILL;
group = new Group(this, SWT.NONE);
group.setText("Target Server");
group.setLayoutData(gridData3);
group.setLayout(gridLayout1);
label = new Label(group, SWT.NONE);
label.setText("HTTP Server");
httpServer = new Text(group, SWT.BORDER);
httpServer.setLayoutData(gridData);
label2 = new Label(group, SWT.NONE);
label2.setText("HTTP Port");
httpPort = new Text(group, SWT.BORDER);
httpPort.setLayoutData(gridData1);
label3 = new Label(group, SWT.NONE);
label3.setText("SSL");
ssl = new Button(group, SWT.CHECK);
httpServer.addModifyListener(modifyListener);
httpPort.addModifyListener(modifyListener);
ssl.addSelectionListener(selectionListener);
}
示例4: buildLeftColumn
private void buildLeftColumn() {
final Composite composite = new Composite(this.shell, SWT.NONE);
final GridData gd = new GridData(GridData.FILL, GridData.BEGINNING, false,
true, 1, 1);
composite.setLayoutData(gd);
final FillLayout compositeLayout = new FillLayout();
compositeLayout.marginWidth = 2;
composite.setLayout(compositeLayout);
final Label label = new Label(composite, SWT.NONE);
if (this.image == null) {
this.image = new Image(display, this.getClass().getClassLoader()
.getResourceAsStream("images/document_wrench_color.png"));
shell.addListener(SWT.Close, new Listener() {
@Override
public void handleEvent(Event event) {
image.dispose();
}
});
}
label.setImage(this.image);
}
示例5: buildLeftColumn
private void buildLeftColumn() {
final Composite composite = new Composite(this.shell, SWT.NONE);
final GridData gd = new GridData(GridData.FILL, GridData.BEGINNING, false,
true, 1, 1);
composite.setLayoutData(gd);
final FillLayout compositeLayout = new FillLayout();
compositeLayout.marginWidth = 2;
composite.setLayout(compositeLayout);
final Label label = new Label(composite, SWT.NONE);
if (this.image == null) {
this.image = new Image(display, this.getClass().getClassLoader()
.getResourceAsStream("images/light1.png"));
shell.addListener(SWT.Close, new Listener() {
@Override
public void handleEvent(Event event) {
image.dispose();
}
});
}
label.setImage(this.image);
}
示例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: createStandardText
public void createStandardText ( final Composite parent, final String attributeName, final int style, final String label, final String textMessage, final IObservableMap data, final Object valueType )
{
final Label labelControl = this.toolkit.createLabel ( parent, label + ":" );
final boolean multi = ( style & SWT.MULTI ) > 0;
if ( multi )
{
labelControl.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, false, false ) );
}
final Text text = this.toolkit.createText ( parent, "", style );
text.setMessage ( textMessage );
final GridData gd = new GridData ( GridData.FILL, multi ? GridData.FILL : GridData.BEGINNING, true, true );
gd.horizontalSpan = 2;
text.setLayoutData ( gd );
text.setToolTipText ( textMessage );
final IObservableValue value = Observables.observeMapEntry ( data, attributeName, String.class );
if ( valueType != null && valueType != String.class )
{
final WritableValue conversionValue = new WritableValue ( null, valueType );
this.dbc.bindValue ( WidgetProperties.text ( SWT.Modify ).observe ( text ), conversionValue );
this.dbc.bindValue ( conversionValue, value );
}
else
{
this.dbc.bindValue ( WidgetProperties.text ( SWT.Modify ).observe ( text ), value );
}
}
示例8: initialize
protected void initialize() {
GridData gridData3 = new GridData();
gridData3.grabExcessHorizontalSpace = false;
GridData gridData2 = new GridData();
gridData2.horizontalAlignment = GridData.BEGINNING;
gridData2.grabExcessHorizontalSpace = false;
gridData2.horizontalSpan = 2;
gridData2.verticalAlignment = GridData.CENTER;
GridData gridData = new GridData();
label1 = new Label(this, SWT.NONE);
label1.setText("Object type");
label1.setLayoutData(gridData);
createCombo();
label2 = new Label(this, SWT.NONE);
label2.setText("Substring");
text = new Text(this, SWT.BORDER);
text.setLayoutData(gridData3);
checkBox = new Button(this, SWT.CHECK);
checkBox.setText("Match case");
checkBox.setLayoutData(gridData2);
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
this.setLayout(gridLayout);
setSize(new Point(226, 125));
combo.select(0);
text.setText("");
}
示例9: createAdvancedControls
/**
* Creates the widget for advanced options.
*
* @param parent
* the parent composite
*/
protected void createAdvancedControls(Composite parent) {
Preferences preferences = ResourcesPlugin.getPlugin()
.getPluginPreferences();
if (preferences.getBoolean(ResourcesPlugin.PREF_DISABLE_LINKING) == false) {
linkedResourceParent = new Composite(parent, SWT.NONE);
linkedResourceParent.setFont(parent.getFont());
linkedResourceParent.setLayoutData(new GridData(
GridData.FILL_HORIZONTAL));
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
linkedResourceParent.setLayout(layout);
advancedButton = new Button(linkedResourceParent, SWT.PUSH);
advancedButton.setFont(linkedResourceParent.getFont());
advancedButton.setText(IDEWorkbenchMessages.showAdvanced);
GridData data = setButtonLayoutData(advancedButton);
data.horizontalAlignment = GridData.BEGINNING;
advancedButton.setLayoutData(data);
advancedButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
handleAdvancedButtonSelect();
}
});
}
linkedResourceGroup = new CreateLinkedResourceGroup(IResource.FILE,
new Listener() {
public void handleEvent(Event e) {
setPageComplete(validatePage());
firstLinkCheck = false;
}
}, new CreateLinkedResourceGroup.IStringValue() {
public void setValue(String string) {
resourceGroup.setResource(string);
}
public String getValue() {
return resourceGroup.getResource();
}
public IResource getResource() {
IPath path = resourceGroup.getContainerFullPath();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace()
.getRoot();
IResource resource = root.findMember(path);
if (resource != null && resource instanceof IContainer) {
String resourceName = resourceGroup.getResource();
if (resourceName.length() > 0) {
try {
return ((IContainer) resource).getFile(Path
.fromOSString(resourceName));
} catch (IllegalArgumentException e) {
// continue below.
}
}
return resource;
}
return resource;
}
});
}