package de.dynamobeuth.multiscreen;

abstract public class ScreenController {

    private ScreenManager screenManager;

//    private Application application;
//
//    public void setApplication(Application application) {
//        this.application = application;
//    }
//
//    public Application getApplication() {
//        return application;
//    }

    public void setScreenManager(ScreenManager manager) {
        this.screenManager = manager;
    }

    protected ScreenManager getScreenManager() {
        return screenManager;
    }

    /**
     * Will be called once after initialize() and after application and screenManager were injected
     */
    abstract protected void prepare();

    /**
     * Will be called once when the screen is shown for the first time
     * and just before the screen is added to its root and before possible screen transition animations
     */
    abstract protected void onBeforeFirstShow();

    /**
     * Will be called every time the screen is to be shown
     * and just before the screen is added to its root and before possible screen transition animations
     */
    abstract protected void onBeforeShow();

    /**
     * Will be called once when the screen is shown for the first time
     * and when possible screen transition animations are just finished
     */
    abstract protected void onFirstShow();

    /**
     * Will be called every time the screen is shown
     * and when possible screen transition animations are just finished
     */
    abstract protected void onShow();

    // TODO: integration should be possible; wait for use-case before implementation
//    public void beforeHide() {
//        System.out.println("show game view");
//    }
//
//    public void hide() {
//        System.out.println("hide game view");
//    }
}

@@ -657,33 +657,24 @@
      */%0A    
-abstract 
 protected vo
@@ -685,17 +685,24 @@
 repare()
-;
+ %7B%0A    %7D
 %0A%0A    /*
@@ -886,33 +886,24 @@
      */%0A    
-abstract 
 protected vo
@@ -916,33 +916,40 @@
 eforeFirstShow()
-;
+ %7B%0A    %7D
 %0A%0A    /**%0A     *
@@ -1113,33 +1113,24 @@
      */%0A    
-abstract 
 protected vo
@@ -1142,25 +1142,32 @@
 BeforeShow()
-;
+ %7B%0A    %7D
 %0A%0A    /**%0A  
@@ -1315,33 +1315,24 @@
      */%0A    
-abstract 
 protected vo
@@ -1343,25 +1343,32 @@
 nFirstShow()
-;
+ %7B%0A    %7D
 %0A%0A    /**%0A  
@@ -1502,25 +1502,16 @@
  */%0A    
-abstract 
 protecte
@@ -1525,17 +1525,24 @@
 onShow()
-;
+ %7B%0A    %7D
 %0A%0A    //

Revert "Make empty body methods in ScreenController abstract"