Dialog Protocol

The IDialogProtocol interface defines what it means to be a managed dialog. Responsibilities of a managed dialog include creating the dialog and preparing it every time it is shown. It also makes sense to delegate the show functionality to the dialog itself. A dialog also must recognize button clicks and call the respective parent of the dialog closure. The following interface code represents these ideas as a set of functions:

public interface IDialogProtocol {

public Dialog create(); public void prepare(Dialog dialog); public int getDialogId(); public void show();

public void onClickHook(int buttonId);

0 0

Post a comment