How to add a URL call to Confirm Dialog

I have a confirm dialog where I want to call a URL to be opened inside the else part, how could this be done?

ConfirmDialog dialog =, “Warning”, “The document you have chosen to view is” + document.getSize() + " mb in size and may take some time to download over a mobile connection, do you want to continue?" , “Yes”, “No”, new ConfirmDialog.Listener() {
public void onClose(ConfirmDialog dialog) {
if (!dialog.isConfirmed()) {

                        else {
                dialog.setIcon(new ThemeResource("icons/Warning_icon.png"));
                dialog.setWidth(297, Unit.PIXELS);
                dialog.setHeight(200, Unit.PIXELS);