protected Control createContents( Composite parent )
{
IConnection connection = ( IConnection ) getConnection( getElement() );
if ( connection != null )
{
super.setMessage( "Connection " + Utils.shorten( connection.getName(), 30 ) );
}
this.tabFolder = new TabFolder( parent, SWT.TOP );
this.cpw = new ConnectionPageWrapper( this, null );
Composite networkComposite = new Composite( this.tabFolder, SWT.NONE );
GridLayout gl = new GridLayout( 1, false );
networkComposite.setLayout( gl );
cpw.addMainInput( connection.getName(), connection.getHost(), connection.getPort(), connection
.getEncryptionMethod(), networkComposite );
this.networkTab = new TabItem( this.tabFolder, SWT.NONE );
this.networkTab.setText( "Network Parameter" );
this.networkTab.setControl( networkComposite );
Composite authComposite = new Composite( this.tabFolder, SWT.NONE );
gl = new GridLayout( 1, false );
authComposite.setLayout( gl );
cpw.addAuthenticationMethodInput( connection.getAuthMethod(), authComposite );
cpw.addSimpleAuthInput( ( connection.getBindPassword() != null ) || ( connection.getBindPrincipal() == null && connection.getBindPassword() == null ),
connection.getBindPrincipal() != null ? connection.getBindPrincipal().toString() : "", connection
.getBindPassword() != null ? connection.getBindPassword() : "", authComposite );
this.authTab = new TabItem( this.tabFolder, SWT.NONE );
this.authTab.setText( "Authentification" );
this.authTab.setControl( authComposite );
Composite optionsComposite = new Composite( this.tabFolder, SWT.NONE );
gl = new GridLayout( 1, false );
optionsComposite.setLayout( gl );
cpw.addBaseDNInput( connection.isFetchBaseDNs(), connection.getBaseDN().toString(), optionsComposite );
cpw.addLimitInput( connection.getCountLimit(), connection.getTimeLimit(), connection
.getAliasesDereferencingMethod(), connection.getReferralsHandlingMethod(), optionsComposite );
this.optionsTab = new TabItem( this.tabFolder, SWT.NONE );
this.optionsTab.setText( "Options" );
this.optionsTab.setControl( optionsComposite );