Class ConfirmationAlert

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Screen
          extended by javax.microedition.lcdui.Alert
              extended by ConfirmationAlert
All Implemented Interfaces:
javax.microedition.lcdui.CommandListener

public class ConfirmationAlert
extends javax.microedition.lcdui.Alert
implements javax.microedition.lcdui.CommandListener

ConfirmationAlert is used to notify users and require user feedback to proceed

Since:
1.0
Author:
Magnus Egeberg

Field Summary
private  java.lang.String CMD_ERROR_UNRECOVERABLE
           
private  java.lang.String CMD_EXIT
           
private  java.lang.String CMD_MENU
           
private  java.lang.String CMD_OK
           
private  javax.microedition.lcdui.Command cmdExit
           
private  javax.microedition.lcdui.Command cmdMenu
           
private  javax.microedition.lcdui.Command cmdOk
           
private  TicketingSystemMIDlet ts
           
 
Fields inherited from class javax.microedition.lcdui.Alert
DISMISS_COMMAND, FOREVER
 
Constructor Summary
ConfirmationAlert(java.lang.String title, TicketingSystemMIDlet ts)
          Creates the alert
 
Method Summary
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
          Performs actions based on user input
 void error()
          Removes the menu command when an error occurs Notifies the user of the error
 void setText(java.lang.String text)
          Adds mesage to the alert
 
Methods inherited from class javax.microedition.lcdui.Alert
addCommand, getDefaultTimeout, getImage, getIndicator, getString, getTimeout, getType, removeCommand, setCommandListener, setImage, setIndicator, setString, setTimeout, setType
 
Methods inherited from class javax.microedition.lcdui.Displayable
getHeight, getTicker, getTitle, getWidth, isShown, setTicker, setTitle, sizeChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMD_EXIT

private final java.lang.String CMD_EXIT
See Also:
Constant Field Values

CMD_MENU

private final java.lang.String CMD_MENU
See Also:
Constant Field Values

CMD_OK

private final java.lang.String CMD_OK
See Also:
Constant Field Values

CMD_ERROR_UNRECOVERABLE

private final java.lang.String CMD_ERROR_UNRECOVERABLE
See Also:
Constant Field Values

cmdExit

private javax.microedition.lcdui.Command cmdExit

cmdMenu

private javax.microedition.lcdui.Command cmdMenu

cmdOk

private javax.microedition.lcdui.Command cmdOk

ts

private TicketingSystemMIDlet ts
Constructor Detail

ConfirmationAlert

public ConfirmationAlert(java.lang.String title,
                         TicketingSystemMIDlet ts)
Creates the alert

Parameters:
title - The title of the alert
ts - The MIDlet
Method Detail

setText

public void setText(java.lang.String text)
Adds mesage to the alert

Parameters:
text - The text to be provided to the user

commandAction

public void commandAction(javax.microedition.lcdui.Command c,
                          javax.microedition.lcdui.Displayable d)
Performs actions based on user input

Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener
Parameters:
c - The command
d - The displayable

error

public void error()
Removes the menu command when an error occurs Notifies the user of the error