Java Code Examples for org.eclipse.swt.widgets.Button#moveBelow()

The following examples show how to use org.eclipse.swt.widgets.Button#moveBelow() . 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: InvoiceCorrectionWizardDialog.java    From elexis-3-core with Eclipse Public License 1.0 6 votes vote down vote up
@Override
protected void createButtonsForButtonBar(Composite parent){
	// TODO Auto-generated method stub
	super.createButtonsForButtonBar(parent);

	Button finish = getButton(IDialogConstants.FINISH_ID);
	finish.setText("Fertigstellen");
	finish.setVisible(true);
    setButtonLayoutData(finish);
	
	Button back = getButton(IDialogConstants.BACK_ID);
	back.setVisible(false);
	
	Button cancel = getButton(IDialogConstants.CANCEL_ID);
	cancel.setText("Abbrechen");
	
	Button btnCreateInvoice = getButton(IDialogConstants.NEXT_ID);
	btnCreateInvoice.setText("Rechnungskorrektur durchführen");
	setButtonLayoutData(btnCreateInvoice);
	
	cancel.moveBelow(null);
	finish.moveAbove(cancel);
	btnCreateInvoice.moveAbove(finish);
	back.moveAbove(btnCreateInvoice);
	
}
 
Example 2
Source File: ChangeExceptionHandler.java    From typescript.java with MIT License 5 votes vote down vote up
protected void createButtonsForButtonBar(Composite parent) {
	super.createButtonsForButtonBar(parent);
	Button ok= getButton(IDialogConstants.OK_ID);
	ok.setText( RefactoringMessages.ChangeExceptionHandler_undo_button); 
	Button abort= createButton(parent, IDialogConstants.CANCEL_ID, RefactoringMessages.ChangeExceptionHandler_abort_button, true); 
	abort.moveBelow(ok);
	abort.setFocus();
}
 
Example 3
Source File: ChangeExceptionHandler.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected void createButtonsForButtonBar(Composite parent) {
	super.createButtonsForButtonBar(parent);
	Button ok= getButton(IDialogConstants.OK_ID);
	ok.setText( RefactoringMessages.ChangeExceptionHandler_undo_button);
	Button abort= createButton(parent, IDialogConstants.CANCEL_ID, RefactoringMessages.ChangeExceptionHandler_abort_button, true);
	abort.moveBelow(ok);
	abort.setFocus();
}
 
Example 4
Source File: BaseDialog.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
protected void initializeBounds( )
{
	Shell shell = getShell( );
	if ( shell != null )
	{
		if ( shell.getDisplay( ).getDismissalAlignment( ) == SWT.RIGHT )
		{
			// make the default button the right-most button
			Button defaultButton = shell.getDefaultButton( );
			if ( defaultButton != null
					&& isContained( buttonBar, defaultButton ) )
			{
				defaultButton.moveBelow( null );
				( (Composite) buttonBar ).layout( );
			}
		}
	}
	Point size;
	if ( !needRememberLastSize( ) )
	{
		size = getShell( ).computeSize( SWT.DEFAULT, SWT.DEFAULT, true );
	}
	else
	{
		size = getInitialSize( );
	}
	Point location = getInitialLocation( size );
	getShell( ).setBounds( getConstrainedShellBounds( new Rectangle( location.x,
			location.y,
			size.x,
			size.y ) ) );
}
 
Example 5
Source File: AddProjectToSessionWizard.java    From saros with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected void createButtonsForButtonBar(Composite parent) {
  super.createButtonsForButtonBar(parent);
  Button ok = getButton(IDialogConstants.OK_ID);
  ok.setText(Messages.JoinSessionWizard_yes);
  Button no =
      createButton(parent, IDialogConstants.CANCEL_ID, Messages.JoinSessionWizard_no, true);
  no.moveBelow(ok);
  no.setFocus();
}
 
Example 6
Source File: FinishAndAddCustomWizardDialog.java    From bonita-studio with GNU General Public License v2.0 4 votes vote down vote up
private Button moveCancelButton() {
    final Button cancelButton = getButton(IDialogConstants.CANCEL_ID);
    cancelButton.setText(IDialogConstants.CANCEL_LABEL);
    cancelButton.moveBelow(null);
    return cancelButton;
}