Skip Navigation

Development Workflow for Dialogs

An overview of what you do to create and customize a dialog follows. Customization is optional.

  • Extend the MySabreTrayDialog class.

  • Add code in the handler or selection listener.

  • Customize the text on the title bar.

  • Add content to the dialog.

  • (Optional) Modify the labels on the default OK and Cancel buttons.

  • (Optional) Modify the behavior of the default buttons.

  • (Optional) Add a new button.

  • (Optional) Delete a default button.

When you create a dialog, add the code that creates a basic dialog, and then choose the optional code that you want in order to customize your dialog. For example, if you want to modify the labels on the default OK and Cancel buttons, add the code to modify the labels. If you want to retain the default buttons and create a new button, add the code that creates a new button.

With the exception of the code that goes into the handler methods to invoke the dialog, you must include all code inside the MySabreTrayDialog class.

You are required to create a generic handler from which to trigger a dialog, and then add the code for the features that you want to include in your dialog. Finally, add your own code inside the execute() method in the handler for the behavior that you want. Eclipse does not generate the handler code.

If you want end-users to display your dialog from a menu, add a menu contribution after you create the dialog.