本文整理汇总了Java中javax.microedition.lcdui.List类的典型用法代码示例。如果您正苦于以下问题:Java List类的具体用法?Java List怎么用?Java List使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
List类属于javax.microedition.lcdui包,在下文中一共展示了List类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
});
}
示例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);
}
}
示例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);
}
示例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();
}
}
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
}
示例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);
}
}
}
示例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();
}
}
}
示例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);
}
示例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();
}
}
}
示例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);
}
示例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);
}
示例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);
}