Пример #1
0
  public void reload() throws Exception {
    if (saved) {
      long a = file.lastModified();
      if (a > file_lastModified) {
        sem.fireEvent("stop", null, null);

        text.setText(U.slurp(file));
        saved = true;

        sem.pushEvent("updateTitle", this, null);
        file_lastModified = a;
      }
    }
  }
Пример #2
0
 public void save() throws Exception {
   U.saveString(file, text.getText());
   file_lastModified = file.lastModified();
   saved = true;
   sem.pushEvent("updateTitle", this, null);
 }
Пример #3
0
 public void onChange() {
   saved = false;
   sem.fireEvent("stop", null, null);
   sem.pushEvent("updateTitle", this, null);
 }