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


Java Command.SCREEN属性代码示例

本文整理汇总了Java中javax.microedition.lcdui.Command.SCREEN属性的典型用法代码示例。如果您正苦于以下问题:Java Command.SCREEN属性的具体用法?Java Command.SCREEN怎么用?Java Command.SCREEN使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.microedition.lcdui.Command的用法示例。


在下文中一共展示了Command.SCREEN属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateLabel

private void updateLabel() {

        if (label == null) {
            label = new StringItem("", "");
            // this command comes from the other constants file
            Command cameraCommand = new Command(org.javarosa.core.api.Constants.ACTIVITY_TYPE_GET_IMAGES, "Get Images", Command.SCREEN, 0);
            label.addCommand(cameraCommand);
        }
        if (data == null) {
            label.setLabel("Use the menu to get images");
            label.setText("No images selected");
        } else {
            label.setLabel("Use the menu item to change selected images");
            label.setText(data.getDisplayText());
        }
    }
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:16,代码来源:ImageChooserWidget.java

示例2: showCamera

private void showCamera() {
    try {
        mPlayer = Manager.createPlayer("capture://video");
        mPlayer.realize();

        mVideoControl = (VideoControl) mPlayer.getControl("VideoControl");

        //    Command mExitCommand = new Command("Exit", Command.EXIT, 0);
        //    Command mCameraCommand = new Command("Camera", Command.SCREEN, 0);
        mBackCommand = new Command("Back", Command.BACK, 0);
        mCaptureCommand = new Command("Capture", Command.SCREEN, 0);

        Canvas canvas = new CameraCanvas(null, mVideoControl);
        canvas.addCommand(mBackCommand);
        canvas.addCommand(mCaptureCommand);
        canvas.setCommandListener(this);

        J2MEDisplay.setView(canvas);
        mPlayer.start();
    } catch (IOException ioe) {
        handleException(ioe);
    } catch (MediaException me) {
        handleException(me);
    }
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:25,代码来源:ImageCaptureState.java

示例3: ImageChooserState

public ImageChooserState(MIDlet midlet)
{
    this.midlet = midlet;
    transitions = this;
    allImages = new Hashtable();

    cancelCommand = new Command("Cancel", Command.CANCEL, 0);
    returnCommand = new Command("Return", Command.OK, 0);
    cameraCommand = new Command("Camera", Command.SCREEN, 0);
    browseCommand = new Command("Browse", Command.SCREEN, 0);
    viewCommand = new Command("View", Command.SCREEN, 0);
    deleteCommand = new Command("Delete", Command.SCREEN, 0);
    changeSniffDirectoryCommand = new Command("Change Search Directory", Command.SCREEN, 0);

    try
    {
        fileService = getFileService();
    }
    catch(UnavailableServiceException ue)
    {
        serviceUnavailable(ue);
    }

}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:24,代码来源:ImageChooserState.java

示例4: setupCommands

private void setupCommands() {
	addNote = new Command("Add", Command.SCREEN, 0);
	exit = new Command("Exit", Command.EXIT, -1);
	sortByCategory = new Command("By Cat.", Command.SCREEN, 0);
	sortByPriority = new Command("By Prior.", Command.SCREEN, 0);
	sortByTime = new Command("By Time", Command.SCREEN, 0);
	addCommand(addNote);
	addCommand(exit);
	addCommand(sortByCategory);
	addCommand(sortByPriority);
	addCommand(sortByTime);
	setCommandListener(this);
}
 
开发者ID:NotesTeam,项目名称:TaskBook-J2ME,代码行数:13,代码来源:NotesList.java

示例5: RecordForm

public RecordForm(){
    super("Record Audio");
    messageItem = new StringItem("Record", "Click record to start recording.");
    this.append(messageItem);
    errorItem = new StringItem("", "");
    this.append(errorItem);
    recordCommand = new Command("Record", Command.SCREEN, 1);
    this.addCommand(recordCommand);
    playCommand = new Command("Play", Command.SCREEN, 2);
    this.addCommand(playCommand);
   // StringBuffer inhalt = new StringBuffer();
    this.setCommandListener(this);
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:13,代码来源:RecordMIDlet.java

示例6: initCommands

private void initCommands()
{
    recordCommand = new Command("Record", Command.SCREEN, 0);
    form.addCommand(recordCommand);
    playCommand = new Command("Play", Command.SCREEN, 1);
    stopCommand = new Command("Stop", Command.SCREEN, 0); //Do not add immediately
    backCommand = new Command("Back", Command.BACK, 0);
    form.addCommand(backCommand);
    finishCommand = new Command("Finish", Command.OK, 0);
    saveCommand = new Command("Save", Command.SCREEN, 0);
    eraseCommand = new Command("Erase", Command.SCREEN, 0);
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:12,代码来源:AudioCaptureState.java

示例7: EntitySelectView

public EntitySelectView (EntitySelectController<E> controller, Entity<E> entityPrototype, String title, int newMode) {
        super(title);
        this.baseTitle = title;

        this.controller = controller;
        this.entityPrototype = entityPrototype;
        this.newMode = newMode;

        this.sortOrder = getDefaultSortOrder();

        tf = new TextField(Localization.get("entity.find") + " ", "", 20, TextField.ANY);

//        //#if !polish.blackberry
//        tf.setInputMode(TextField.MODE_UPPERCASE);
//        //#endif
        tf.setItemStateListener(this);

        append(Graphics.BOTTOM, tf);

        exitCmd = new Command(Localization.get("command.cancel"), Command.CANCEL, 4);
        sortCmd = new Command(Localization.get("entity.command.sort"), Command.SCREEN, 3);
        addCommand(exitCmd);
        if (this.getNumSortFields() > 1) {
            addCommand(sortCmd);
        }
        if (newMode == NEW_IN_MENU) {
            newCmd = new Command("New " + entityPrototype.entityType(), Command.SCREEN, 4);
            addCommand(newCmd);
        }
        this.setCommandListener(this);

        rowIDs = new Vector<Integer>();

        this.setScrollYOffset(0, false);
    }
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:35,代码来源:EntitySelectView.java

示例8: start

public void start () {
    messages = new Vector<String>();

    //#style networkTestForm
    interactiveView = new FramedForm(Localization.get("network.test.title"));
    exit = new Command(Localization.get("polish.command.ok"), Command.BACK, 0);
    back = new Command(Localization.get("polish.command.back"), Command.BACK, 0);
    details = new Command(Localization.get("network.test.details"), Command.SCREEN, 2);
    interactiveView.setCommandListener(this);
    interactiveView.addCommand(exit);

    //#style networkTestImage
    imageView = new ImageItem(null, null, ImageItem.LAYOUT_CENTER | ImageItem.LAYOUT_VCENTER, "");

    interactiveMessage = new StringItem(null, "");

    interactiveView.append(Graphics.TOP, imageView);
    interactiveView.append(interactiveMessage);

    J2MEDisplay.setView(interactiveView);

    final GPRSTestState parent = this;
    new HandledThread () {
        public void _run () {
            networkTest(parent);
        }
    }.start();
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:28,代码来源:GPRSTestState.java

示例9: MIDP2CodenameOneCommand

public MIDP2CodenameOneCommand(com.codename1.ui.Command c, int offset) {
    super(c.getCommandName(), Command.SCREEN, offset);
    internal = c;
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:4,代码来源:GameCanvasImplementation.java

示例10: start

public void start () {
    view = new Form("logs");

    view.setCommandListener(this);

    exit = new Command("OK", Command.BACK, 1);

    submit = new Command("Send to Server", Command.SCREEN, 0);

    ok = new Command("OK", Command.SCREEN, 0);

    loadLogs();

    J2MEDisplay.setView(view);
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:15,代码来源:LogViewerState.java


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