String displayName = typeChoicer.getText( ); String category = getCategoryForDisplayName( displayName ); Control control = (Control) categoryPageMaps.get( category ); ( (StackLayout) infoComp.getLayout( ) ).topControl = control; infoComp.layout( );
reLayoutSubPages( );
	protected void createContents( )	{		setLayout( UIUtil.createGridLayoutWithoutMargin( ) );		initChoiceArray( );		getFormatTypes( );		Composite topContainer = new Composite( this, SWT.NONE );		GridData data = new GridData( );		if ( sourceType != SOURCE_TYPE_STYLE )		{			data = new GridData( GridData.FILL_HORIZONTAL );		}		topContainer.setLayoutData( data );		topContainer.setLayout( new GridLayout( 2, false ) );		new Label( topContainer, SWT.NONE ).setText( Messages.getString( "FormatStringPreferencePage.formatString.label" ) ); //$NON-NLS-1$		typeChoicer = new Combo( topContainer, SWT.READ_ONLY );		data = new GridData( GridData.FILL_HORIZONTAL );		typeChoicer.setLayoutData( data );		typeChoicer.addSelectionListener( new SelectionAdapter( ) {			public void widgetSelected( SelectionEvent e )			{				String displayName = typeChoicer.getText( );				String category = getCategoryForDisplayName( displayName );				Control control = (Control) categoryPageMaps.get( category );				( (StackLayout) infoComp.getLayout( ) ).topControl = control;				infoComp.layout( );				updatePreview( );			}		} );		typeChoicer.setItems( getFormatTypes( ) );		infoComp = new Composite( this, SWT.NONE );		infoComp.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );		infoComp.setLayout( new StackLayout( ) );		createInfoPages( infoComp );	}