Bug 319351 Refactor data set editor pages' codes[28193]
Build Identifier: 20100708 Refactor data set editor pages' codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/OutputColumnDefnPage.java
this.itmRemoveAll.setEnabled( viewer.getTable( ).getItemCount( ) > 0 );
			if ( viewer.getTable( ).getSelectionCount( ) == 1 )
			{
				this.btnEdit.setEnabled( true );
				this.btnRemove.setEnabled( true );
				this.itmRemove.setEnabled( true );
				int index = viewer.getTable( ).getSelectionIndex( );
				this.btnUp.setEnabled( index != 0 );
				this.btnDown.setEnabled( index != ( viewer.getTable( )
						.getItemCount( ) - 1 ) );
			}
			else
			{
				this.btnEdit.setEnabled( false );
				this.btnUp.setEnabled( false );
				this.btnRemove.setEnabled( false );
				this.btnDown.setEnabled( false );
				this.itmRemove.setEnabled( false );
			}
		}
		
	    public TableViewer getViewer()
	    {
	        return viewer;
	    }
	    
	    public Composite getControl()
	    {
	        return mainControl;
	    }