The J2ME Mobile Information Device Profile
An Introduction |
Prof. David Bernstein |
Computer Science Department |
bernstdh@jmu.edu |
MIDlet
class
AffineTransform
Graphics
not Graphics2D
Image
instead of BufferedImage
BufferedImageOp
Shape
interface or implementationsColor
, Paint
or
Stroke
classesPlayer
Player
MIDIControl
and/or
a TempoControl
Important Components
Form
Layoutform = new Form("Multiple Call Details"); number = new TextField("No. of Calls:", "6", 6, TextField.NUMERIC); number.setLayout(Item.LAYOUT_EXPAND|Item.LAYOUT_NEWLINE_AFTER); form.append(number); interval = new TextField("In the next (sec.):", "120", 6, TextField.NUMERIC); interval.setLayout(Item.LAYOUT_EXPAND|Item.LAYOUT_NEWLINE_AFTER); form.append(interval); delay = new TextField("First call in (sec.):", "5", 3, TextField.NUMERIC); delay.setLayout(Item.LAYOUT_EXPAND|Item.LAYOUT_NEWLINE_AFTER); form.append(delay);
List
list = new List("Select Caller(s)", List.MULTIPLE); list.append("Aboutabl, Mohamed", null); list.append("Abzug, Charles", null); list.append("Adams, Elizabeth", null); list.append("Bernstein, David", null); list.append("Buchholz, Florian", null); list.append("Cushman, Pauline", null); list.append("Daughtrey, Taz", null); list.append("Fox, Christopher", null); list.append("Grove, Ralph", null); list.append("Harris, J. Archer", null); list.append("Harris, Nancy", null); list.append("Heydari, M. Hossain", null); list.append("Lane, Malcolm", null); list.append("Marchal, Joseph", null); list.append("Mata-Toledo, Ramon", null); list.append("Norton, Michael", null); list.append("Prieto-Díaz, Rubén", null); list.append("Redwine, Samuel", null); list.append("Tjaden, Brett", null); list.append("Wang, Xunhua (Steve)", null);
Command
Objects
CommandListener
Interface/** * Handle a Command * * @param c The Command * @param d The Displayable that generated the Command */ public void commandAction(Command c, Displayable d) { String ac; ac = c.getLabel(); if (ac.equals(AbstractState.CANCEL)) state.handleCancel(); if (ac.equals(AbstractState.OK)) state.handleOK(); if (ac.equals(AbstractState.SELECT)) state.handleSelect(); }