@Override public final void setEnabled( boolean enabled ) { if( this.enabled == enabled ) return; this.enabled = enabled; if( !isInitialized() ) return; if( enabled ) { log.log(Level.FINEST, "onEnable():{0}", this); onEnable(); } else { log.log(Level.FINEST, "onDisable():{0}", this); onDisable(); } }
/** * 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(); } }
@Override public final void setEnabled( boolean enabled ) { if( this.enabled == enabled ) return; this.enabled = enabled; if( !isInitialized() ) return; if( enabled ) { log.log(Level.FINEST, "onEnable():{0}", this); onEnable(); } else { log.log(Level.FINEST, "onDisable():{0}", this); onDisable(); } }
/** * 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(); } }