State () { if (myContentManager != null) { // all panel were constructed Content content = myContentManager.getSelectedContent(); state.selectedIndex = content == null ? -1 : myContentManager.getIndexOfContent(content); } return state; }