@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();
        }
    }
Sets the unique ID of this app state.  Note: that setting
 this while an app state is attached to the state manager will
 have no effect on ID-based lookups.

@param id the desired ID
jme3-core/src/main/java/com/jme3/app/state/BaseAppState.java