btnUp = new Button( this, SWT.BORDER );
btnUp = new Button( this, SWT.PUSH );
	protected void createControl( )	{		title = new Label( this, SWT.NONE );		title.setText( provider.getTitle( ) );		table = new Table( this, SWT.SINGLE				| SWT.BORDER				| SWT.H_SCROLL				| SWT.V_SCROLL				| SWT.FULL_SELECTION );		table.setLinesVisible( true );		table.setHeaderVisible( true );		String[] columnNames = provider.getColumnNames( );		for ( int i = 0; i < columnNames.length; i++ )		{			TableColumn column = new TableColumn( table, SWT.LEFT );			column.setText( columnNames[i] );			column.setWidth( provider.getColumnWidths( )[i] );		}		table.addKeyListener( new KeyAdapter( ) {			public void keyPressed( KeyEvent e )			{				if ( e.keyCode == SWT.DEL )				{					int itemCount = table.getItemCount( );					int pos = table.getSelectionIndex( );					if ( selectIndex == itemCount - 1 )					{						selectIndex--;					}					try					{						provider.doDeleteItem( pos );					}					catch ( Exception e1 )					{						WidgetUtil.processError( FormPage.this.getShell( ), e1 );					}				}else				if(e.character == '\r') // return is pressed				{					if ( style == FULL_FUNCTION || style == FULL_FUNCTION_HORIZONTAL)					{						edit( );					}				}			}		} );		table.addSelectionListener( new SelectionAdapter( ) {			public void widgetSelected( SelectionEvent e )			{				selectIndex = table.getSelectionIndex( );				updateArraw( );			}		} );		table.addMouseListener( new MouseAdapter( ) {			public void mouseDoubleClick( MouseEvent e )			{				if ( style == FULL_FUNCTION || style == FULL_FUNCTION_HORIZONTAL)				{					edit( );				}			}		} );		createTableViewer( );		btnDel = new Button( this, SWT.BORDER );		btnDel.setText( Messages.getString( "FormPage.Button.Delete" ) ); //$NON-NLS-1$		btnDel.addSelectionListener( new SelectionAdapter( ) {			public void widgetSelected( SelectionEvent e )			{				if ( tableViewer.isCellEditorActive( ) )				{					tableViewer.cancelEditing( );				}				int pos = table.getSelectionIndex( );				if ( pos == -1 )				{					table.setFocus( );					return;				}				selectIndex = pos;				int itemCount = table.getItemCount( );				if ( selectIndex == itemCount - 1 )				{					selectIndex--;				}				try				{					provider.doDeleteItem( pos );				}				catch ( Exception e1 )				{					WidgetUtil.processError( FormPage.this.getShell( ), e1 );				}				updateArraw( );			}		} );		btnAdd = new Button( this, SWT.BORDER );		if ( bAddWithDialog == true )		{			btnAdd.setText( Messages.getString( "FormPage.Button.AddWithDialog" ) ); //$NON-NLS-1$		}		else		{			btnAdd.setText( Messages.getString( "FormPage.Button.Add" ) ); //$NON-NLS-1$		}		btnAdd.addSelectionListener( new SelectionAdapter( ) {			public void widgetSelected( SelectionEvent e )			{				CommandStack stack = getActionStack( );				stack.startTrans( Messages.getString( "FormPage.Menu.ModifyProperty" ) ); //$NON-NLS-1$				int pos = table.getSelectionIndex( );				boolean sucess = false;				try				{					sucess = provider.doAddItem( pos );				}				catch ( Exception e1 )				{					stack.rollback( );					WidgetUtil.processError( FormPage.this.getShell( ), e1 );					return;				}				if ( sucess )				{					stack.commit( );				}				else				{					stack.rollback( );				}				table.setSelection( table.getItemCount( ) - 1 );				updateArraw( );			}		} );		if ( style == FULL_FUNCTION || style == FULL_FUNCTION_HORIZONTAL)		{			btnEdit = new Button( this, SWT.BORDER );			if ( bAddWithDialog == true )			{				btnEdit.setText( Messages.getString( "FormPage.Button.EditWithDialog" ) ); //$NON-NLS-1$			}			else			{				btnEdit.setText( Messages.getString( "FormPage.Button.Edit" ) ); //$NON-NLS-1$			}			btnEdit.addSelectionListener( new SelectionAdapter( ) {				public void widgetSelected( SelectionEvent e )				{					edit( );				}			} );		}		if ( style != SIMPLE_FUNCTION )		{			btnUp = new Button( this, SWT.BORDER );			btnUp.setText( Messages.getString( "FormPage.Button.Up" ) );			btnUp.setToolTipText( Messages.getString( "FormPage.toolTipText.Up" ) );			btnUp.addSelectionListener( new SelectionAdapter( ) {				public void widgetSelected( SelectionEvent e )				{					if ( tableViewer.isCellEditorActive( ) )					{						tableViewer.cancelEditing( );					}					int oldPos = table.getSelectionIndex( );					selectIndex = oldPos - 1;					moveItem( oldPos, oldPos - 1 );					updateArraw( );				}			} );			btnDown = new Button( this, SWT.BORDER );			btnDown.setText( Messages.getString( "FormPage.Button.Down" ) );			btnDown.setToolTipText( Messages.getString( "FormPage.toolTipText.Down" ) );			btnDown.addSelectionListener( new SelectionAdapter( ) {				public void widgetSelected( SelectionEvent e )				{					if ( tableViewer.isCellEditorActive( ) )					{						tableViewer.cancelEditing( );					}					int oldPos = table.getSelectionIndex( );					selectIndex = oldPos + 1;					moveItem( oldPos, oldPos + 1 );					updateArraw( );				}			} );		}		switch ( style )		{			case SIMPLE_FUNCTION :				simpleLayout( );				break;			case NORMAL_FUNCTION :				normallLayout( );				break;			case FULL_FUNCTION :				fullLayout( );				break;			case FULL_FUNCTION_HORIZONTAL:				fullLayoutHorizontal();				break;		}	}