Example #1
0
 /**
  * Create a new Alert with the specified title, text, image, and alert type.
  *
  * @param title the title string
  * @param text the text string
  * @param image the image
  * @param type the alert type
  */
 public Alert(String title, String text, Image image, AlertType type) {
   super(title);
   construct();
   this.type = type;
   setImage(image);
   setString(text);
   setTimeout(getDefaultTimeout());
   super.addCommand(DISMISS_COMMAND);
   super.setCommandListener(implicitListener);
 }
Example #2
0
 /* (non-Javadoc)
  * @see Displayable#setCommandListener(CommandListener)
  */
 public void setCommandListener(CommandListener listener) {
   if (listener == null) {
     listener = implicitListener;
   }
   super.setCommandListener(listener);
 }