Structuur consequenter gemaakt met initialise en exit methoden. De start methode wordt gereserveerd voor wanneer er een Thread moet worden gestart. Exceptions georganiseerd, hierbij opletten op het doorgeven van exceptions vanuit Threads! Poging tot het dynamisch toevoegen van devices is niet helemaal gelukt.

This commit is contained in:
2011-02-11 19:32:47 +00:00
parent c25e293c85
commit 2061376efe
26 changed files with 203 additions and 110 deletions

View File

@@ -1,7 +1,22 @@
package pm;
import pm.exception.application.ApplicationExitException;
import pm.exception.application.ApplicationInitialiseException;
import pm.listener.ActionListener;
public abstract class Application extends ActionListener {
public void exit() {}
public abstract class Application extends ActionListener {
public void run() {
try {
initialise();
super.run();
} catch (ApplicationInitialiseException e) {
e.printStackTrace();
}
}
public void initialise() throws ApplicationInitialiseException {}
public void exit() throws ApplicationExitException {
stop();
}
}