Bug 195951 Focus for PNG does not work [13]
Description: Focus for PNG does not work. Build number: 2.2.0.v20070710-1223 Steps to reproduce: 1. New a Chart, set Output Format as PNG, in "Format Chart" tab, add interactivity for Value Series, Event: Focus, Action: Hyperlink or invoke script. 2. Preview, focus in Value Series. Expected result: Interactivity works. Actual result: It does not work. Error log: N/A
chart/org.eclipse.birt.chart.device.extension/src/org/eclipse/birt/chart/device/image/JavaxImageIOWriter.java
{
			_bo = BoundsImpl.create( 0, 0, 400, 300 );
		}
		String sWrappedException = cexp.getClass( ).getName( );
		while ( cexp.getCause( ) != null )
		{
			cexp = (Exception) cexp.getCause( );
		}
		String sException = cexp.getClass( ).getName( );
		if ( sWrappedException.equals( sException ) )
		{
			sWrappedException = null;
		}
		String sMessage = cexp.getMessage( );
		StackTraceElement[] stea = cexp.getStackTrace( );
		Dimension d = new Dimension( (int) _bo.getWidth( ),
				(int) _bo.getHeight( ) );
		Font fo = new Font( "Monospaced", Font.BOLD, 14 ); 
		_g2d.setFont( fo );
		FontMetrics fm = _g2d.getFontMetrics( );
		_g2d.setColor( Color.WHITE );
		_g2d.fillRect( 20, 20, d.width - 40, d.height - 40 );
		_g2d.setColor( Color.BLACK );
		_g2d.drawRect( 20, 20, d.width - 40, d.height - 40 );
		_g2d.setClip( 20, 20, d.width - 40, d.height - 40 );
		int x = 25, y = 20 + fm.getHeight( );
		_g2d.drawString( Messages.getString( "JavaxImageIOWriter.exception.caption", getULocale( ) ), x, y ); 
		x += fm.stringWidth( Messages.getString( "JavaxImageIOWriter.exception.caption",
				getULocale( ) ) ) + 5;
		_g2d.setColor( Color.RED );