public void widgetSelected(SelectionEvent e) { if(e.getSource() instanceof Button) { String sCmd = ((Button) e.getSource()).getText(); if(sCmd.equals("Next >>")) { int i = vTaskIDs.indexOf(this.sCurrentActiveTask); if(i < vTaskIDs.size() - 1) { this.switchTo((String) vTaskIDs.get(i + 1)); buttonpanel.setButtonEnabled(ButtonPanel.BACK, true); } if(i == vTaskIDs.size() - 2) { buttonpanel.setButtonEnabled(ButtonPanel.NEXT, false); } } else if(sCmd.equals("<< Back")) { int i = vTaskIDs.indexOf(this.sCurrentActiveTask); if(i > 0) { this.switchTo((String) vTaskIDs.get(i - 1)); buttonpanel.setButtonEnabled(ButtonPanel.NEXT, true); } if(i == 1) {  buttonpanel.setButtonEnabled(ButtonPanel.BACK, false); } } else if(sCmd.equals("OK")) { shell.dispose(); } else if(sCmd.equals("Cancel")) { context = null; shell.dispose(); } else { switchTo((String) vTaskIDs.get(vTaskLabels.indexOf(sCmd))); int i = vTaskIDs.indexOf(this.sCurrentActiveTask); buttonpanel.setButtonEnabled(ButtonPanel.NEXT, (i < vTaskIDs.size() - 1) ? true : false); buttonpanel.setButtonEnabled(ButtonPanel.BACK, (i > 0) ? true : false); } } }
public void widgetSelected( SelectionEvent e ) { if ( e.getSource( ) instanceof Button ) { String sCmd = ( (Button) e.getSource( ) ).getText( ); if ( sCmd.equals( Messages.getString( "WizardBase.Next" ) ) ) { int i = vTaskIDs.indexOf( this.sCurrentActiveTask ); if ( i < vTaskIDs.size( ) - 1 ) { this.switchTo( (String) vTaskIDs.get( i + 1 ) ); buttonpanel.setButtonEnabled( ButtonPanel.BACK, true ); } if ( i == vTaskIDs.size( ) - 2 ) { buttonpanel.setButtonEnabled( ButtonPanel.NEXT, false ); } } else if ( sCmd.equals( Messages.getString( "WizardBase.Back" ) ) ) { int i = vTaskIDs.indexOf( this.sCurrentActiveTask ); if ( i > 0 ) { this.switchTo( (String) vTaskIDs.get( i - 1 ) ); buttonpanel.setButtonEnabled( ButtonPanel.NEXT, true ); } if ( i == 1 ) {  buttonpanel.setButtonEnabled( ButtonPanel.BACK, false ); } } else if ( sCmd.equals( Messages.getString( "WizardBase.Ok" ) ) ) { shell.dispose( ); } else if ( sCmd.equals( Messages.getString( "WizardBase.Cancel" ) ) ) { context = null; shell.dispose( ); } else { switchTo( (String) vTaskIDs.get( vTaskLabels.indexOf( sCmd ) ) ); int i = vTaskIDs.indexOf( this.sCurrentActiveTask ); buttonpanel.setButtonEnabled( ButtonPanel.NEXT, ( i < vTaskIDs.size( ) - 1 ) ? true : false ); buttonpanel.setButtonEnabled( ButtonPanel.BACK, ( i > 0 ) ? true : false ); } } }
    public void widgetSelected(SelectionEvent e)    {        if(e.getSource() instanceof Button)        {            String sCmd = ((Button) e.getSource()).getText();            if(sCmd.equals("Next >>"))            {                int i = vTaskIDs.indexOf(this.sCurrentActiveTask);                if(i < vTaskIDs.size() - 1)                {                    this.switchTo((String) vTaskIDs.get(i + 1));                    buttonpanel.setButtonEnabled(ButtonPanel.BACK, true);                }                if(i == vTaskIDs.size() - 2)                {                    buttonpanel.setButtonEnabled(ButtonPanel.NEXT, false);                }            }            else if(sCmd.equals("<< Back"))            {                int i = vTaskIDs.indexOf(this.sCurrentActiveTask);                if(i > 0)                {                    this.switchTo((String) vTaskIDs.get(i - 1));                    buttonpanel.setButtonEnabled(ButtonPanel.NEXT, true);                }                if(i == 1)                {                    // Just switched to first tab                    buttonpanel.setButtonEnabled(ButtonPanel.BACK, false);                }            }            else if(sCmd.equals("OK"))            {                shell.dispose();            }            else if(sCmd.equals("Cancel"))            {                context = null;                shell.dispose();            }            else            {	            switchTo((String) vTaskIDs.get(vTaskLabels.indexOf(sCmd)));                int i = vTaskIDs.indexOf(this.sCurrentActiveTask);                buttonpanel.setButtonEnabled(ButtonPanel.NEXT, (i < vTaskIDs.size() - 1) ? true : false);                buttonpanel.setButtonEnabled(ButtonPanel.BACK, (i > 0) ? true : false);            }        }    }