rtc.getLocale( ) ) );
rtc.getULocale( ) ) );
	public void render( Map htRenderers, Bounds bo ) throws ChartException	{		final boolean bFirstInSequence = ( iSeriesIndex == 0 );		final boolean bLastInSequence = ( iSeriesIndex == iSeriesCount - 1 );		boolean bStarted = bFirstInSequence;		long lTimer = System.currentTimeMillis( );		Block bl = cm.getBlock( );		final Enumeration e = bl.children( true );		final BlockGenerationEvent bge = new BlockGenerationEvent( this );		final IDeviceRenderer idr = getDevice( );		final ScriptHandler sh = getRunTimeContext( ).getScriptHandler( );		if ( bFirstInSequence )		{			// ALWAYS RENDER THE OUTERMOST BLOCK FIRST			ScriptHandler.callFunction( sh,					ScriptHandler.BEFORE_DRAW_BLOCK,					bl,					getRunTimeContext( ).getScriptContext( ) );			getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_BLOCK,					bl );			bge.updateBlock( bl );			renderChartBlock( idr, bl, StructureSource.createUnknown( bl ) );			ScriptHandler.callFunction( sh,					ScriptHandler.AFTER_DRAW_BLOCK,					bl,					getRunTimeContext( ).getScriptContext( ) );			getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_BLOCK,					bl );		}		// RENDER ALL BLOCKS EXCEPT FOR THE LEGEND IN THIS ITERATIVE LOOP		while ( e.hasMoreElements( ) )		{			bl = (Block) e.nextElement( );			bge.updateBlock( bl );			if ( bl instanceof Plot )			{				ScriptHandler.callFunction( sh,						ScriptHandler.BEFORE_DRAW_BLOCK,						bl,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_BLOCK,						bl );				renderPlot( ir, (Plot) bl );				ScriptHandler.callFunction( sh,						ScriptHandler.AFTER_DRAW_BLOCK,						bl,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_BLOCK,						bl );				if ( bFirstInSequence && !bLastInSequence )				{					break;				}				if ( !bStarted )				{					bStarted = true;				}			}			else if ( bl instanceof TitleBlock && bStarted )			{				ScriptHandler.callFunction( sh,						ScriptHandler.BEFORE_DRAW_BLOCK,						bl,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_BLOCK,						bl );				renderTitle( ir, (TitleBlock) bl );				ScriptHandler.callFunction( sh,						ScriptHandler.AFTER_DRAW_BLOCK,						bl,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_BLOCK,						bl );			}			else if ( bl instanceof LabelBlock && bStarted )			{				ScriptHandler.callFunction( sh,						ScriptHandler.BEFORE_DRAW_BLOCK,						bl,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_BLOCK,						bl );				renderLabel( ir, bl, StructureSource.createUnknown( bl ) );				ScriptHandler.callFunction( sh,						ScriptHandler.AFTER_DRAW_BLOCK,						bl,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_BLOCK,						bl );			}			else if ( bl instanceof Legend && bStarted && bLastInSequence )			{				ScriptHandler.callFunction( sh,						ScriptHandler.BEFORE_DRAW_BLOCK,						bl,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_BLOCK,						bl );				renderLegend( idr, (Legend) bl, htRenderers );				ScriptHandler.callFunction( sh,						ScriptHandler.AFTER_DRAW_BLOCK,						bl,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_BLOCK,						bl );			}			else if ( bStarted )			{				ScriptHandler.callFunction( sh,						ScriptHandler.BEFORE_DRAW_BLOCK,						bl,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_BLOCK,						bl );				renderBlock( ir, bl, StructureSource.createUnknown( bl ) );				ScriptHandler.callFunction( sh,						ScriptHandler.AFTER_DRAW_BLOCK,						bl,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_BLOCK,						bl );			}		}		lTimer = System.currentTimeMillis( ) - lTimer;		if ( htRenderers.containsKey( TIMER ) )		{			final Long l = (Long) htRenderers.get( TIMER );			htRenderers.put( TIMER, new Long( l.longValue( ) + lTimer ) );		}		else		{			htRenderers.put( TIMER, new Long( lTimer ) );		}		if ( bLastInSequence )		{			try			{				dc.flush( ); // FLUSH DEFERRED CACHE			}			catch ( ChartException ex )			{				// NOTE: RENDERING EXCEPTION ALREADY BEING THROWN				throw new ChartException( ChartEnginePlugin.ID,						ChartException.RENDERING,						ex );			}			logger.log( ILogger.INFORMATION,					Messages.getString( "info.elapsed.render.time", //$NON-NLS-1$							new Object[]{								new Long( lTimer )							},							rtc.getLocale( ) ) );			htRenderers.remove( TIMER );		}	}