previewCanvas.clear( ); previewCanvas.loadImage( ( (Image) img ) ); previewCanvas.showOriginal( );
		public void handleEvent( Event event )		{			// change description/image			selectedIndex = templateList.getSelectionIndex( );			description.setText( ( (Template) templates.get( selectedIndex ) ).getTemplateDescription( ) );			// we need to relayout if the new text has different number of lines			previewPane.layout( );			String key = ( (Template) templates.get( selectedIndex ) ).getPicturePath( );			Object img = null;			if ( key == null || "".equals( key.trim( ) ) )			{				img = ReportPlatformUIImages.getImage( IReportGraphicConstants.ICON_TEMPLATE_NO_PREVIEW );			}			else			{				img = imageMap.get( key );				if ( img == null )				{					img = ReportPlugin.getImage( key );					imageMap.put( key, img );				}			}			previewCanvas.clear( );			previewCanvas.loadImage( ( (Image) img ) );			previewCanvas.showOriginal( );			chkBox.setEnabled( !( ( (Template) templates.get( selectedIndex ) ).getCheatSheetId( )					.equals( "" ) || ( (Template) templates.get( selectedIndex ) ).getCheatSheetId( )					.equals( "org.eclipse.birt.report.designer.ui.cheatsheet.firstreport" ) ) ); //$NON-NLS-1$		}