The J2ME Mobile Information Device Profile
Using the State Pattern
|
Prof. David Bernstein
James Madison University
|
|
Computer Science Department
|
bernstdh@jmu.edu
|
A Generic Abstract State
j2meexamples/src/gui/AbstractScreen.java
The Context/Controller
j2meexamples/src/gui/ApplicationContext.java
A Complete Example (cont.)
The MIDlet
j2meexamples/src/phoneycall/PhoneyCall.java
A Complete Example (cont.)
The AbstractState
for this Example
j2meexamples/src/phoneycall/AbstractState.java
A Complete Example (cont.)
The Initial State
j2meexamples/src/phoneycall/CallCountScreen.java
A Complete Example (cont.)
The Next Two States
j2meexamples/src/phoneycall/SingleCallScreen.java
j2meexamples/src/phoneycall/MultipleCallScreen.java
A Complete Example (cont.)
The Next State
j2meexamples/src/phoneycall/CallersScreen.java
A Complete Example (cont.)
The Last State
j2meexamples/src/phoneycall/WaitingScreen.java
There's Always More to Learn