Exemple #1
0
 public void startApp() {
   textBox = new TextBox("Ophone", "\n", 512, TextField.UNEDITABLE);
   OxportMIDlet.addtext("Listo para exportar servicios...");
   textBox.addCommand(exitCom);
   textBox.addCommand(playCom);
   textBox.addCommand(initCom);
   textBox.setCommandListener(this);
   display.setCurrent(textBox);
 }
Exemple #2
0
  public void commandAction(Command c, Displayable s) {
    if (c == exitCom) {
      destroyApp(true);
      notifyDestroyed();

    } else if (c == initCom) {
      if (ox == null) {
        textBox.insert("Exportando...\n", textBox.size());
        ox = new Oxport();
        ox.start();
      }
    } else if (c == playCom) {
      if ((ox == null) || (ox.getOServer() == null)) addtext("Playground need a OServer running");
      else {
        if (playground == null) playground = new PlayGround(this);
        display.setCurrent(playground);
      }
    } else {
    }
  }
Exemple #3
0
 public static void addtext(String text) {
   if (textBox != null) textBox.insert(text + "\n", textBox.size());
 }