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; } } }
public void save() throws Exception { U.saveString(file, text.getText()); file_lastModified = file.lastModified(); saved = true; sem.pushEvent("updateTitle", this, null); }
public void onChange() { saved = false; sem.fireEvent("stop", null, null); sem.pushEvent("updateTitle", this, null); }