data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT;
data.widthHint = ( int ) ( SIZING_SELECTION_WIDGET_WIDTH * 0.4 );
availableObjectClassesViewer.getTable().setLayoutData( data );
availableObjectClassesViewer.setContentProvider( new ArrayContentProvider() );
availableObjectClassesViewer.setLabelProvider( labelProvider );
availableObjectClassesViewer.setSorter( new ViewerSorter() );
availableObjectClassesViewer.addFilter( new InstantSearchFilter( availableObjectClassesInstantSearch ) );
availableObjectClassesViewer.setInput( availableObjectClasses );
availableObjectClassesViewer.addDoubleClickListener( new IDoubleClickListener()
{
public void doubleClick( DoubleClickEvent event )
{
add( event.getSelection() );
}
} );
availableObjectClassesViewer.getTable().addKeyListener( new KeyAdapter()
{
public void keyPressed( KeyEvent e )
{
if ( e.keyCode == SWT.ARROW_UP )
{
if ( availableObjectClassesViewer.getTable().getSelectionIndex() <= 0 )
{
availableObjectClassesInstantSearch.setFocus();
}
}
}
} );
Composite buttonComposite = new Composite( composite, SWT.NONE );
gl = new GridLayout( 1, true );
buttonComposite.setLayout( gl );
data = new GridData( GridData.FILL_BOTH );
data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT;
// data.widthHint = (int)(SIZING_SELECTION_WIDGET_WIDTH * 0.2);
data.horizontalAlignment = SWT.CENTER;
buttonComposite.setLayoutData( data );
Label label0 = new Label( buttonComposite, SWT.NONE );
data = new GridData();
data.grabExcessHorizontalSpace = true;
data.grabExcessVerticalSpace = true;
label0.setLayoutData( data );
addButton = BaseWidgetUtils.createButton( buttonComposite, Messages
.getString( "NewEntryObjectclassWizardPage.AddButton" ), 1 ); //$NON-NLS-1$
removeButton = BaseWidgetUtils.createButton( buttonComposite, Messages
.getString( "NewEntryObjectclassWizardPage.RemoveButton" ), 1 ); //$NON-NLS-1$
Label label3 = new Label( buttonComposite, SWT.NONE );
data = new GridData();
data.grabExcessHorizontalSpace = true;
data.grabExcessVerticalSpace = true;
label3.setLayoutData( data );
addButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent e )
{
add( availableObjectClassesViewer.getSelection() );
}
} );
removeButton.addSelectionListener( new SelectionAdapter()
{
public void widgetSelected( SelectionEvent e )
{
remove( selectedObjectClassesViewer.getSelection() );
}
} );
selectedObjectClassesViewer = new TableViewer( composite );
data = new GridData( GridData.FILL_BOTH );
data.heightHint = SIZING_SELECTION_WIDGET_HEIGHT;
data.widthHint = ( int ) ( SIZING_SELECTION_WIDGET_WIDTH * 0.4 );
selectedObjectClassesViewer.getTable().setLayoutData( data );
selectedObjectClassesViewer.setContentProvider( new ArrayContentProvider() );
selectedObjectClassesViewer.setLabelProvider( labelProvider );
selectedObjectClassesViewer.setSorter( new ViewerSorter() );
selectedObjectClassesViewer.setInput( selectedObjectClasses );
selectedObjectClassesViewer.addDoubleClickListener( new IDoubleClickListener()
{
public void doubleClick( DoubleClickEvent event )
{