Java Code Examples for org.eclipse.swt.layout.GridData#HORIZONTAL_ALIGN_END

The following examples show how to use org.eclipse.swt.layout.GridData#HORIZONTAL_ALIGN_END . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MarkerIconDialog.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
private void swtichToLocalType( )
{
	Composite buttonBar = new Composite( inputArea, SWT.NONE );

	GridLayout gl = new GridLayout( );
	gl.marginWidth = 0;
	gl.marginHeight = 0;
	buttonBar.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
	buttonBar.setLayout( gl );

	Label description = new Label( buttonBar, SWT.WRAP );
	description.setLayoutData( new GridData( GridData.FILL_HORIZONTAL
			| GridData.HORIZONTAL_ALIGN_BEGINNING ) );
	description.setText( Messages.getString( "MarkerIconDialog.Lbl.Description" ) ); //$NON-NLS-1$

	btnBrowse = new Button( buttonBar, SWT.PUSH );
	btnBrowse.setText( Messages.getString( "MarkerIconDialog.Lbl.Browse" ) ); //$NON-NLS-1$
	GridData gd = new GridData( GridData.HORIZONTAL_ALIGN_END );
	gd.grabExcessHorizontalSpace = true;
	btnBrowse.setLayoutData( gd );
	btnBrowse.addSelectionListener( this );
}
 
Example 2
Source File: MarkerIconDialog.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
private void switchToEmbeddedType( )
{
	Composite buttonBar = new Composite( inputArea, SWT.NONE );

	GridLayout gl = new GridLayout( );
	gl.marginWidth = 0;
	gl.marginHeight = 0;
	buttonBar.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
	buttonBar.setLayout( gl );

	Label description = new Label( buttonBar, SWT.NONE );
	description.setLayoutData( new GridData( GridData.HORIZONTAL_ALIGN_BEGINNING ) );
	description.setText( Messages.getString( "MarkerIconDialog.Label.Description.EmbeddedImage" ) ); //$NON-NLS-1$

	btnBrowse = new Button( buttonBar, SWT.PUSH );
	btnBrowse.setText( Messages.getString( "MarkerIconDialog.Lbl.Browse" ) ); //$NON-NLS-1$
	GridData gd = new GridData( GridData.HORIZONTAL_ALIGN_END );
	gd.grabExcessHorizontalSpace = true;
	btnBrowse.setLayoutData( gd );
	btnBrowse.addSelectionListener( this );
}
 
Example 3
Source File: ModuleTableViewer.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
/**
 * Add the "Close" button
 * @param parent the parent composite
 */
private void createButtons(Composite parent) {	
	
	//Create and configure the "Run Analysis" button
	analyseButton = new Button(parent, SWT.PUSH | SWT.CENTER);
	analyseButton.setText("Run Analysis");
	GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_END);
	gridData.widthHint = 120; 
	analyseButton.setLayoutData(gridData);
}
 
Example 4
Source File: ModuleTableViewer.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
/**
 * Add the "Close" button
 * @param parent the parent composite
 */
private void createButtons(Composite parent) {	
	
	//Create and configure the "Close" button
	closeButton = new Button(parent, SWT.PUSH | SWT.CENTER);
	closeButton.setText("Close");
	GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_END);
	gridData.widthHint = 80; 
	closeButton.setLayoutData(gridData);
}
 
Example 5
Source File: ExtendedPropertyEditorComposite.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
private void placeComponents( )
{
	GridLayout glContent = new GridLayout( );
	glContent.horizontalSpacing = 5;
	glContent.verticalSpacing = 5;
	glContent.marginHeight = 7;
	glContent.marginWidth = 7;

	this.setLayout( glContent );

	table = new Table( this, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER );
	GridData gdTable = new GridData( GridData.FILL_BOTH );
	table.setLayoutData( gdTable );
	table.setHeaderVisible( true );
	table.setLinesVisible( true );

	TableColumn tcKey = new TableColumn( table, SWT.CENTER );
	tcKey.setWidth( 186 );
	tcKey.setText( Messages.getString( "PropertyEditorDialog.Lbl.Key" ) ); //$NON-NLS-1$

	TableColumn tcValue = new TableColumn( table, SWT.LEFT );
	tcValue.setWidth( 186 );
	tcValue.setText( Messages.getString( "PropertyEditorDialog.Lbl.Value" ) ); //$NON-NLS-1$

	editorValue = new TableEditor( table );
	editorValue.setColumn( 1 );
	editorValue.grabHorizontal = true;
	editorValue.minimumWidth = 30;

	table.addSelectionListener( this );

	// Layout for buttons panel
	GridLayout glButtons = new GridLayout( );
	glButtons.numColumns = 3;
	glButtons.horizontalSpacing = 5;
	glButtons.verticalSpacing = 5;
	glButtons.marginWidth = 0;
	glButtons.marginHeight = 0;

	Composite cmpButtons = new Composite( this, SWT.NONE );
	GridData gdCMPButtons = new GridData( GridData.FILL_HORIZONTAL );
	cmpButtons.setLayoutData( gdCMPButtons );
	cmpButtons.setLayout( glButtons );

	txtNewKey = new Text( cmpButtons, SWT.SINGLE | SWT.BORDER );
	GridData gdTXTNewKey = new GridData( GridData.FILL_HORIZONTAL );
	gdTXTNewKey.grabExcessHorizontalSpace = true;
	txtNewKey.setLayoutData( gdTXTNewKey );

	btnAdd = new Button( cmpButtons, SWT.PUSH );
	GridData gdBTNAdd = new GridData( GridData.HORIZONTAL_ALIGN_END );
	gdBTNAdd.grabExcessHorizontalSpace = false;
	btnAdd.setLayoutData( gdBTNAdd );
	btnAdd.setText( Messages.getString( "PropertyEditorDialog.Lbl.Add" ) ); //$NON-NLS-1$
	btnAdd.addSelectionListener( this );

	btnRemove = new Button( cmpButtons, SWT.PUSH );
	GridData gdBTNRemove = new GridData( GridData.HORIZONTAL_ALIGN_END );
	gdBTNRemove.grabExcessHorizontalSpace = false;
	btnRemove.setLayoutData( gdBTNRemove );
	btnRemove.setText( Messages.getString( "PropertyEditorDialog.Lbl.Remove" ) ); //$NON-NLS-1$
	btnRemove.addSelectionListener( this );

	populateTable( );
}