TableHandle table = designHandle.getElementFactory( ) .newTableItem( "table" ); StyleHandle styleHandle = designHandle.getElementFactory( ) .newStyle( "wang" );
StyleHandle styleHandle = getElementFactory( ).newStyle( null );
	public void testGetForeGroundColor( )	{		TableHandle table = designHandle.getElementFactory( )				.newTableItem( "table" );		StyleHandle styleHandle = designHandle.getElementFactory( )				.newStyle( "wang" );		//table.setStyleElement(styleHandle.getElement());		( (StyledElement) table.getElement( ) ).setStyle( (StyleElement) styleHandle.getElement( ) );		styleHandle = table.getStyle( );		ReportItemtHandleAdapter adapter = new TableHandleAdapter( table, null );		int color = adapter.getForegroundColor( adapter.getHandle( ) );		// if the foreground was not set , return 0x000000		assertEquals( 0x00, color );		try		{			styleHandle.setProperty( "color", "0xff1234" );		}		catch ( SemanticException e )		{			fail( "error set  color" );			e.printStackTrace( );		}		adapter = new TableHandleAdapter( table, null );		;		color = adapter.getForegroundColor( adapter.getHandle( ) );		assertEquals( 0xff1234, color );	}