Exemplo n.º 1
0
 public void ClsCommand() {
   clearSelection();
   setCursorPosition(0, 0);
   updateCaretPosition();
   midlet.clearOutput();
   setText("");
 }
Exemplo 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);
      }
    }
  }
Exemplo n.º 3
0
 public void ExitCommand() {
   // Cleanup and notify that the MIDlet has exited
   midlet.destroyApp(false);
   midlet.notifyDestroyed();
 }