fix missing formatting updates

This commit is contained in:
Manfred Karrer 2014-08-29 22:11:59 +02:00
parent 3c67b08ff9
commit 096f4c01e7
12 changed files with 298 additions and 266 deletions

View file

@ -11,25 +11,26 @@ import javafx.scene.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Non caching version for code behind classes using the PM pattern
*
* @param <T> The PresentationModel used in that class
*/
public class CodeBehind<T extends PresentationModel> implements Initializable {
private static final Logger log = LoggerFactory.getLogger(CodeBehind.class);
protected T pm;
protected T presentationModel;
protected ViewController childController;
protected ViewController parentController;
@FXML protected Parent root;
public CodeBehind(T pm) {
this.pm = pm;
public CodeBehind(T presentationModel) {
this.presentationModel = presentationModel;
}
public CodeBehind() {
}
public T pm() {
return (T) pm;
}
/**
* Get called form GUI framework when the UI is ready.
*
@ -45,7 +46,7 @@ public class CodeBehind<T extends PresentationModel> implements Initializable {
if (oldValue != null && newValue == null) terminate();
});
pm.initialized();
presentationModel.initialized();
}
/**
@ -56,7 +57,7 @@ public class CodeBehind<T extends PresentationModel> implements Initializable {
log.trace("Lifecycle: terminate " + this.getClass().getSimpleName());
if (childController != null) childController.terminate();
pm.terminate();
presentationModel.terminate();
}
/**