Java by API/javax.microedition.lcdui/Display — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 14:49, 31 мая 2010
Display: getDisplay(MIDlet arg0)
import javax.microedition.lcdui.Choice;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.List;
import javax.microedition.midlet.MIDlet;
public class Main extends MIDlet {
private String[] capabilitiesIdx = { "microedition.media.version", "supports.mixing",
"supports.audio.capture", "supports.video.capture", "supports.recording", "audio.encodings",
"video.encodings", "video.snapshot.encodings", "streamable.contents" };
public void startApp() {
List list = new List("Audio/Video Capabilities", Choice.IMPLICIT);
for (int i = 0; i < capabilitiesIdx.length; ++i) {
list.append(System.getProperty(capabilitiesIdx[i]) + " - " + capabilitiesIdx[i], null);
}
Display.getDisplay(this).setCurrent(list);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}
Display: setCurrent(Displayable nextDisplayable)
import javax.microedition.lcdui.Choice;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.List;
import javax.microedition.midlet.MIDlet;
public class Main extends MIDlet {
private String[] capabilitiesIdx = { "microedition.media.version", "supports.mixing",
"supports.audio.capture", "supports.video.capture", "supports.recording", "audio.encodings",
"video.encodings", "video.snapshot.encodings", "streamable.contents" };
public void startApp() {
List list = new List("Audio/Video Capabilities", Choice.IMPLICIT);
for (int i = 0; i < capabilitiesIdx.length; ++i) {
list.append(System.getProperty(capabilitiesIdx[i]) + " - " + capabilitiesIdx[i], null);
}
Display.getDisplay(this).setCurrent(list);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}