com.github.axet.desktop.DesktopPower Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of desktop Show documentation
Show all versions of desktop Show documentation
java desktop class extender. has all user specific folders
package com.github.axet.desktop;
import java.util.HashSet;
import java.util.Set;
public abstract class DesktopPower {
public interface Listener {
/**
* os asks to App to quit.
*
* Windows machines - on reboot / logout. Mac - on reboot / logout +
* Command + Q Linux - reboot / logout
*/
public void quit();
}
protected Set listeners = new HashSet();
public void addListener(Listener l) {
listeners.add(l);
}
public void removeListener(Listener l) {
listeners.remove(l);
}
abstract public void close();
}