All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.axet.desktop.DesktopPower Maven / Gradle / Ivy

There is a newer version: 3.0.9
Show newest version
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();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy