Bug 192362 Propertiy Editor will not refresh when use Page->MasterPage->Simple MasterPage to go to Master Page tab [05]
Description: Propertiy Editor will not refresh when use Page->MasterPage->Simple MasterPage to go to Master Page tab. Build number: 2.2.0.v20070613-1211 Steps to reproduce: 1. Open a report. 2. Use top menu Page->Master Page->Simple Master Page. Expected result: Change to MasterPage tab and Property Editor refreshed. Actual result: Change to MasterPage tab and Property Editor did not refresh. Error log: N/A
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/util/UIUtil.java
import org.osgi.framework.Bundle;
/**
 * Utility class for UI related routines.
 */
public class UIUtil
{
	private static final String MSG_DIALOG_TITLE = Messages.getString( "ImportLibraryAction.Title.ImportSuccessfully" ); 
	private static final String MSG_DIALOG_MSG = Messages.getString( "ImportLibraryAction.Message.ImportSuccessfully" ); 
	/**
	 * Regex pattern for neutral chars in Bidi Algorithm.
	 */
	static Pattern punctuation = Pattern.compile( "\\p{Punct}||\\p{Blank}||\\p{Space}" ); 
	public static Object listArea;
	/**
	 * Returns the length in pixels of given string in a control.
	 * 
	 * @return the length in pixels
	 */
	public static int getStringWidth( String string, Control control )
	{
		int width = 0;
		GC gc = new GC( control );
		for ( int i = 0; i < string.length( ); i++ )
		{
			char c = string.charAt( i );
			width += gc.getAdvanceWidth( c );
		}
		gc.dispose( );
		return width;
	}