Java Code Examples for org.eclipse.jface.dialogs.IDialogConstants#FINISH_ID

The following examples show how to use org.eclipse.jface.dialogs.IDialogConstants#FINISH_ID . 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: TSWizardDialog.java    From translationstudio8 with GNU General Public License v2.0 6 votes vote down vote up
protected void buttonPressed(int buttonId) {
	switch (buttonId) {
	case IDialogConstants.HELP_ID: {
		helpPressed();
		break;
	}
	case IDialogConstants.BACK_ID: {
		backPressed();
		break;
	}
	case IDialogConstants.NEXT_ID: {
		nextPressed();
		break;
	}
	case IDialogConstants.FINISH_ID: {
		finishPressed();
		break;
	}
		// The Cancel button has a listener which calls cancelPressed
		// directly
	}
}
 
Example 2
Source File: TSWizardDialog.java    From tmxeditor8 with GNU General Public License v2.0 6 votes vote down vote up
protected void buttonPressed(int buttonId) {
	switch (buttonId) {
	case IDialogConstants.HELP_ID: {
		helpPressed();
		break;
	}
	case IDialogConstants.BACK_ID: {
		backPressed();
		break;
	}
	case IDialogConstants.NEXT_ID: {
		nextPressed();
		break;
	}
	case IDialogConstants.FINISH_ID: {
		finishPressed();
		break;
	}
		// The Cancel button has a listener which calls cancelPressed
		// directly
	}
}
 
Example 3
Source File: SvnWizardDialog.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
public Button createButton(Composite parent, int id, String label, boolean defaultButton) {
	String customLabel;
	if (id == IDialogConstants.FINISH_ID) {
		if (yesNo) customLabel = "Yes";
		else customLabel = "OK";
	} else customLabel = label;
	return super.createButton(parent, id, customLabel, defaultButton);
}
 
Example 4
Source File: ConflictWizardDialog.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {
	String customLabel;
	if (id == IDialogConstants.FINISH_ID) {
		if (yesNo) customLabel = Messages.ConflictWizardDialog_1;
		else customLabel = Messages.ConflictWizardDialog_2;
	} else customLabel = label;
	return super.createButton(parent, id, customLabel, defaultButton);
}
 
Example 5
Source File: MinimizableWizardDialog.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected Button createButton(Composite parent, int id, String label, boolean defaultButton)
{
	Button b = super.createButton(parent, id, label, defaultButton);
	if (hideOnFinish && id == IDialogConstants.FINISH_ID)
	{
		updateFinishButton(b);
	}
	return b;
}
 
Example 6
Source File: WizardBaseDialog.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
protected void buttonPressed( int buttonId )
{
	if ( IDialogConstants.FINISH_ID == buttonId )
	{
		okPressed( );
	}
	else if ( IDialogConstants.CANCEL_ID == buttonId )
	{
		cancelPressed( );
	}
	else if ( IDialogConstants.BACK_ID == buttonId )
	{
		backPressed( );
	}
	else if ( IDialogConstants.NEXT_ID == buttonId )
	{
		nextPressed( );
	}

	for ( int i = 0; i < this.wizardBase.buttonList.size( ); i++ )
	{
		IButtonHandler buttonHandler = this.wizardBase.buttonList.get( i );
		if ( buttonId == buttonHandler.getId( ) )
		{
			buttonHandler.run( );
			break;
		}
	}
}