package androidemu.app;

import androidemu.Res;
import androidemu.content.Context;
import androidemu.content.DialogInterface;

import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class ProgressDialog extends Dialog implements DialogInterface {

	private Label titleLabel, messageLabel;

	public static ProgressDialog show(Context context, String title, String message, boolean indeterminate) {
		return new ProgressDialog(title, message, false);
	}
	
	public static ProgressDialog show(Context context, String title, String message, boolean indeterminate, boolean cancelable) {
		return new ProgressDialog(title, message, cancelable);
	}

	public ProgressDialog(String title, String message, boolean cancelable) {
		super(cancelable);

		VerticalPanel vp = new VerticalPanel();

		if (title != null) {
			titleLabel = new Label(title);
			titleLabel.setStyleName(Res.R.style().dialogTitle());
			vp.add(titleLabel);
		}

		if (message != null) {
			messageLabel = new Label(message);
			titleLabel.setStyleName(Res.R.style().dialogMessage());
			vp.add(messageLabel);
		}
		
		popupPanel.add(vp);
	}

	public void setTitle(String title) {
		if (messageLabel != null) {
			messageLabel.setText(title);
		}
	}
	
	public void setMessage(String message) {
		if (messageLabel != null) {
			messageLabel.setText(message);
		}
	}
}
@@ -839,24 +839,45 @@
 itle != null
+ && !%22%22.equals(title)
 ) %7B%0A%09%09%09title
@@ -1049,28 +1049,30 @@
 essage);%0A%09%09%09
-titl
+messag
 eLabel.setSt

Check for empty title and bug in message style