Package javax.microedition.lcdui

Examples of javax.microedition.lcdui.Form.addCommand()


    Image question = UiUtil.getImage("/icons/questionMk.png");
    formAlert.append(question);
    int ix = formAlert.append(new StringItem(null,
          (String)promptCommands.get(origCmd)));
    Command okCmd = UiUtil.getCmdRsc("cmd.ok", Command.OK, 1);
    formAlert.addCommand(okCmd);
    Command cancelCmd = UiUtil.getCmdRsc("cmd.cancel", Command.CANCEL, 2);
    formAlert.addCommand(cancelCmd);
    promptAlert = new Alert(origCmd.getLabel(),
        ((StringItem)formAlert.get(ix)).getText(), question,
        AlertType.CONFIRMATION);
View Full Code Here


    int ix = formAlert.append(new StringItem(null,
          (String)promptCommands.get(origCmd)));
    Command okCmd = UiUtil.getCmdRsc("cmd.ok", Command.OK, 1);
    formAlert.addCommand(okCmd);
    Command cancelCmd = UiUtil.getCmdRsc("cmd.cancel", Command.CANCEL, 2);
    formAlert.addCommand(cancelCmd);
    promptAlert = new Alert(origCmd.getLabel(),
        ((StringItem)formAlert.get(ix)).getText(), question,
        AlertType.CONFIRMATION);
    promptAlert.setTimeout(Alert.FOREVER);
    promptAlert.addCommand(okCmd);
View Full Code Here

      //#ifdef DTEST
      System.gc();
      long beginMem = Runtime.getRuntime().freeMemory();
      //#endif
      Form displayDtlForm = new Form( feed.getName() );
      displayDtlForm.addCommand( m_backCommand );
      displayDtlForm.setCommandListener(this);
      final boolean pageEnabled = m_appSettings.getPageEnabled();
      final boolean htmlEnabled = m_appSettings.getHtmlEnabled();
      int fontSize = pageEnabled ? getFontSize() : 0;
      if (m_itunesEnabled && feed.isItunes()) {
View Full Code Here

        );

        Form form = new Form( ResourceManager.getResource( title ) );
        form.append( textField );

        form.addCommand( Application.getCommandFactory().okCommand() );
        form.addCommand( Application.getCommandFactory().cancelCommand() );
        form.setCommandListener( this );

        displayable = form;
    }
View Full Code Here

        Form form = new Form( ResourceManager.getResource( title ) );
        form.append( textField );

        form.addCommand( Application.getCommandFactory().okCommand() );
        form.addCommand( Application.getCommandFactory().cancelCommand() );
        form.setCommandListener( this );

        displayable = form;
    }
View Full Code Here

    Image question = UiUtil.getImage("/icons/questionMk.png");
    formAlert.append(question);
    int ix = formAlert.append(new StringItem(null,
          (String)promptCommands.get(origCmd)));
    Command okCmd = UiUtil.getCmdRsc("cmd.ok", Command.OK, 1);
    formAlert.addCommand(okCmd);
    Command cancelCmd = UiUtil.getCmdRsc("cmd.cancel", Command.CANCEL, 2);
    formAlert.addCommand(cancelCmd);
    promptAlert = new Alert(origCmd.getLabel(),
        ((StringItem)formAlert.get(ix)).getText(), question,
        AlertType.CONFIRMATION);
View Full Code Here

    int ix = formAlert.append(new StringItem(null,
          (String)promptCommands.get(origCmd)));
    Command okCmd = UiUtil.getCmdRsc("cmd.ok", Command.OK, 1);
    formAlert.addCommand(okCmd);
    Command cancelCmd = UiUtil.getCmdRsc("cmd.cancel", Command.CANCEL, 2);
    formAlert.addCommand(cancelCmd);
    promptAlert = new Alert(origCmd.getLabel(),
        ((StringItem)formAlert.get(ix)).getText(), question,
        AlertType.CONFIRMATION);
    promptAlert.setTimeout(Alert.FOREVER);
    promptAlert.addCommand(okCmd);
View Full Code Here

                + "Click in middle of discarded cards to call xUno.\n"
                + "Click in colored square to choose color."
                );
        help.append(aboutTouchCommands);

        help.addCommand(new Command("Back", Command.BACK, 0));
        help.setCommandListener(this);
        lcd.setCurrent(help);
    }

    public void commandAction(Command c, Displayable d) {
View Full Code Here

        showMessage("Error", message, ex);
    }

    protected static void showMessage(final String header, final String message, final Exception ex) {
        Form f = new Form(header);
        f.addCommand(new Command("OK", Command.OK, 0));
        if (ex != null) {
            f.append(message + ": " + ex.getMessage());
        } else {
            f.append(message);
        }
View Full Code Here

  protected static Command cmdExit = new Command("Exit", Command.SCREEN, 5);

  protected void startApp() throws MIDletStateChangeException {
    Form f = new Form("Info");
    f.addCommand(cmdExit);

    Calendar calLocal = Calendar.getInstance();
    // calLocal.setTimeZone(TimeZone.getTimeZone("PST"));
    Calendar calUTC = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
    // calUTC.setTimeZone();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.