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


Java AlertType.INFO属性代码示例

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


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

示例1: showLoginRequiredMessage

/**
 * Show a login required message on the screen.
 *
 * @param title
 * @param alertText
 * @param type
 */
public final void showLoginRequiredMessage() {
    Alert alert = new Alert(LOGIN_REQUIRED_LABEL, LOGIN_REQUIRED_TEXT, 
        null, AlertType.INFO);
    alert.addCommand(new Command(LOGIN_REQUIRED_YES, Command.OK, 0));
    alert.addCommand(new Command(LOGIN_REQUIRED_NO, Command.CANCEL, 0));
    alert.setCommandListener(new CommandListener() {

        public void commandAction(Command c, Displayable d) {
            if(c.getCommandType() == Command.OK) {
                showLoginView();
            } else {
                setDisplay(self);
            }
        }
    });
    setDisplay(alert);
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:24,代码来源:BaseFormView.java

示例2: commandAction

public void commandAction(Command cmd, Displayable disp) {
	//#debug info
	System.out.println("commandAction with cmd=" + cmd.getLabel() + ", screen=" + disp );
	if (cmd == this.backCommand) {
		display.setCurrent(mainScreen);
	} else if (cmd == this.exitCommand) {
		//#debug info
		System.out.println("Exit application");
		this.notifyDestroyed();
	} else if (cmd == this.aboutCommand) {
		String param = this.getAppProperty("Xfolite-Version");
     	Alert alert = new Alert(
     			Locale.get("main.label.about"),
     			Locale.get("main.msg.about", param),
     			null,
     			AlertType.INFO);
 		// Looks like an error but builds
 		this.display.setCurrent(alert, mainScreen);
     }
}
 
开发者ID:okoskimi,项目名称:Xfolite,代码行数:20,代码来源:XFormsMidlet.java

示例3: inquiryCompleted

public void inquiryCompleted(int complete) {
	log("device discovery is completed with return code:" + complete);
	log("" + devices.size() + " devices are discovered");

	deviceReturnCode = complete;

	if (devices.size() == 0) {
		Alert alert = new Alert("Bluetooth", "No Bluetooth device found", null, AlertType.INFO);
		alert.setTimeout(3000);
		remotedeviceui.showui();
		display.setCurrent(alert, remotedeviceui);

	} else {
		remotedeviceui.showui();
		display.setCurrent(remotedeviceui);
	}

}
 
开发者ID:cli,项目名称:worldmap-classic,代码行数:18,代码来源:BLUElet.java

示例4: test

public void test(TestHarness th) {
    Alert alert = new Alert("Hello World", "Some text", null, AlertType.INFO);
    alert.setTimeout(Alert.FOREVER);
    TextEditor textEditor = TextEditor.createTextEditor("Hello, world!", 20, 0, 100, 24);
    textEditor.setParent(this);

    th.setScreenAndWait(this);

    textEditor.setFocus(true);
    th.check(textEditor.hasFocus(), "TextEditor gained focus");
    th.check(isTextEditorReallyFocused(), "TextEditor really gained focus");

    th.setScreenAndWait(alert);
    try {
        Thread.sleep(500);
    } catch (InterruptedException e) {
        th.fail("Unexpected exception: " + e);
    }
    th.check(textEditor.hasFocus(), "TextEditor kept focus");
    th.check(!isTextEditorReallyFocused(), "TextEditor really lost focus");

    th.setScreenAndWait(this);
    th.check(textEditor.hasFocus(), "TextEditor maintained focus");
    th.check(isTextEditorReallyFocused(), "TextEditor really regained focus");

    th.setScreenAndWait(alert);
    th.check(textEditor.hasFocus(), "TextEditor still has focus");
    th.check(!isTextEditorReallyFocused(), "TextEditor really lost focus");
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:29,代码来源:TestAlert.java

示例5: showMessage

public void showMessage(String msg) {
//#debug info
System.out.println("Showing message: " + msg);
//#style xformsmessage
Alert alert = new Alert(Locale.get("forms.label.message"),
		msg, null, AlertType.INFO);
// Looks like an error but builds
m_display.setCurrent(alert, this);
// FIXME: Implement proper popup
/*
 * final Popup popup = new Popup(Pic.get("/info.png"),
 * "Message", msg); popup.setCommands(this, Popup.OK, null);
 * Screen.get().push(popup);
 */
  }
 
开发者ID:okoskimi,项目名称:Xfolite,代码行数:15,代码来源:XFormsForm.java

示例6: showResultImage

private void showResultImage()
{
    try {
        img = Image.createImage("/img/" + result + ".png");
    } catch (IOException e) {
        throw new JSimpleDiceException(EXCEPTION_MSG + e.getMessage());
    }
    Alert alert = new Alert(String.valueOf(result), null, img,
            AlertType.INFO);
    alert.setTimeout(Alert.FOREVER);
    display.setCurrent(alert, form);
}
 
开发者ID:camila,项目名称:sf-java,代码行数:12,代码来源:JSimpleDiceMIDlet.java


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