/** * Do not call directly: Called by the state manager to initialize this * state post-attachment. * This implementation calls initialize(app) and then onEnable() if the * state is enabled. */ @Override public final void initialize( AppStateManager stateManager, Application app ) { log.log(Level.FINEST, "initialize():{0}", this); this.app = app; initialized = true; initialize(app); if( isEnabled() ) { log.log(Level.FINEST, "onEnable():{0}", this); onEnable(); } }
/** * Do not call directly: Called by the state manager to terminate this * state post-detachment or during state manager termination. * This implementation calls onDisable() if the state is enabled and * then cleanup(app). */ @Override public final void cleanup() { log.log(Level.FINEST, "cleanup():{0}", this); if( isEnabled() ) { log.log(Level.FINEST, "onDisable():{0}", this); onDisable(); } cleanup(app); initialized = false; } }
/** * Do not call directly: Called by the state manager to initialize this * state post-attachment. * This implementation calls initialize(app) and then onEnable() if the * state is enabled. */ @Override public final void initialize( AppStateManager stateManager, Application app ) { log.log(Level.FINEST, "initialize():{0}", this); this.app = app; initialized = true; initialize(app); if( isEnabled() ) { log.log(Level.FINEST, "onEnable():{0}", this); onEnable(); } }
/** * Do not call directly: Called by the state manager to terminate this * state post-detachment or during state manager termination. * This implementation calls onDisable() if the state is enabled and * then cleanup(app). */ @Override public final void cleanup() { log.log(Level.FINEST, "cleanup():{0}", this); if( isEnabled() ) { log.log(Level.FINEST, "onDisable():{0}", this); onDisable(); } cleanup(app); initialized = false; } }