Class TicketForm
java.lang.Object
javax.microedition.lcdui.Displayable
javax.microedition.lcdui.Screen
javax.microedition.lcdui.Form
TicketForm
- All Implemented Interfaces:
- javax.microedition.lcdui.CommandListener
public class TicketForm
- extends javax.microedition.lcdui.Form
- implements javax.microedition.lcdui.CommandListener
TicketForm is responsible for presenting ticket data to the user.
- Since:
- 1.0
- Author:
- Magnus Egeberg
Method Summary |
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
Perfoms actions based on user commands |
int |
readByte()
Reads a byte and returns it as an int |
int |
readShort()
Reads a short and return it as an int |
Methods inherited from class javax.microedition.lcdui.Form |
append, append, append, delete, deleteAll, get, getHeight, getWidth, insert, set, setItemStateListener, size |
Methods inherited from class javax.microedition.lcdui.Displayable |
addCommand, getTicker, getTitle, isShown, removeCommand, setCommandListener, setTicker, setTitle, sizeChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CMD_BACK
private final java.lang.String CMD_BACK
- See Also:
- Constant Field Values
CMD_EXIT
private final java.lang.String CMD_EXIT
- See Also:
- Constant Field Values
TITLE_BALANCE
private final java.lang.String TITLE_BALANCE
- See Also:
- Constant Field Values
TITLE_PREVIOUS_CHARGE
private final java.lang.String TITLE_PREVIOUS_CHARGE
- See Also:
- Constant Field Values
INFO_BALANCE
private final java.lang.String INFO_BALANCE
- See Also:
- Constant Field Values
INFO_DATE
private final java.lang.String INFO_DATE
- See Also:
- Constant Field Values
INFO_AMOUNT
private final java.lang.String INFO_AMOUNT
- See Also:
- Constant Field Values
ENDING_KR
private final java.lang.String ENDING_KR
- See Also:
- Constant Field Values
tBack
private javax.microedition.lcdui.Command tBack
tExit
private javax.microedition.lcdui.Command tExit
bais
private java.io.ByteArrayInputStream bais
in
private java.io.DataInputStream in
ts
private TicketingSystemMIDlet ts
TicketForm
public TicketForm(TicketingSystemMIDlet ts,
byte[] data)
- TicketForm creastes the form and adds the commands.
- Parameters:
ts
- The MIDletdata
- The byte array that will be presented to the user- See Also:
ByteArrayInputStream
,
DataInputStream
commandAction
public void commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
- Perfoms actions based on user commands
- Specified by:
commandAction
in interface javax.microedition.lcdui.CommandListener
readShort
public int readShort()
throws java.lang.Exception
- Reads a short and return it as an int
- Returns:
- The int value of the bytes
- Throws:
java.lang.Exception
- when failing to read the short
readByte
public int readByte()
throws java.lang.Exception
- Reads a byte and returns it as an int
- Returns:
- the int value of the byte
- Throws:
java.lang.Exception
- when failing to read the byte