本文整理汇总了Java中javax.microedition.lcdui.List类的典型用法代码示例。如果您正苦于以下问题:Java List类的具体用法?Java List怎么用?Java List使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
List类属于javax.microedition.lcdui包,在下文中一共展示了List类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: AndroidListUI
import javax.microedition.lcdui.List; //导入依赖的package包/类
public AndroidListUI(final MicroEmulatorActivity activity, List list) {
super(activity, list, true);
this.selectCommand = List.SELECT_COMMAND;
this.selectedPosition = AdapterView.INVALID_POSITION;
activity.post(new Runnable() {
public void run() {
listAdapter = new AndroidListAdapter();
listView = new AndroidListView(activity);
listView.setAdapter(listAdapter);
listView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT));
((LinearLayout) AndroidListUI.this.view).addView(listView);
invalidate();
}
});
}
开发者ID:Helltar,项目名称:AMPASIDE,代码行数:19,代码来源:AndroidListUI.java
示例2: _commandAction
import javax.microedition.lcdui.List; //导入依赖的package包/类
public void _commandAction(Command c, Displayable d) {
if (c.equals(SELECT_FILE_COMMAND)) {
List curr = (List) d;
currFile = curr.getString(curr.getSelectedIndex());
new HandledThread(new Runnable() {
public void run() {
if (currFile.endsWith(SEP_STR) || currFile.equals(UP_DIRECTORY)) {
openDir(currFile);
} else {
//switch To Next
doDismiss();
}
}
}).start();
} else {
forwardCommand(c, d);
}
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:19,代码来源:FileBrowser.java
示例3: JRDemoFormListView
import javax.microedition.lcdui.List; //导入依赖的package包/类
public JRDemoFormListView (String title, Vector formNames, boolean admin) {
super(title, List.IMPLICIT);
for (int i = 0; i < formNames.size(); i++) {
//#style formSelected
append((String)formNames.elementAt(i), null);
}
// try {
//#style downloadNewForms
this.append(Localization.get("jrdemo.formlist.command.downloadforms"), null);//Image.createImage("/download_form_en.jpg"));
// } catch (IOException e) {
// e.printStackTrace();
// }
addCommand(CMD_VIEW_SAVED);
addCommand(CMD_SETTINGS);
addCommand(CMD_EXIT);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:22,代码来源:JRDemoFormListView.java
示例4: commandAction
import javax.microedition.lcdui.List; //导入依赖的package包/类
public void commandAction(Command c, Displayable d) {
if (d == this) {
if (c == List.SELECT_COMMAND) {
final String newDir = this.getString(this.getSelectedIndex());
new Thread(new Runnable() {
public void run() {
changeDir(newDir);
}
}).start();
} else if (c == exitCommand) {
if (currentDir != null) {
try {
currentDir.close();
} catch (IOException ignore) {
}
currentDir = null;
}
FCViewMIDlet.exit();
}
}
}
开发者ID:freeVM,项目名称:freeVM,代码行数:23,代码来源:FilesList.java
示例5: commandAction
import javax.microedition.lcdui.List; //导入依赖的package包/类
public void commandAction(Command c, Displayable d) {
if (c == List.SELECT_COMMAND)
showNoteDetails();
else if (c == addNote)
addNewNote();
else if (c == sortByCategory)
sortListByCategory();
else if (c == sortByPriority)
sortListByPriority();
else if (c == sortByTime)
sortListByTime();
else if (c == exit)
exitApplication();
}
开发者ID:NotesTeam,项目名称:TaskBook-J2ME,代码行数:15,代码来源:NotesList.java
示例6: FileSelector
import javax.microedition.lcdui.List; //导入依赖的package包/类
FileSelector(HeartDiagAppMidlet heartDiagApp) {
super("File Browser", List.IMPLICIT);
this.heartDiagApp = heartDiagApp;
deleteAll();
addCommand(selectCommand);
addCommand(backCommand);
setSelectCommand(selectCommand);
setCommandListener(this);
FileSystemRegistry.addFileSystemListener(FileSelector.this);
execute();
}
开发者ID:kamcpp,项目名称:heart-diag-app,代码行数:12,代码来源:FileSelector.java
示例7: FileSelector
import javax.microedition.lcdui.List; //导入依赖的package包/类
FileSelector(HeartDiagAppMidlet heartDiagApp) {
super("File Browser", List.IMPLICIT);
this.heartDiagApp = heartDiagApp;
deleteAll();
addCommand(selectCommand);
addCommand(backCommand);
setSelectCommand(selectCommand);
setCommandListener(this);
FileSystemRegistry.addFileSystemListener(FileSelector.this);
execute();
}
开发者ID:kamcpp,项目名称:heart-diag-app,代码行数:12,代码来源:FileSelector.java
示例8: _commandAction
import javax.microedition.lcdui.List; //导入依赖的package包/类
public void _commandAction(Command c, Displayable d) {
if(c.equals(List.SELECT_COMMAND)) {
controller.chooseSessionItem(view.getSelectedIndex());
controller.next();
}
else if(c.equals(BACK)) {
transitions.exitMenuTransition();
}
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:10,代码来源:CommCareSuiteController.java
示例9: _commandAction
import javax.microedition.lcdui.List; //导入依赖的package包/类
public void _commandAction(Command command, Displayable display) {
if(display == formList){
if (command == formList.CMD_CANCEL) {
cancel();
}if(command == List.SELECT_COMMAND){
String formName = formList.getString(formList.getSelectedIndex());
String formurl = (String) formInfo.get(formName);
this.formSelected(formurl);
}
}
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:12,代码来源:DisplayFormsHttpState.java
示例10: _commandAction
import javax.microedition.lcdui.List; //导入依赖的package包/类
public void _commandAction(Command c, Displayable d) {
if (d == view) {
if (c == List.SELECT_COMMAND) {
String key = view.getSelected();
if(key != null) {
transitions.languageSelected( key );
}
}else if (c == view.CMD_EXIT) {
transitions.exit();
}
}
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:13,代码来源:JRDemoSelectLanguageController.java
示例11: JRDemoSelectLanguageView
import javax.microedition.lcdui.List; //导入依赖的package包/类
public JRDemoSelectLanguageView (String title, String[] languageList) {
super(title, List.IMPLICIT);
map = new Hashtable<Integer, String>();
for (int i = 0; i < languageList.length; i++) {
if(!languageList[i].equals("default")) {
String display = languageList[i];
try { display = Localization.get(languageList[i]); } catch(Exception e) {/* No translation */}
map.put(new Integer(append(display,null)), languageList[i]);
}
}
addCommand(CMD_EXIT);
addCommand(CMD_BACK);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:14,代码来源:JRDemoSelectLanguageView.java
示例12: _commandAction
import javax.microedition.lcdui.List; //导入依赖的package包/类
public void _commandAction(Command c, Displayable d) {
if (d == view) {
if (c == List.SELECT_COMMAND) {
int index = view.getSelectedIndex();
if (index != -1)
{
String formUrl = (String) formList.elementAt(index);
transitions.formDownload(formUrl);
}
} else if (c == view.CMD_BACK) {
transitions.back();
}
}
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:15,代码来源:JRDemoRemoteFormListController.java
示例13: JRDemoRemoteFormListView
import javax.microedition.lcdui.List; //导入依赖的package包/类
public JRDemoRemoteFormListView (String title, Hashtable remoteForms, boolean admin) {
super(title, List.IMPLICIT);
Enumeration e = remoteForms.keys();
String key ;
while(e.hasMoreElements())
{
key = (String) e.nextElement();
append(key, null);
}
addCommand(CMD_BACK);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:13,代码来源:JRDemoRemoteFormListView.java
示例14: JRDemoSavedFormListView
import javax.microedition.lcdui.List; //导入依赖的package包/类
public JRDemoSavedFormListView (String title, Vector formNames) {
super(title, List.IMPLICIT);
for (int i = 0; i < formNames.size(); i++) {
append( ((SavedFormListItem)formNames.elementAt(i) ).toString(), null);
}
addCommand(CMD_BACK);
addCommand(CMD_SEND_DATA);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:11,代码来源:JRDemoSavedFormListView.java
示例15: initView
import javax.microedition.lcdui.List; //导入依赖的package包/类
private void initView () {
List list = new List("RMS Tests", List.IMPLICIT);
list.setCommandListener(this);
list.append("Fill RMS; small records", null);
list.append("Fill RMS; med records", null);
list.append("Fill RMS; big records", null);
list.append("Fill many RMSes", null);
Display.getDisplay(this).setCurrent(list);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:12,代码来源:RMSTestMidlet.java
示例16: commandAction
import javax.microedition.lcdui.List; //导入依赖的package包/类
public void commandAction(Command c, Displayable d) {
int choice = ((List)d).getSelectedIndex();
Vector log = new Vector();
d.setTitle("Working...");
switch (choice) {
case 0: testFillRMS(20, log); break;
case 1: testFillRMS(200, log); break;
case 2: testFillRMS(2000, log); break;
case 3: testFillRMSes(log); break;
}
showResults(log);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:16,代码来源:RMSTestMidlet.java
示例17: VideoSourceSelector
import javax.microedition.lcdui.List; //导入依赖的package包/类
public VideoSourceSelector(MediaSamplerMIDlet midlet, MediaList list) {
super("Select Video Source", List.IMPLICIT);
this.midlet = midlet;
this.returnList = list;
urlForm = new HTTPUrlForm();
append("From http", null);
append("From jar", null);
addCommand(backCommand);
setCommandListener(this);
}
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:11,代码来源:VideoSourceSelector.java
示例18: RemoteDeviceUI
import javax.microedition.lcdui.List; //导入依赖的package包/类
public RemoteDeviceUI() {
super("Bluetooth devices", List.IMPLICIT);
addCommand(new Command("Select", Command.SCREEN, 1));
addCommand(new Command("Search", Command.SCREEN, 2));
addCommand(BLUElet.BACK);
setCommandListener(BLUElet.instance);
}
开发者ID:cli,项目名称:worldmap-classic,代码行数:10,代码来源:RemoteDeviceUI.java
示例19: commandAction
import javax.microedition.lcdui.List; //导入依赖的package包/类
public void commandAction(Command c, Displayable d) {
if (d == menuList) {
if (c == List.SELECT_COMMAND) {
setCurrentDisplayable((Displayable) testPanels.elementAt(menuList.getSelectedIndex()));
} else if (c == exitCommand) {
try {
destroyApp(true);
} catch (MIDletStateChangeException e) {
}
notifyDestroyed();
}
}
}
开发者ID:freeVM,项目名称:freeVM,代码行数:14,代码来源:MainTestMIDlet.java
示例20: AlertPanel
import javax.microedition.lcdui.List; //导入依赖的package包/类
public AlertPanel() {
super("Alert", List.IMPLICIT);
for (int i = 0; i < alerts.length; i++) {
if (i == 1 || i == 3) {
alerts[i].setTimeout(5000);
}
append(alerts[i].getTitle(), null);
}
}
开发者ID:freeVM,项目名称:freeVM,代码行数:11,代码来源:AlertPanel.java
注:本文中的javax.microedition.lcdui.List类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论