예제 #1
0
파일: WinSize.java 프로젝트: McNeight/GLsat
  void doExeCommand() {
    PSlider slider;
    Runtime program = Runtime.getRuntime();
    String currentCmd = new String();
    String X = new String();
    String Y = new String();

    // Kill the current executing program
    pid.destroy();

    // Setup the command parameters and run it
    slider = (PSlider) vSlider.elementAt(0);
    X = slider.getValue();
    slider = (PSlider) vSlider.elementAt(1);
    Y = slider.getValue();
    currentCmd = cmd + " " + X + " " + Y;

    try {
      pid = program.exec(currentCmd);
      if (isWindows == false) {
        Process pid2 = null;
        pid2 = program.exec("getpid WinSize");
      }
    } catch (IOException ie) {
      System.err.println("Couldn't run " + ie);
      System.exit(-1);
    }

    // Update the new value in the source code of the program
    doSourceFileUpdate();
    scrollPane.getViewport().setViewPosition(new Point(0, 20));
  }
예제 #2
0
 void doExitCommand() {
   File fp = new File(dataFile);
   boolean delete = fp.delete();
   pid.destroy();
   doResetCommand();
   setVisible(false);
 }
예제 #3
0
파일: WinSize.java 프로젝트: McNeight/GLsat
 void doExitCommand() {
   // File fp = new File("link");
   // boolean delete = fp.delete();
   pid.destroy();
   setVisible(false);
 }