I think you can replace this if-else with a single line:
``ProjectManager.getInstance().getCurrentProject().setScreenMode(screenMode.name());``