Esempio n. 1
0
 public void ClsCommand() {
   clearSelection();
   setCursorPosition(0, 0);
   updateCaretPosition();
   midlet.clearOutput();
   setText("");
 }
Esempio n. 2
0
  public void SwitchOutputCommand() {
    clearSelection();
    isOutput = !isOutput;
    if (isOutput) {
      removeCommand(output);
      output = new Command("Code", Command.ITEM, 5);
      addCommand(output);

      currentX = getCursorX();
      currentY = getCursorY();
      setCursorPosition(0, 0);
      updateCaretPosition();

      currentCode = getText();
      setText(midlet.getOutput());

      setAndViewStatus("Output");
    } else {
      removeCommand(output);
      output = new Command("Output", Command.ITEM, 5);
      addCommand(output);

      setText(currentCode);
      setCursorPosition(currentX, currentY);
      updateCaretPosition();

      if (currentDirName != null && currentFileName != null) {
        setAndViewStatus(currentDirName + currentFileName);
      }
    }
  }
Esempio n. 3
0
 public void ExitCommand() {
   // Cleanup and notify that the MIDlet has exited
   midlet.destroyApp(false);
   midlet.notifyDestroyed();
 }