当前位置: 首页>>代码示例>>Java>>正文


Java List类代码示例

本文整理汇总了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();
		}
	});		
}
 
开发者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


注:本文中的javax.microedition.lcdui.List类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。