Class ConfirmationAlert
java.lang.Object
javax.microedition.lcdui.Displayable
javax.microedition.lcdui.Screen
javax.microedition.lcdui.Alert
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
Fields inherited from class javax.microedition.lcdui.Alert |
DISMISS_COMMAND, FOREVER |
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 |
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
ConfirmationAlert
public ConfirmationAlert(java.lang.String title,
TicketingSystemMIDlet ts)
- Creates the alert
- Parameters:
title
- The title of the alertts
- The MIDlet
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 commandd
- The displayable
error
public void error()
- Removes the menu command when an error occurs
Notifies the user of the error